mozilla / mozjpeg

Improved JPEG encoder.
Other
5.47k stars 414 forks source link

Is compatibility with Adobe Photoshop mandatory? #29

Closed frkay closed 10 years ago

frkay commented 10 years ago

When I wrote JSK to show the different JPEG scans I quickly discovered that Adobe Photoshop CS5 (and CS6 at least) was unable to decode some JPEGs like the one included here (if I'm right the problem comes from the non-interleaved first scan, it holds only Y). So is the compatibility target restricted to web browsers or larger i.e. including well-known software like Photoshop (which unfortunately is a bit crappy)?

Custom progressive scan used to produce it: 0: 0-0, 0, 0 ; # DC coefficients Y 0: 1-5, 0, 0 ; # 5 first AC coefficients Y 1,2: 0-0, 0, 0 ; # Interleaved DC scan Cb & Cr 0: 6-27, 0, 0 ; # 22 more Y 1: 1-14, 0, 0 ; # 14 first AC coefficients Cb 2: 1-14, 0, 0 ; # 14 first AC coefficients Cr 0: 28-63, 0, 0 ; # Remaining Y coefficients 1: 15-63, 0, 0 ; # Remaining Cb coefficients 2: 15-63, 0, 0 ; # Remaining Cr coefficients

snap

bdaehlie commented 10 years ago

We should not break compatibility with Photoshop. Not breaking compat is a major goal for this project, and Photoshop is important.