From 17f09a9fbac47949fdcc08f4e929ba006561a742 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 16 Feb 2010 16:48:28 +0100 Subject: 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. --- doc/src/legal/3rdparty.qdoc | 20 +++++++++++++------- src/plugins/imageformats/jpeg/jpeg.pro | 13 +++++++++---- src/plugins/imageformats/jpeg/qjpeghandler.cpp | 2 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index dec95d0..2794c7b 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -116,9 +116,9 @@ \hr - Copyright (C) 2004,2007  Red Hat, Inc.\br - Copyright (C) 1998-2004  David Turner and Werner Lemberg\br - Copyright (C) 2006  Behdad Esfahbod\br + Copyright (C) 2004,2007 Red Hat, Inc.\br + Copyright (C) 1998-2004 David Turner and Werner Lemberg\br + Copyright (C) 2006 Behdad Esfahbod\br Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) This is part of HarfBuzz, an OpenType Layout engine library. @@ -137,7 +137,7 @@ THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS + FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. @@ -146,7 +146,7 @@ See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL for license details. - \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 6b + \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8 \e{This package contains C software to implement JPEG image compression and decompression. JPEG (pronounced "jay-peg") is a standardized compression @@ -156,6 +156,12 @@ exactly identical to the input image.} -- quoted from \c src/3rdparty/libjpeg/README. + \hr + + This software is based in part on the work of the Independent JPEG Group. + + \hr + See \c src/3rdparty/libjpeg/README for license details. \section1 MD4 (\c md4.cpp and \c md4.h) @@ -363,7 +369,7 @@ duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed - by the University of California, Berkeley.  The name of the + by the University of California, Berkeley. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR @@ -404,7 +410,7 @@ documentation for such software. THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 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 -- cgit v0.12