Decoder for jpeg lossy signal compression
Program to decode .jpg/.jpeg files and convert them into uncompressed bitmap (.bmp) image.
No support for decoding of :
- Progressive DCT mode (yet)
- Lossless mode
- Arithmetic Encoding
- Oops, haven't considered single channel jpg images (normal map, specular map mostly use that)
With cmake installed,
cmake CMakeLists.txt
make
or
gcc ./Decoder/src/jpeg.c ./Decoder/src/QHTable.c ./Decoder/src/bitstream.c -Og ./utility/bmp.c -lm -o jpeg_decoder
-DDEBUG flag should be passed to gcc to generate debug output
./jpeg_decoder img.jpg
Output will be saved as jpeg_output.bmp
https://en.wikipedia.org/wiki/JPEG
https://www.w3.org/Graphics/JPEG/itu-t81.pdf
https://en.wikipedia.org/wiki/Discrete_cosine_transform
https://www.ietf.org/rfc/rfc1951.txt [Deflate]
https://www.youtube.com/watch?v=CPT4FSkFUgs