BUG: AVIF, WEBP - Conversion

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

BUG: AVIF, WEBP - Conversion

Post by Rosh »

When I convert a .PNG file (with an Alpha Channel), to AVIF [LossLESS] format, and then re-compared the result Pixel by Pixel (using software techniques), the AVIF [LossLESS] format alters the parts of the image. Change is Not visually perceivable.

To make SURE, double check: I converted the original .PNG (again) and the AVIF to .PNG format (same settings). Then I did a Binary compare on the conversion produced .PNG files, they were different!

Happens with most image files (usually on the Alpha Channel affected sections)

I have attached the image files (in a .ZIP file)


Visual comparison (Pixel by Pixel),

Top-Left: Original PNG
Top-Right: AVIF
Bottom: Pixel Changes
Comparison.png


UPDATE:

Same behaviour for conversion to WebP
You do not have the required permissions to view the files attached to this post.
Last edited by Rosh on Mon Jul 01, 2024 9:28 am, edited 1 time in total.
User avatar
xnview
Author of XnView
Posts: 44817
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: AVIF - Conversion

Post by xnview »

I confirm that output to AVIF/HEIF in lossless is not binary equivalent. I need to check libheif...
Pierre.
Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Rosh »

Also the same for conversion to .WEBP (I encountered).

And maybe more formats ? (I have not checked them all). Maybe you can do some through checking.
User avatar
xnview
Author of XnView
Posts: 44817
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: AVIF, WEBP - Conversion

Post by xnview »

Rosh wrote: Mon Jul 01, 2024 9:27 am Also the same for conversion to .WEBP (I encountered).
?

For AVIF/HEIC, it's perhaps due to color space conversion...
Pierre.
Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Rosh »

The problem also happens when going from PNG to WEBP [LossLESS]. In WebP There are changes (not True LossLESS).
Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Rosh »

xnview wrote: Mon Jul 01, 2024 11:50 am
Rosh wrote: Mon Jul 01, 2024 9:27 am Also the same for conversion to .WEBP (I encountered).
For AVIF/HEIC, it's perhaps due to color space conversion...

Look at the Comparison preview image, at the section that should be 100 percent transparent. Note that the image indicated that different part of the transparency are affected differently. Since all pixels were 100 percent transparent (or white if not) - I may not be due to colour space conversion, because if it was, then the in the preview the 100 percent tranparency area should not have a 'pattern', rather should be solid change in colour.
User avatar
xnview
Author of XnView
Posts: 44817
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: AVIF, WEBP - Conversion

Post by xnview »

do you see same thing with 24bits image?
Pierre.
Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Rosh »

I only tried with 24-Bit images (with Alpha Channel). I.e. the example I attached previously.

Some other formats work fine, i.e. PNG to PNG does not alter.
Danny
Posts: 578
Joined: Sat Sep 04, 2004 5:09 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Danny »

AFAIK that's expected, because AVIF isn't actually 100% lossless per definition; only visually. Simply because there's always a YUV <-> RGB conversion happening when you open/save an image.

It's only lossless in the sense that, if you open an AVIF file, change only part of it and then save it again, the parts that didn't change should be 100% identical to before. That likely won't be the case, if there was a color mode conversion (PNG is RGB).
Get the bugs fixed, THEN start adding features. It sucks, but someone has to do it.
Rosh
Posts: 6
Joined: Wed Jun 26, 2024 3:29 pm

Re: BUG: AVIF, WEBP - Conversion

Post by Rosh »

Danny wrote: Fri Jul 05, 2024 9:55 am AFAIK that's expected, because AVIF isn't actually 100% lossless per definition; only visually. Simply because there's always a YUV <-> RGB conversion happening when you open/save an image.

It's only lossless in the sense that, if you open an AVIF file, change only part of it and then save it again, the parts that didn't change should be 100% identical to before. That likely won't be the case, if there was a color mode conversion (PNG is RGB).
Then... why the 'pattern' effect in the 100 percent transparent area, in the comparison image (first post).