avif: prepare for breaking change in libavif

This commit is contained in:
Daniel Novomeský 2022-05-02 11:46:37 +02:00
parent cff2604cf9
commit ebcc34519c

View File

@ -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;
}