Comment

Comment by saturncoleus

It looks like this binary searches across the Go quality levels to find acceptable quality. This isn't a bad idea, but it won't be fruitful. The Go standard library JPEG encoder is pretty basic, and reuses the quant tables from the spec. It also doesn't optimize the huffman tables, so the pics are typically 10% bigger than they need to be.

This idea, taken to the extreme is mozjpeg. It is really advanced and can take advantage of a lot of cool tricks (like trellis optimization) in order to get the absolute best quality for the size.

https://github.com/mozilla/mozjpeg

parent saturncoleus 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton