[v26] incorrect lossless encoding

Moderator: xnview

Kadet
Posts: 456
Joined: Thu Oct 20, 2022 7:23 pm

[v26] incorrect lossless encoding

Post by Kadet »

On XnPC, converting jpg to png gives the same CRC in pixel-level file comparison (Shift-C). The same file converted to png on XnMOBI gives a different CRC. After enlarging it, I can't visually notice the difference, but there must be a difference since there is a different CRC.
User avatar
xnview
Author of XnView
Posts: 48642
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [v26] incorrect lossless encoding

Post by xnview »

Please send me the original file and the one converted by XnView & XnMobile?
Kadet
Posts: 456
Joined: Thu Oct 20, 2022 7:23 pm

Re: [v26] incorrect lossless encoding

Post by Kadet »

xnview wrote: Tue Aug 04, 2026 5:53 am Please send me the original file and the one converted by XnView & XnMobile?
https://drive.google.com/file/d/1ahUyaS ... sp=sharing
User avatar
xnview
Author of XnView
Posts: 48642
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [v26] incorrect lossless encoding

Post by xnview »

i've check on XnView, and the CRC is different between original.jpg & xnview.png
Kadet
Posts: 456
Joined: Thu Oct 20, 2022 7:23 pm

Re: [v26] incorrect lossless encoding

Post by Kadet »

Hmm. It's my:
XnView CRC Screen-2026-08-05_14-52-03.jpg
I set read the JPG files method as Floating-point (if it makes any difference).

In my opinion, this is the right behavior to keep the CRC the same. Of course, it is true if the same JPG decoding method is used to covert and to compare.
You do not have the required permissions to view the files attached to this post.
Kadet
Posts: 456
Joined: Thu Oct 20, 2022 7:23 pm

Re: [v26] incorrect lossless encoding

Post by Kadet »

Kadet wrote: Wed Aug 05, 2026 12:56 pm I set read the JPG files method as Floating-point (if it makes any difference).
When I changed this setting now I have different CRC in compared function XnView on Windows.

This seems to explain everything. One method should be used to read (and encode?) JPG files. For me it should be Floating-point. Nowadays computers are so fast that others don't matter.
User avatar
xnview
Author of XnView
Posts: 48642
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [v26] incorrect lossless encoding

Post by xnview »

ok, now i understand. I've added settings for JPEG
Please check v28
Kadet
Posts: 456
Joined: Thu Oct 20, 2022 7:23 pm

Re: [v26] incorrect lossless encoding

Post by Kadet »

I set JPG reading to FP, but the CRC still does not match. It does not match any DCT reading method in XnPC at all.
User avatar
xnview
Author of XnView
Posts: 48642
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: [v26] incorrect lossless encoding

Post by xnview »

Kadet wrote: Thu Aug 06, 2026 7:37 pm I set JPG reading to FP, but the CRC still does not match. It does not match any DCT reading method in XnPC at all.
After some search, on ARM you can't get same CRC using 'float' as intel x64.