Color distortion in exported AVIF with transparency
GIMP version: 2.10.22
Operating System: Linux
Package: official Archlinux repo
Description of the bug
I created a test image (RGB 8-bit with alpha) with size 1x2 pixels only, where the upper pixel was fully transparent and the bottom one fully opaque with plain red color 'ff0000'. Exporting as AVIF using the 'Nearly lossless YUV420' produced a file where the top pixel is still fully transparent, but the bottom pixel is dark gray '4d4b4d'.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Create a test image with width 1 pixel, height 2 pixels, transparent, RGB 8-bit color.
- Color the bottom pixel to full red 'ff0000' with full opacity; leave the upper pixel transparent.
- Export as AVIF choosing the 'Nearly lossless YUV420' option
- Close the test image and open the AVIF file exported in the step above.
…
Expected result: Bottom pixel is red 'ff0000' or close
Actual result: Bottom pixel is gray '4d4b4d'
Additional information
If you have a backtrace for a crash or a warning, paste it here.