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
UPDATE:
Same behaviour for conversion to WebP
BUG: AVIF, WEBP - Conversion
Moderators: XnTriq, helmut, xnview, Dreamer
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
BUG: AVIF, WEBP - Conversion
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.
-
- Author of XnView
- Posts: 44817
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: BUG: AVIF - Conversion
I confirm that output to AVIF/HEIF in lossless is not binary equivalent. I need to check libheif...
Pierre.
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
Re: BUG: AVIF, WEBP - Conversion
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.
And maybe more formats ? (I have not checked them all). Maybe you can do some through checking.
-
- Author of XnView
- Posts: 44817
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: BUG: AVIF, WEBP - Conversion
?
For AVIF/HEIC, it's perhaps due to color space conversion...
Pierre.
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
Re: BUG: AVIF, WEBP - Conversion
The problem also happens when going from PNG to WEBP [LossLESS]. In WebP There are changes (not True LossLESS).
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
Re: BUG: AVIF, WEBP - 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.
-
- Author of XnView
- Posts: 44817
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
Re: BUG: AVIF, WEBP - Conversion
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.
Some other formats work fine, i.e. PNG to PNG does not alter.
-
- Posts: 578
- Joined: Sat Sep 04, 2004 5:09 pm
Re: BUG: AVIF, WEBP - Conversion
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).
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.
-
- Posts: 6
- Joined: Wed Jun 26, 2024 3:29 pm
Re: BUG: AVIF, WEBP - Conversion
Then... why the 'pattern' effect in the 100 percent transparent area, in the comparison image (first post).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).