summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimageiohandler.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-04 13:32:32 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-12 09:25:11 +0000
commitba323b04cd78fb43e9e63b891e973d24b08250af (patch)
tree8ad4da1eaf991f061d3e24159a3a5b4fdaf8fbfa /src/gui/image/qimageiohandler.h
parent12dd4ff7e7b4fae33fb74def603ce880eee0c16b (diff)
Optionally apply orientation on QImage read
Make it possible to read images with EXIF orientation automatically applied. This was originally implemented without opt-out in Qt 5.4, but reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF to keep behavioral consistency. The EXIF support for JPEG was written by Rainer Keller. [ChangeLog][QtGui][Image plugins] An option has been added to QImageReader to enable automatic application of EXIF orientation. This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2. Task-number: QTBUG-37946 Task-number: QTBUG-43563 Task-number: QTBUG-45552 Task-number: QTBUG-45865 Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/image/qimageiohandler.h')
-rw-r--r--src/gui/image/qimageiohandler.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index b48226f619..80cd87c4c3 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -86,8 +86,25 @@ public:
ImageFormat,
SupportedSubTypes,
OptimizedWrite,
- ProgressiveScanWrite
+ ProgressiveScanWrite,
+ ImageTransformation
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ , TransformedByDefault
+#endif
};
+
+ enum Transformation {
+ TransformationNone = 0,
+ TransformationMirror = 1,
+ TransformationFlip = 2,
+ TransformationRotate180 = TransformationMirror | TransformationFlip,
+ TransformationRotate90 = 4,
+ TransformationMirrorAndRotate90 = TransformationMirror | TransformationRotate90,
+ TransformationFlipAndRotate90 = TransformationFlip | TransformationRotate90,
+ TransformationRotate270 = TransformationRotate180 | TransformationRotate90
+ };
+ Q_DECLARE_FLAGS(Transformations, Transformation)
+
virtual QVariant option(ImageOption option) const;
virtual void setOption(ImageOption option, const QVariant &value);
virtual bool supportsOption(ImageOption option) const;