How to write a JPEG file decoder from scratch

Viewed 23598

I know there are many tools for this already. My goal is to learn. So I can read a JPEG file with fopen(), I know this is a binary file. Then what? I know that i can learn the JPEG specifications. But it doesn't seem to tell what is the structure of the binary jpeg file.

This file contains zeros and ones How can i transform this or how can i know which chain of bits means what ?

I've come across this example: nano jpeg decoder But it's pretty hard to read the code

Thanks in advance

PS: This princeton guy has done a project on this which provides a good reference

2 Answers
Related