Wednesday, 06 July, 2022
Song of the Day: Polaroid - Imagine Dragons
Continued working with the jpeg reader. I made a good deal of progress today, correctly reading in and preparing all of the quantization data into 8x8 matrices and generating the huffman tables. I’m pretty proud of the logic that I worked out to deal with the latter. At this point, I’ve read in all of the required metadata, tables, etc.
Here, I’ve uploaded the output of my program processing the file metadata: output. If you look, you should be able to make out the different sections that I have processed.
Tomorrow, I’ll be creating the code to read in the byte stream for the main section of the file. Once I have a buffer set up for that, hopefully it should be a simple process to unencode the stream via the huffman tables. After that, fingers crossed it’ll be another simple process to quantize(?) the stream and perform the discrete cosine transform on it to build out the image.