diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-12-27 20:36:37 +0100 |
---|---|---|
committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-01-06 14:26:00 +0100 |
commit | 16c32c6dfbca03a46d1a2bb87b6c1c365e6179d5 (patch) | |
tree | 9a0099f8b887ec33f1efee5af539be329c2f0aeb /src/gui/image/qjpeghandler.cpp | |
parent | 38a3158d2fe32dc55c6b6286fac58f782571294a (diff) |
JPEG: Fix reading of EXIF orientation.
The orientation is unsigned short, read it as such. In
JPEG-files created by Ricoh/Pentax cameras, the data is saved in
Motorola format. Reading the wrong data size will produce invalid
values when converting the byte order.
Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962
Task-number: QTBUG-43563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/gui/image/qjpeghandler.cpp')
-rw-r--r-- | src/gui/image/qjpeghandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index 87992bcced..9cf9947b6c 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -826,10 +826,10 @@ static int getExifOrientation(QByteArray &exifData) quint16 tag; quint16 type; quint32 components; - quint32 value; - - stream >> tag >> type >> components >> value; + quint16 value; + quint16 dummy; + stream >> tag >> type >> components >> value >> dummy; if (tag == 0x0112) { // Tag Exif.Image.Orientation if (components !=1) return -1; |