summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/shared/qiiofhelpers_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/imageformats/shared/qiiofhelpers_p.h')
-rw-r--r--src/plugins/imageformats/shared/qiiofhelpers_p.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/imageformats/shared/qiiofhelpers_p.h b/src/plugins/imageformats/shared/qiiofhelpers_p.h
index da51731..1b1771b 100644
--- a/src/plugins/imageformats/shared/qiiofhelpers_p.h
+++ b/src/plugins/imageformats/shared/qiiofhelpers_p.h
@@ -52,6 +52,9 @@
//
#include <QImageIOPlugin>
+#include <private/qcore_mac_p.h>
+#include <ImageIO/ImageIO.h>
+#include <QVector>
QT_BEGIN_NAMESPACE
@@ -67,6 +70,27 @@ public:
static bool writeImage(QImageIOHandler *q_ptr, const QImage &in, const QString &uti);
};
+class QIIOFHelper
+{
+public:
+ QIIOFHelper(QImageIOHandler *q);
+
+ bool readImage(QImage *out);
+ bool writeImage(const QImage &in, const QString &uti);
+ QVariant imageProperty(QImageIOHandler::ImageOption option);
+ void setOption(QImageIOHandler::ImageOption option, const QVariant &value);
+
+protected:
+ bool initRead();
+ bool getIntProperty(CFStringRef property, int *value);
+
+ QImageIOHandler *q_ptr = nullptr;
+ QVector<QVariant> writeOptions;
+ QCFType<CGDataProviderRef> cgDataProvider = nullptr;
+ QCFType<CGImageSourceRef> cgImageSource = nullptr;
+ QCFType<CFDictionaryRef> cfImageDict = nullptr;
+};
+
QT_END_NAMESPACE
#endif