Settings

Theme

Show HN: Smlr – re-encode jpegs using butteraugli visual quality measurement

github.com

53 points by jasonmoo 10 years ago · 5 comments

Reader

saturncoleus 10 years ago

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

  • ZeroGravitas 10 years ago

    There's an existing tool that does this and uses mozjpeg.

    It's called jpeg-recompress and is part of the jpeg-archive project on Github.

    It currently can use mean-pixel-error, SSIM (the default), MS-SSIM and SmallFry (an implementation of the patented algorithm used by the JPEG mini app). So they may be open to adding this new comparison algorithm too.

    edit: someone already filed an issue asking them to look at it:

    https://github.com/danielgtaylor/jpeg-archive/issues/40

  • jsguy 10 years ago

    Yeah I got it running - not encouraging results - image sizes grew by about 10%.

peternicky 10 years ago

First thing that popped into my head when reading this title was Silicon Valley.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection