Skip to content

TilakChad/JPEG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPEG

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)

Build Instructions

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

Usage

./jpeg_decoder img.jpg
Output will be saved as jpeg_output.bmp

Sample DCT compressed output

Original Image

DCT Compressed Image

Decoded Image

References

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

About

Decoder for jpeg lossy signal compression

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published