Page 1 of 1

1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Wed Sep 04, 2024 3:10 pm
by lffs
XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.
See the screenshot, below.
On the left is the original image.
In the middle is the image created by XnView MP (check Convert to XYB colorspace in Options).
On the right is the image created by cjpegli.exe, a command line tool provided by libjxl.
screen.jpg
It can be seen that the quality of the image created by XnView MP is not good.

Windows 11 23H2 x64
XnView MP 1.8.0 64-bit

A sample image will be attached below:
sample.zip
(77.85 KiB) Downloaded 145 times

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Wed Sep 04, 2024 4:26 pm
by Kadet
You set in XnView coding 2x2, 1x1, 1x1.
Look on file size and info about file.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Sat Sep 07, 2024 2:39 am
by lffs
Kadet wrote: Wed Sep 04, 2024 4:26 pm You set in XnView coding 2x2, 1x1, 1x1.
Look on file size and info about file.
I'm not sure if this is the key to the problem as cjpegli.exe also saves Subsampling as 2x2,1x1,1x1.
I set the quality to 90%, but the quality of the output image is still poor, as you can see from the screenshot of the file size, or by downloading the sample image.
The file size saved by Xnview MP is 15KB, the file size saved by cjpegli.exe is about 33KB, and the original image is about 40KB.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Sat Sep 07, 2024 9:32 am
by Kadet
You have right. When in XnView is set 2x2 where is some bug. But 1x1 give the same image as in cjpegli.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Mon Sep 09, 2024 11:45 am
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.

4:2:0 is inversed with 4:2:2

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Tue Sep 10, 2024 8:40 pm
by WinnieW
Color subsampling is for YUV colorspace in JPEG only, XYB colorspace should be used without any subsampling.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Thu Oct 10, 2024 2:37 pm
by xnview
This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Thu Oct 10, 2024 3:20 pm
by lffs
xnview wrote: Thu Oct 10, 2024 2:37 pm This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.
fix confirmed. thank you.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Thu Oct 10, 2024 7:08 pm
by Kadet
xnview wrote: Thu Oct 10, 2024 2:37 pm This problem is supposed to be fixed in XnView MP 1.8.1. Please check and confirm the bug fix here.
No, problem still is. Settings 422 and 420 give the worst compression against to cjpegli.
JPGLI_Screen-2024-10-10_20-47-51.jpg
And 422 give 420 in output file, and 420 make 422 jpeg file.

Source file:
seria2.png
seria2.png (26.84 KiB) Viewed 2887 times
Edit: I set quality on 91.

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Fri Oct 11, 2024 6:43 am
by xnview
Kadet wrote: Thu Oct 10, 2024 7:08 pm No, problem still is. Settings 422 and 420 give the worst compression against to cjpegli.
I have the same as cjpegli, it seems that you dont use --xyb

Re: 1.8.0: (JPEGLI) XYB cororspace images created by XnView MP using JPEGLI encoding are very blurry.

Posted: Fri Oct 11, 2024 8:01 am
by Kadet
xnview wrote: Fri Oct 11, 2024 6:43 am
Kadet wrote: Thu Oct 10, 2024 7:08 pm No, problem still is. Settings 422 and 420 give the worst compression against to cjpegli.
I have the same as cjpegli, it seems that you dont use --xyb
It doesn't make a difference if I used or not xyb in XnView — yesterday.
But today you are right, there is a quality difference whether I set xyb in XnView, I forgot to set xyb in cjpegli and now I have basically similar results (the difference of a few bytes is due to the newer version of cjpegli).
Sorry, I may have mixed something up yesterday.