flâneur

What's In a JPEG?

blog.bithole.dev · 1,464 words · saved by 1 readers

The fascinating algorithms behind the quintessential image format

Recently, I set out to create my own photo organizer. In the process, I spent a lot of time experimenting with various image formats, which led me to an epiphany: JPEGs are ridiculously good at compressing image data, far beyond what you'd expect! Take this picture, for example: This poor cormorant has no idea what he's about to go through. This image is 299 by 400 pixels. Each pixel consists of three components, red, green, and blue. The brightness of each component is encoded as an 8-bit value, so each pixel contains three bytes of information. Multiply that by the number of pixels, and…

saved by

related reading