akino_germany Posted January 4, 2022 Share Posted January 4, 2022 (edited) If you open a PNG (rose_eciRGB.png) with an embedded ICC profile (eciRGB v2) and then save it as a PNG (rose_pdn.png), applications using libpng (like ImageMagick) complain about "invalid chromaticities" in the cHRM chunk. The embedded ICC profile is gone as well. This doesn't happen when saving as a JPEG. Edit: I'm using v4.3.6 but this has happened since at least v4.2.16 PS testImages> magick.exe identify .\rose_eciRGB.png .\rose_eciRGB.png PNG 70x46 70x46+0+0 8-bit sRGB 10840B 0.000u 0:00.000 PS testImages> magick.exe identify .\rose_pdn.png .\rose_pdn.png PNG 70x46 70x46+0+0 8-bit sRGB 9060B 0.016u 0:00.011 identify: cHRM: invalid chromaticities `.\rose_pdn.png' @ warning/png.c/MagickPNGWarningHandler/1746. Edited January 4, 2022 by akino_germany version information Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 4, 2022 Share Posted January 4, 2022 Thanks, I'll check into it for the 4.4 release. It may just be a bug in WIC (Windows Imaging Component), but I've been able to work around many of those in the past. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
akino_germany Posted January 5, 2022 Author Share Posted January 5, 2022 I think the main issue is accuracy. The chromaticities calculated by paint.NET from the ICC profile are a little off compared to the chromaticities used to define the profile in the first place: paint.NET eciRGB White x: 0.34576 0.34567 White y: 0.35858 0.35850 Red x: 0.67002 0.67 Red y: 0.33001 0.33 Green x: 0.20998 0.21 Green y: 0.71005 0.71 Blue x: 0.14000 0.14 Blue y: 0.08002 0.08 The sum of the Red x and y components is greater than 1, which they are not supposed to, hence the complaint from libpng. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 5, 2022 Share Posted January 5, 2022 Well then that's almost certainly a WIC bug. Paint.NET doesn't do any calculations with the color profile, it's only supposed to read and preserve this data. WIC is probably storing it with insufficient precision, or converting to floating point, or something like that. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.