summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-02-16 15:48:28 (GMT)
committeraavit <qt-info@nokia.com>2010-02-16 16:01:58 (GMT)
commit17f09a9fbac47949fdcc08f4e929ba006561a742 (patch)
tree47d1ee80ddbcce3b3a67d7be013a876aa900ed38 /src/plugins/imageformats
parent6942ee49314b9619ac21acfde165124ac2a36f80 (diff)
downloadQt-17f09a9fbac47949fdcc08f4e929ba006561a742.zip
Qt-17f09a9fbac47949fdcc08f4e929ba006561a742.tar.gz
Qt-17f09a9fbac47949fdcc08f4e929ba006561a742.tar.bz2
Update license doc, .pro file and qjpeghandler for libjpeg 8
In libjpeg versions >= 7, the default unit-scaling when decompressing is given as 8/8 instead of 1/1.
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro13
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
index ebc79cc..fac5e23 100644
--- a/src/plugins/imageformats/jpeg/jpeg.pro
+++ b/src/plugins/imageformats/jpeg/jpeg.pro
@@ -19,6 +19,11 @@ symbian: {
TARGET.UID3=0x2001E61B
}
+contains(QMAKE_CC, gcc): {
+ #Disable warnings in 3rdparty code due to unused arguments
+ QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
+}
+
contains(QT_CONFIG, system-jpeg) {
unix:LIBS += -ljpeg
win32:LIBS += libjpeg.lib
@@ -26,8 +31,10 @@ contains(QT_CONFIG, system-jpeg) {
!contains(QT_CONFIG, system-jpeg) {
INCLUDEPATH += ../../../3rdparty/libjpeg
SOURCES += \
+ ../../../3rdparty/libjpeg/jaricom.c \
../../../3rdparty/libjpeg/jcapimin.c \
../../../3rdparty/libjpeg/jcapistd.c \
+ ../../../3rdparty/libjpeg/jcarith.c \
../../../3rdparty/libjpeg/jccoefct.c \
../../../3rdparty/libjpeg/jccolor.c \
../../../3rdparty/libjpeg/jcdctmgr.c \
@@ -38,12 +45,12 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jcmaster.c \
../../../3rdparty/libjpeg/jcomapi.c \
../../../3rdparty/libjpeg/jcparam.c \
- ../../../3rdparty/libjpeg/jcphuff.c \
../../../3rdparty/libjpeg/jcprepct.c \
../../../3rdparty/libjpeg/jcsample.c \
../../../3rdparty/libjpeg/jctrans.c \
../../../3rdparty/libjpeg/jdapimin.c \
../../../3rdparty/libjpeg/jdapistd.c \
+ ../../../3rdparty/libjpeg/jdarith.c \
../../../3rdparty/libjpeg/jdatadst.c \
../../../3rdparty/libjpeg/jdatasrc.c \
../../../3rdparty/libjpeg/jdcoefct.c \
@@ -55,7 +62,6 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jdmarker.c \
../../../3rdparty/libjpeg/jdmaster.c \
../../../3rdparty/libjpeg/jdmerge.c \
- ../../../3rdparty/libjpeg/jdphuff.c \
../../../3rdparty/libjpeg/jdpostct.c \
../../../3rdparty/libjpeg/jdsample.c \
../../../3rdparty/libjpeg/jdtrans.c \
@@ -66,11 +72,10 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jidctflt.c \
../../../3rdparty/libjpeg/jidctfst.c \
../../../3rdparty/libjpeg/jidctint.c \
- ../../../3rdparty/libjpeg/jidctred.c \
- ../../../3rdparty/libjpeg/jmemmgr.c \
../../../3rdparty/libjpeg/jquant1.c \
../../../3rdparty/libjpeg/jquant2.c \
../../../3rdparty/libjpeg/jutils.c \
+ ../../../3rdparty/libjpeg/jmemmgr.c \
../../../3rdparty/libjpeg/jmemnobs.c
}
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 4b4712c..3555b21 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -403,7 +403,7 @@ static bool read_jpeg_image(QIODevice *device, QImage *outImage,
QRect clip;
if (clipRect.isEmpty()) {
clip = imageRect;
- } else if (cinfo.scale_denom == 1) {
+ } else if (cinfo.scale_denom == cinfo.scale_num) {
clip = clipRect.intersected(imageRect);
} else {
// The scale factor was corrected above to ensure that