by audrey1 · 2y ago · 0 comments
I modified jpegtran to work as a dll and wrote a python wrapper for it for a project so I could use it in a small-image compression pipeline (due to several limitations with calling the binary). I needed to save a few hundred million 100x100 jpegs, so I overwrite the height/width to trick the decoder into thinking the edge blocks are full, then I stitch them into ~10x10 mega-images with my jpegtran wrapper, requantize with mozjpeg, then recompress with dropbox lepton, it saves about 20-30% overall, with each step saving about 10% each (the stitching benefits the lepton step). https://i.imgur.com/6PV5WDM.jpeg