Page 1 of 1
JPEG-XL save dialog wrong color
Posted: Wed Dec 14, 2022 5:53 pm
by wupi
XnView: MP Windows Version 1.4.0 64bits
OS: Windows 10 64bit
When i save a JPEG-XL with the save dialog, i get a slightly wrong colored photo, saved with batch it is normal.
Effect: wrong colors
Here a the sample photos.
https://0x777.de/xnview/
Re: JPEG-XL save dialog wrong color
Posted: Wed Dec 14, 2022 6:57 pm
by masterjp
Hello Wupi,
I checked your sample image and your saved jxl files.
Generally you are right, that there are small different colors in the saved jxl picture from 'save as' dialog.
XnviewMP is not the cause of your problem. The jpeg xl library for saving or your compression settings are the reason!
I compared your both jxl files and detect a small file size difference.
You used different compression settings! In most cases the compression effort (=efficiency) is the problem.
All dialogs in XnviewMP (batch conversion, file export and save as) have their own jpeg xl settings for saving!
Reason for different colors:
JPEG XL is a new picture format, which use other color systems (RGB, HSL, etc.) than other picture formats (jpeg, etc.).
So it is possible, that your saved jxl picture get slightly different colors than your original jpeg file.
You will get this behaviour, if you use a lower compression effort (possible levels 1-9) for saving your jxl file.
I usually use level 7-9 for good results to prevent this color problem. Level 7-9 will be not very fast, but the file size is the smallest under the same compression quality condition.
Re: JPEG-XL save dialog wrong color
Posted: Wed Dec 14, 2022 7:10 pm
by wupi
masterjp wrote: Wed Dec 14, 2022 6:57 pm
You used different compression settings! In most cases the compression effort (=efficiency) is the problem.
Nope, its 7 and quality 85 on booth photos.
I tried lossless compression 7 and the colors are as expected on booth photos. They have also a different filesize.

The hex comparison shows two completely different files, lossless files should be identical with the same settings.
Re: JPEG-XL save dialog wrong color
Posted: Wed Dec 14, 2022 8:56 pm
by masterjp
I did the same test with your testfile under your conditions (Quality 85% and Effort 7).
Both files (Batch and save as) have the same filesize and there are no color changes.
The color of both files match with the original jpeg.
I think you did not use the same settings for saving.
Re: JPEG-XL save dialog wrong color
Posted: Wed Dec 14, 2022 10:28 pm
by wupi
Looks like the sRGB option alters the saved file but only when is use the save dialog.
Re: JPEG-XL save dialog wrong color
Posted: Thu Dec 15, 2022 8:44 am
by masterjp
Interesting. I don't use icm profiles, because I thought Windows use them for all programs.
Is your display calibrated with a software or is it a file from your display driver?
I used an older Spyder calibration device to calibrate my display.
Maybe it is better to use the icm profile with in windows and not in XnviewMP.
Re: JPEG-XL save dialog wrong color
Posted: Thu Dec 15, 2022 9:05 am
by xnview
When using ICC profile, you change the data of picture (edit mode)