mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 03:54:18 -04:00
Support libavif 1.0
Make cmake find libavif 1.0 and adapt to API changes (which is reverting to pre 0.9.2 API)
(cherry picked from commit 4badb3088e
)
This commit is contained in:
committed by
Albert Astals Cid
parent
66cb8c91d0
commit
bcec942cc9
@ -51,7 +51,10 @@ set_package_properties(OpenEXR PROPERTIES
|
|||||||
PURPOSE "Required for the QImage plugin for OpenEXR images"
|
PURPOSE "Required for the QImage plugin for OpenEXR images"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(libavif 0.8.2 CONFIG)
|
find_package(libavif 0.8.2 CONFIG QUIET)
|
||||||
|
if(NOT libavif_FOUND)
|
||||||
|
find_package(libavif 1 CONFIG)
|
||||||
|
endif()
|
||||||
set_package_properties(libavif PROPERTIES
|
set_package_properties(libavif PROPERTIES
|
||||||
TYPE OPTIONAL
|
TYPE OPTIONAL
|
||||||
PURPOSE "Required for the QImage plugin for AVIF images"
|
PURPOSE "Required for the QImage plugin for AVIF images"
|
||||||
|
@ -424,7 +424,7 @@ bool QAVIFHandler::decode_one_frame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_decoder->image->transformFlags & AVIF_TRANSFORM_IMIR) {
|
if (m_decoder->image->transformFlags & AVIF_TRANSFORM_IMIR) {
|
||||||
#if AVIF_VERSION > 90100
|
#if AVIF_VERSION > 90100 && AVIF_VERSION < 1000000
|
||||||
switch (m_decoder->image->imir.mode) {
|
switch (m_decoder->image->imir.mode) {
|
||||||
#else
|
#else
|
||||||
switch (m_decoder->image->imir.axis) {
|
switch (m_decoder->image->imir.axis) {
|
||||||
|
Reference in New Issue
Block a user