diff options
Diffstat (limited to 'src/plugins/imageformats/dds/qddshandler.cpp')
-rw-r--r-- | src/plugins/imageformats/dds/qddshandler.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp index 4d4d9d9..8dd5ed3 100644 --- a/src/plugins/imageformats/dds/qddshandler.cpp +++ b/src/plugins/imageformats/dds/qddshandler.cpp @@ -1316,6 +1316,26 @@ bool QDDSHandler::write(const QImage &outImage) return true; } +QVariant QDDSHandler::option(QImageIOHandler::ImageOption option) const +{ + if (!supportsOption(option) || !ensureHeaderCached()) + return QVariant(); + + switch (option) { + case QImageIOHandler::Size: + return QSize(m_header.width, m_header.height); + default: + break; + } + + return QVariant(); +} + +bool QDDSHandler::supportsOption(QImageIOHandler::ImageOption option) const +{ + return option == QImageIOHandler::Size; +} + int QDDSHandler::imageCount() const { if (!ensureHeaderCached()) |