avif images created using imagemagick doesn't display on qt app using kde-frameworks/kimageformats qt plugins this is because imagemagick create yuv420 images, when libavif does only support yuv422 natively, and require libyuv to decode other formats https://invent.kde.org/frameworks/kimageformats/-/issues/8 Reproducible: Always Steps to Reproduce: 1. install requirements kimageformats, nomacs or kolourpaint 2. convert a portrait image (don't know why but landscape image works, maybe an issue of image size?) using imagemagick `convert image.jpg image.avif` 3. try to open it with nomacs or kolourpaint Actual Results: image is not decoded (libheif based app does decode the file) Expected Results: the file should be displayed using avifdec libavif tool the error displayed is : avifImageScale() called, but is unimplemented without libyuv! didn't found any libyuv ebuild information... so a libyuv package should be created and libavif must have a dependency on it
The root of the problem is bug in older libheif. Problem is with rotated images and that width and heigh are swapped. Firefox reject such images and Google Chrome apply unexpected scaling so that picture looks differently as intended. We have 1.15.2 version in Gentoo, that version has the bug. But after manually building libheif, the AVIF files with rotation are created correctly. Rotated AVIF created using libheif-1.15.2 are not correct. Enabling libyuv would help to display them, but the scaling (like what Chrome uses) would be performed, it would look much differently than original (because of swapped with and height after rotation). I recommend to upgrade libheif when possible and to re-generate the AVIF files again afterwards.