TinyJpeg are two classes for jpeg encoder and decoder. Aim was to write decoder with minimal code size which was to a certain extent acheived (decoder can be compiled to approx. 3kB of code) Special features - lossless jpeg compression, which was even further extended allowing for better compression ratios. There is also nice huffman coder template and couple of DCT classes (one is enhanced with MMX, but the asm is not very nice)

status: made part of ÜberLame
language: C++
os: win32 / linux (msvc / g++)

version history

versionchanges from previous version
v0.50written jpeg decoder
v0.60added jpeg encoder
v0.70added MMX IDCT support
v0.80rewritten huffman coder templates so it now compile under linux
v0.90added lossless jpeg support
v1.00final code refinements, added config section


Motivation Why use it (features) Why don't use it (limitations) Todo
struct TImage {
    int n_width, n_height;
    int n_sample_bit_num;    // 2 - 12 for jpeg
    int n_pixel_align;    // 1, 2, 4 or 8 - number of bytes to contain
                          // a single pixel. aligned towards LSB
    enum {
        color_R,      // single-component lossless
        color_Gray,   // single-component lossy
        color_CMYK    // possible to select in decoder to either keep CMYK
                      // if present or convert to RGB
    } n_format;
    unsigned char *p_buffer;


versionrelease datefilerelease notes
v1.002006-12-27tinyjpeg_src_ver100.zipTinyJpeg source along with test app
v1.002006-12-27tinyjpeg_bin_ver100.ziptest images (18.6 MB)