ruven / iipsrv

iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images.
https://iipimage.sourceforge.io
GNU General Public License v3.0
292 stars 115 forks source link

ProPhoto RGB and PNG output problem #239

Closed altert closed 2 years ago

altert commented 2 years ago

It seems that for sources with ProPhoto RGB icc profile embedded iipimage 1.2 fails to deliver PNG images with profile attached. Same image with CVT=JPG is displayed correctly, but with CVT=PNG it fails (silently, nothing in log) Same problem manifests itself if I'm using IIIF protocol

ruven commented 2 years ago

Do you have an example image I could test?

altert commented 2 years ago

_DSF1570 I've redownloaded the image to test and attached file retains profile

altert commented 2 years ago

and here is tiled tiff created by vips that was the actual source tiled.tif.zip

ruven commented 2 years ago

This was in fact caused by your ProPhoto profile not fully following the ICC specification. The latest version of the libpng library now checks for ICC profile correctness and will reject any that are incorrect. Fortunately, there's a way to disable these checks and I've submitted a fix (https://github.com/ruven/iipsrv/commit/eb00e889f5dac624ae4829c605449cdd74a75116) that should allow your images to work.

altert commented 2 years ago

Thank you very much! I've installed new version and it works great. Interestingly, I've assigned prophoto rgb profile using Adobe Photoshop and MacOS preview, that's why I didn't expect malformed profile result.