From 8b9125c913928f5a682b5518d377d1e3cd7f11f3 Mon Sep 17 00:00:00 2001 From: Daniel Novomesky Date: Mon, 8 Feb 2021 10:00:53 +0100 Subject: [PATCH] Quality option can be returned without parsing input file. --- src/imageformats/avif.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp index 33c32d2..eb9fe16 100644 --- a/src/imageformats/avif.cpp +++ b/src/imageformats/avif.cpp @@ -722,13 +722,15 @@ bool QAVIFHandler::write(const QImage &image) QVariant QAVIFHandler::option(ImageOption option) const { + if (option == Quality) { + return m_quality; + } + if (!supportsOption(option) || !ensureParsed()) { return QVariant(); } switch (option) { - case Quality: - return m_quality; case Size: return m_current_image.size(); case Animation: