This Jupyter Notebook steps through the process of decoding a JPEG image file. After learning to understand these files byte by byte, its clear that a very high level of engineering and foresight was needed to achieve the stability and efficiency that allows for millions of pixels created by a variety of cameras and applications to be packed into small, uniform files. However, much of the available official documentation for this process is either extremely brief or lacking real world examples; when it comes to procedures like ZRL encoding or Huffman table parsing, it takes more than a few sentences to get all of the details necessary to implement them. As such, I’ve created this repository using simple to understand functions written in Python with custom diagrams for all of the tricky sections. Hopefully this will be useful to anyone looking for an example of how the bytes are parsed in JPEG decoders.
This application provides creates a clean, minimal interface to use through flash cards that have a variable number of sides. I use them in particular for studying Chinese, which allows, for instance, having English, pinyin, characters, and parts of speech for any given word all on the same card. The visual for this is a cube, which I have animated to flip and spin to show the selected side of the cube while blurring the other sides. The webpage is hosted with AWS and using a Lambda function to store user data and accounts in DynamoDB tables.
3D graphics algorithms have reached a point where they can be implemented in pretty much every platform efficiently, but there was once a time where vertex buffers and pixel shaders just weren’t in the memory budget of the average computer. In these times, developers created some very clever methods of simulating 3D scenes and objects without actually calculating the distances normally necessary for such a visual. This small Java file implements one such method, 2D ray casting, to simulate a FPS view walking in a 3D maze. The entire file is around 160 lines with no 3D model, and I think gives an awesome effect for so little cost.