From ebcc34519c77d3c69ed44ff801fab0ca5cd0f9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= Date: Mon, 2 May 2022 11:46:37 +0200 Subject: [PATCH] avif: prepare for breaking change in libavif --- src/imageformats/avif.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp index 399db29..0225af3 100644 --- a/src/imageformats/avif.cpp +++ b/src/imageformats/avif.cpp @@ -724,9 +724,7 @@ bool QAVIFHandler::write(const QImage &image) if (save_depth > 8) { // 10bit depth rgb.depth = 16; - if (tmpcolorimage.hasAlphaChannel()) { - avif->alphaRange = AVIF_RANGE_FULL; - } else { + if (!tmpcolorimage.hasAlphaChannel()) { rgb.ignoreAlpha = AVIF_TRUE; } @@ -736,7 +734,6 @@ bool QAVIFHandler::write(const QImage &image) if (tmpcolorimage.hasAlphaChannel()) { rgb.format = AVIF_RGB_FORMAT_RGBA; - avif->alphaRange = AVIF_RANGE_FULL; } else { rgb.format = AVIF_RGB_FORMAT_RGB; }