Interactively edit individual DCT blocks in any JPEG image in the browser
github.com
github.com
I vaguely remember that PS's ‘save for web’ dialog actually had that.
I may also be mistaking this with settings for some filter or such—but I'm fairly sure it was a setting particularly for quality of something.
It was clunky and unreliable (estimating bandwidth quickly is hard!) but I really liked the way that the JPEG format allows you to increase the compression of a file without having to fully decompress and then recompress the image. You literally can just throw away some bits from the file here and there. I wonder if that is possible with other lossy data formats (video or audio)?
All later DCT-based formats try to get more compression by predicting future blocks from previous ones, which makes all blocks potentially interdependent, and distortions from such quick recompression could be amplified exponentially.
Now I wonder how color channels are added.
Example of an image split into three planes: https://upload.wikimedia.org/wikipedia/commons/d/d9/Barns_gr...
Often the chroma planes are stored at a smaller resolution and scaled up when decoding, since details in chroma don't matter as much as details in brightness.
I was (maybe quite unusually for a CS degree at the time) taught about JPEG compression in 94/95; I've carried a sort of bare-minimum working knowledge of how it works along with me through web development and semi-pro photography, and it can be quite useful knowledge (e.g. when optimising "retina" images for the web).
But I'd have loved an interactive tool like this at the time, because it is not the easiest thing to absorb.
https://en.wikipedia.org/wiki/YCbCr#/media/File:CCD.png
It's almost always 4:2:0. Then you compress the chroma channels the same way as the luma.
[1]: https://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_sy...
In contrast the lossy algorithms are about specifically what humans don't see well or don't care about. For example in vision humans don't see colours with the same accuracy as brightness because of how their vision works. When it comes to moving images, humans don't see as much detail at all when things are moving so you can blur them and humans barely notice. Humans care a lot about the details of human-like faces, and scarcely at all about grass or water. In audio humans can't really hear certain frequency combinations, so the quieter frequencies can sometimes just be omitted.