jpegli XYB : lossless crop wrecks colour

*** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: xnview, Dreamer

meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

The attached was saved XYB Jpegli 4-4-4 progressive (XNView 1.9.5)
When a lossless crop is applied the colours are messed up. In non-XYB form this doesn't happen. Lossless rotations are fine.
So I think either the issue needs fixing or the lossless cropping of affected formats needs to be blocked (at least until fixed).

I notice there's a discussion of XYB colour space at viewtopic.php?t=48869 but I think that is unrelated to this issue

Cheers, David
You do not have the required permissions to view the files attached to this post.
Kadet
Posts: 230
Joined: Thu Oct 20, 2022 7:23 pm

Re: jpegli XYB : lossless crop wrecks colour

Post by Kadet »

You must use XYB encoding carefully because not all programs decode it correctly in jpeg's files. E.g. Browsers do it well, but converters in WordPress or Joomla do it incorrectly. I would hold off on using XYB for the next year or two.
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

Thanks - yes I noticed the same thing! I'm wavering as to what is the best course.
I don't mind too much what other programs do so long as I have the tools myself, since my photos are used for botanical study and as I have rather a lot I need them to remain clear yet a minimum of size... that said I share them also... if I could tell the trajectory of things it would help, as it would be fine to XYB them now and then 2 years down the line XYB becomes normalised.
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

1.9.6 now works for me
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

Since (it seems) the resolution of the other slow cropping speed matter, cropping an XYB image now destroys the colour again - 1.9.9
User avatar
xnview
Author of XnView
Posts: 47538
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: jpegli XYB : lossless crop wrecks colour

Post by xnview »

meteorquake wrote: Sun Feb 01, 2026 9:25 am Since (it seems) the resolution of the other slow cropping speed matter, cropping an XYB image now destroys the colour again - 1.9.9
??
Pierre.
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

If you have a jpegli XYB, when you do a lossless crop it loses the colour palette and the colour comes out wrongly.
This seems to be a reversion, in my comment above for 1.9.6 I had indicated it had become fixed.
User avatar
xnview
Author of XnView
Posts: 47538
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: jpegli XYB : lossless crop wrecks colour

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 47538
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: jpegli XYB : lossless crop wrecks colour

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.10.1. Please check and confirm the bug fix here.
Pierre.
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

For this one, using the ZIP, it does now retain the colour but it seems to run considerably slower than non-XYB lossless crop. I would have expected them to be comparable in timing?
This can be tested by taking a picture and saving JPEGLI with and without XYB and running a crop on each, their cropping time is notably different.
User avatar
xnview
Author of XnView
Posts: 47538
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: jpegli XYB : lossless crop wrecks colour

Post by xnview »

meteorquake wrote: Tue Feb 24, 2026 10:46 am For this one, using the ZIP, it does now retain the colour but it seems to run considerably slower than non-XYB lossless crop. I would have expected them to be comparable in timing?
For XYB file i use Exiftool, i have a problem with my own code...
Pierre.
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

That's fine then - I think it's more important that it's there and operating, despite being slower, the speed can then be improved at leisure, so I wouldn't let the speed hold back its release, but simply put the speed issue onto some todo list for whenever the mood arises to improve it.

Many thanks for doing the fix!

David
meteorquake
Posts: 147
Joined: Wed Sep 13, 2023 9:37 am

Re: jpegli XYB : lossless crop wrecks colour

Post by meteorquake »

There is an issue remaining, which is a broken thumbnail.
In cropping a file
https://www.dcode.fr/exif-thumbnail -- shows no thumbnail
https://jimpl.com/results/eBNaKyZdNhWwe ... arget=exif -- indicates thumbnail data is present
Explorer/Everything - shows a broken thumbnail, with top half showing, lower half grey

I attach sample croppings showing this, the pictures themself are fine, just the thumbnails
You do not have the required permissions to view the files attached to this post.