summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/jpeg/qjpeghandler.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-12-23 01:48:55 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-12-23 04:07:03 (GMT)
commit762496dba277f31e55a216c9761a51bf306adec0 (patch)
treef8dfd3b8d475545b19051453fc096723a6b7f9bb /src/plugins/imageformats/jpeg/qjpeghandler.h
parentbe2acbcd6cfbaa75b502157061c385129e8f0b35 (diff)
downloadQt-762496dba277f31e55a216c9761a51bf306adec0.zip
Qt-762496dba277f31e55a216c9761a51bf306adec0.tar.gz
Qt-762496dba277f31e55a216c9761a51bf306adec0.tar.bz2
Add support for ClipRect to the jpeg image plugin
The jpeg is read and scanlines discarded until the clip region is found (libjpeg doesn't support direct seeking). This is faster than the previous approach of reading the entire jpeg and then clipping. Task-number: QT-2023 Reviewed-by: Sarah Smith Reviewed-by: Daniel Pope
Diffstat (limited to 'src/plugins/imageformats/jpeg/qjpeghandler.h')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.h b/src/plugins/imageformats/jpeg/qjpeghandler.h
index 0a14a88..108b131 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.h
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.h
@@ -44,6 +44,7 @@
#include <QtGui/qimageiohandler.h>
#include <QtCore/QSize>
+#include <QtCore/QRect>
QT_BEGIN_NAMESPACE
@@ -67,6 +68,7 @@ public:
private:
int quality;
QSize scaledSize;
+ QRect clipRect;
};
QT_END_NAMESPACE