rflynn / imgmin

Lossy image optimization
MIT License
650 stars 32 forks source link

Use structural similarity #30

Closed kornelski closed 9 years ago

kornelski commented 10 years ago

I've made my SSIM implementaiton usable directly in C (ignore the CLI tool that reads PNG, just set bitmaps directly via C API).

This is much more accurate than ImageMagick's MSE metric.

It may even be faster, because my implementation doesn't need to re-decode source image (you can set it once and only swap modified version).

rflynn commented 10 years ago

Thank you, this is terrific. I was aware of SSIM when I wrote imgmin but ImageMagick didn't have it available at the time. This is likely the single biggest improvement than can be made to imgmin, I want to add it when I have time.

ptz0n commented 10 years ago

Sounds like amazing sauce. :+1:

kornelski commented 10 years ago

I've refactored dssim to make integration faster/easier. Here's my attempt: https://github.com/pornel/imgmin/tree/newdssim