Wrong color profile conversion when saving a photo which has ICC profile

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

bodayw
Posts: 9
Joined: Mon Jan 02, 2023 7:55 am

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by bodayw »

xnview wrote: Tue Jun 20, 2023 8:21 am It's like that in 1.5.0 beta 1, the saved image keep original image data. you are on Windows? How to reproduce?
I had a more careful look and now I can confirm that it does keep the original image data, however, seems like there is a caching bug which confused me into thinking the issue is still there.

1.5.0 beta 1 now does save the original image data, but would keep a cache of the image somewhere (?) that has the wrong (shifted) color, so when re-open the saved image in XnView MP, it would appear to have wrong colors.

Yes I'm on Windows 10 22H2, and here is how to reproduce it:

- Unzip the 1.5.0 beta 1 archive, run it, and make sure "Use ICC profile for monitor" is enabled;
- Open a JPG file that doesn't have an embedded ICC profile;
- Save it as a PNG file with default "Write settings" to the same folder;
- Now switch back and forth between the original and saved images, they should appear to have same colors (FWIW this is also true in the current stable release, one needs to close and re-open the images to see the color difference);
- However, now close the open image, open it again in XnView MP, switch back and forth between the two, the colors would appear to be different;
- Open the two images in any other programs, with or without color management, colors are always the same, confirming the saved image does have the original image data;
- In Windows File Explorer, make a copy of the saved PNG file, give it a different file name, put it under the same folder, now open them in XnView MP and switch between the three files, the new copy of the PNG file would appear to have the same colors as the original, while the saved PNG still shows the wrong colors.

Given the two PNG files are exact copies (I even verified that they have the same SHA256 hash), I guess this is likely caused by the wrong image cache that XnView MP saved somewhere.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by xnview »

ok, the issue is related to 'Settings>View - Misc - cache'. will be fixed in b2
Pierre.
AndreasW
Posts: 73
Joined: Mon Jul 01, 2019 1:57 pm

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by AndreasW »

xnview wrote: Tue Jun 20, 2023 8:19 am
AndreasW wrote: Sat Jun 17, 2023 11:13 am 2. The menu "Color Profile" has not changed at all, which is surprising (to me), since you wrote that you made many changes. I would have expected the entry "user-defined" to be removed. I would have expected that XnView automatically, autonomously detects the monitor profile and applies it. That's what other viewers do, for example Apple's preview.
It will be changed in b2
I just tested beta 2. The dialog on macOS looks better now, see attached screenshot. The ICC profile that is shown under "System" is the right one. However, with the settings from the attached screenshot, the colors of my test image look like no ICC profile is used at all, i.e. no color management ==> bug!
Attachments
screenshot.png
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by xnview »

AndreasW wrote: Tue Jun 20, 2023 3:11 pm I just tested beta 2. The dialog on macOS looks better now, see attached screenshot. The ICC profile that is shown under "System" is the right one. However, with the settings from the attached screenshot, the colors of my test image look like no ICC profile is used at all, i.e. no color management ==> bug!
Could you send me an image sample? I've tried and it works...
Pierre.
AndreasW
Posts: 73
Joined: Mon Jul 01, 2019 1:57 pm

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by AndreasW »

xnview wrote: Tue Jun 20, 2023 3:14 pm
AndreasW wrote: Tue Jun 20, 2023 3:11 pm I just tested beta 2. The dialog on macOS looks better now, see attached screenshot. The ICC profile that is shown under "System" is the right one. However, with the settings from the attached screenshot, the colors of my test image look like no ICC profile is used at all, i.e. no color management ==> bug!
Could you send me an image sample? I've tried and it works...
Please find an image sample in the attachment. Beta 2 displays that image with over-saturated colors.
Attachments
Sample.jpg
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by xnview »

AndreasW wrote: Tue Jun 20, 2023 6:03 pm Please find an image sample in the attachment. Beta 2 displays that image with over-saturated colors.
Right, using system icc doesn't apply color profile. I contact you by PM
Pierre.
AndreasW
Posts: 73
Joined: Mon Jul 01, 2019 1:57 pm

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by AndreasW »

Thanks, I replied via PM.
AndreasW
Posts: 73
Joined: Mon Jul 01, 2019 1:57 pm

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by AndreasW »

The attached image is still displayed with wrong colors (over-saturated) in beta 3 on my Mac with Intel processor.
Attachments
Vierwaldstättersee.avif.zip
(127.67 KiB) Downloaded 39 times
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by xnview »

AndreasW wrote: Sat Jun 24, 2023 8:06 am The attached image is still displayed with wrong colors (over-saturated) in beta 3 on my Mac with Intel processor.
right, will be fixed in b4
Pierre.
AndreasW
Posts: 73
Joined: Mon Jul 01, 2019 1:57 pm

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by AndreasW »

xnview wrote: Mon Jun 26, 2023 2:52 pm right, will be fixed in b4
It's fine now in beta 4. Thank you very much!
bodayw
Posts: 9
Joined: Mon Jan 02, 2023 7:55 am

Re: Wrong color profile conversion when saving a photo which has ICC profile

Post by bodayw »

xnview wrote: Tue Jun 20, 2023 1:41 pm ok, the issue is related to 'Settings>View - Misc - cache'. will be fixed in b2
Just tested with beta 4, and happy to report everything seems working well. Thank you!
Post Reply