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
This page has a lot of info on how to process a jpeg file. Also, you can take a look at my own attempt at writing a jpeg decoder in Python.
The short variable names in the program often correspond directly to variables in the standard. So if you have the standard ready, it’ll help a lot. It’s called ITU-1150 and is freely available on the Internet.