debian/0000755000000000000000000000000013447173000007165 5ustar debian/changelog0000644000000000000000000001313513447172743011057 0ustar freeimage (3.15.4-3ubuntu0.1) trusty-security; urgency=medium * SECURITY UPDATE: Out-of-bounds write - debian/patches/Fix-CVE-2016-5684.patch: Fix out-of-bounds write vulnerability in the XMP image handling functionality - CVE-2016-5684 -- Mike Salvatore Thu, 28 Mar 2019 11:50:15 -0400 freeimage (3.15.4-3) unstable; urgency=low * QA upload. * disable_embedded_libraries.patch - Use system libtiff (Closes: #735249) Thanks to Sabayon from Gentoo for the hints * tag_truncation.patch - Cherry pick upstream fix for truncation of tags in TIFF files Thanks to Julian Taylor (Closes: #735847) -- Scott Howard Sun, 19 Jan 2014 21:44:52 -0500 freeimage (3.15.4-2) unstable; urgency=low * Fix FTBFS from declaring UINT64 twice - updated debian/patches/fixes_ftbfs_amd64.patch -- Scott Howard Tue, 14 Jan 2014 11:51:54 -0500 freeimage (3.15.4-1) unstable; urgency=low * QA Upload * New upstream minor release - Includes fix to build on !linux (Closes: #650485) * Refreshed patches (line endings had to change) - Remove document-mode.patch (accepted upstream) * Lintian fixes: S-V 3.9.5, DM-Upload-Allowed removed * Remove document-mode.patch (accepted upstream) -- Scott Howard Mon, 13 Jan 2014 21:57:45 -0500 freeimage (3.15.1-2) unstable; urgency=low * QA upload. * debian/patches/document-mode.patch: - Fix FTBFS with LibRaw 0.15 (Closes: #710133). -- Luca Falavigna Thu, 11 Jul 2013 11:22:37 +0200 freeimage (3.15.1-1) unstable; urgency=low [ Evan Broder ] * QA upload. * New upstream release (closes: 649541, LP: #898825, #898845) - Refreshed patches. + Abuse dh-autoreconf to generate Makefile.srcs and fipMakefile.srcs patches at build time - Update debian/freeimage-get-orig-source for the new version. - Add new build-dep libraw-dev. - Update patch to disable embedded libraries to deal with API changes in libpng, libmng, and libraw. - Make sure we install symlinks for libfreeimageplus. - Use (upstream-supported) CFLAGS instead of COMPILERFLAGS. * Switch to source format 3.0 (quilt) * Switch to dh(1) and debhelper compat 8 * Add missing misc:Depends. * Include the upstream changelog. * Update Debian standards version (no other changes needed). [ Stefano Rivera ] * Dropped README.source. * Updated freeimage (3.9.5) fixes CVE-2011-1167, CVE-2011-0192, CVE-2010-2595 * Override lintian's embedded-library error for libtiff. It wasn't extricable. -- Evan Broder Tue, 06 Dec 2011 14:31:21 +0200 freeimage (3.10.0-4) unstable; urgency=low * Fix copy-pasto in tif_config.h. -- Julien Cristau Fri, 29 Oct 2010 22:39:26 +0200 freeimage (3.10.0-3) unstable; urgency=low * Don't use embedded copies of various libraries, add build-deps on their packaged versions (closes: #595560): - libjpeg 6b - libmng 1.0.9 - libopenjpeg 1.2.0 - libpng 1.2.23 + CVE-2010-2249, CVE-2010-1205, CVE-2010-0205, CVE-2009-2042, CVE-2008-6218, CVE-2008-5907, CVE-2009-0040, CVE-2008-3964, CVE-2008-1382 - openexr 1.6.1 + CVE-2009-1720, CVE-2009-1721 - zlib 1.2.3 * The embedded libtiff copy is still used, because freeimage uses its internals and I couldn't figure out how to unentangle this. Update the tiff copy to 3.9.4-5, though: CVE-2010-3087, CVE-2010-2483, CVE-2010-2482, CVE-2010-2481, CVE-2010-2443, CVE-2010-2233, CVE-2010-2067, CVE-2010-2065, CVE-2010-1411, CVE-2009-2347, CVE-2008-2327. * Add tiff copyright and license to debian/copyright (closes: #601002) * Link with -lm (closes: #558857). * Try to avoid arch-specific values in our copy of tif_config.h and tiffconf.h (closes: #601762) * Set LFS CFLAGS in Makefile.gnu. * Orphan package (closes: #595559). -- Julien Cristau Fri, 29 Oct 2010 14:46:46 +0200 freeimage (3.10.0-2) unstable; urgency=low * Fixed typo in short description of libfreeimage3-dbg. (Closes: #518647) * Adjusted patched to not need -p0 (Closes: #485251). * Made package priority optional. * Moved libfreeimage3-dbg package into debug section. * Added debian/README.source. * Added watch file. * Added myself to Uploaders. * Updated Standards-Version. -- Michael Koch Tue, 15 Sep 2009 20:12:53 +0200 freeimage (3.10.0-1) unstable; urgency=low * New upstream release. Closes: #471242 * Added extra freeimage documentation in orig tarball. * Added get-orig-source target. * Added Homepage field in control file. * Removing some unnecessary stuff from rules file. * Adding some necessary build dependencies. * Adding some modifications to allow for configuring various compiler flags. * Fix FTBFS on amd64. * Adding debug package. * Added DM-Upload-Allowed: yes field. * Added Vcs entries. -- Andres Mejia Thu, 15 May 2008 03:18:00 -0400 freeimage (3.9.3-3) unstable; urgency=low * Removed the file FreeImage393.pdf for which sources are apparently not available. * Added copyright ownner to copyright file. -- Federico Di Gregorio Mon, 07 May 2007 15:35:21 +0200 freeimage (3.9.3-2) unstable; urgency=low * Now also build FreeImagePlus. * Changed C++ to C/C++ in debian/control. -- Federico Di Gregorio Sun, 22 Apr 2007 21:59:14 +0200 freeimage (3.9.3-1) unstable; urgency=low * Initial release (Closes: #419696) -- Federico Di Gregorio Sat, 21 Apr 2007 09:36:44 +0200 debian/freeimage-get-orig-source0000755000000000000000000000630312267131545014061 0ustar #! /bin/sh # This script is used to generate the freeimage orig tarball used for this # package. # Some variables to make maintaining this script easier FREEIMAGE_VERSION="3.15.4" FREEIMAGE_URL_DIR="http://downloads.sourceforge.net/freeimage" FREEIMAGE_TARBALL="FreeImage3154.zip" FREEIMAGE_TARBALL_CHECKSUM="9f9a3b2c3c1b4fd24fe479e8aaee86b1" FREEIMAGE_DOC="FreeImage3154.pdf" FREEIMAGE_DOC_CHECKSUM="acfbb9bcf5f5ee5ab77824c666a39a15" USAGE="\n\ This script is used to generate the orig tarball used in building\n\ Debian packages for freeimage-$FREEIMAGE_VERSION.\n\ Usage: freeimage-get-orig-source [OPTION]\n\ \n\ -h, --help Display this help message.\n\ --keep-upstream-files Keep downloaded files.\n\ --keep-orig-dir Keep the generated orig directory.\n" while [ "$#" -gt "0" ] do case "$1" in --keep-upstream-files) KEEP_UPSTREAM_FILES=1 shift ;; --keep-orig-dir) KEEP_ORIG_DIR=1 shift ;; -h|--help|*) echo >&2 "${USAGE}" exit 1 ;; esac done set -e # Function to download files. Takes two parameters, the directory name of the # url to use, and the filename of the file. download() { local url="$1/$2" if [ ! -f $2 ] ; then # Download the tarball wget $url fi } # Function to verify the checksum. Takes two parameters, the file to compute the # checksum for and the checksum it should be. verify_checksum() { local checksum=`md5sum $1 | cut -d ' ' -f 1` if [ $2 != $checksum ] ; then echo "Checksum verification failed. Checksum was $checksum Expected checksum $2" exit 1 else echo "Checksum verified. Checksum is $2" fi } # The rest is our main functions. #Download the files download $FREEIMAGE_URL_DIR $FREEIMAGE_TARBALL download $FREEIMAGE_URL_DIR $FREEIMAGE_DOC # Verify the checksums verify_checksum $FREEIMAGE_TARBALL $FREEIMAGE_TARBALL_CHECKSUM verify_checksum $FREEIMAGE_DOC $FREEIMAGE_DOC_CHECKSUM # Unpack the upstream source if [ ! -d FreeImage -a ! -d freeimage-$FREEIMAGE_VERSION ]; then echo "Unpacking upstream source." unzip -qq $FREEIMAGE_TARBALL mv FreeImage freeimage-$FREEIMAGE_VERSION else echo -n "Please remove or move FreeImage and freeimage-$FREEIMAGE_VERSION " echo "directory." exit 1 fi # Move the extra documentation into the extracted directory and pack into a # gzipped tarball if [ ! -f freeimage-$FREEIMAGE_VERSION ]; then echo "Creating freeimage_$FREEIMAGE_VERSION orig tarball." [ -d freeimage-$FREEIMAGE_VERSION/extra.Debian ] || \ mkdir -p freeimage-$FREEIMAGE_VERSION/extra.Debian cp -f $FREEIMAGE_DOC \ freeimage-$FREEIMAGE_VERSION/extra.Debian/$FREEIMAGE_DOC tar -czf freeimage_$FREEIMAGE_VERSION.orig.tar.gz \ freeimage-$FREEIMAGE_VERSION else echo "Please remove or move freeimage_$FREEIMAGE_VERSION.orig.tar.gz." exit 1 fi # Perform cleanup if [ -z "$KEEP_ORIG_DIR" ]; then echo "Removing extracted directory." rm -rf freeimage-$FREEIMAGE_VERSION fi if [ -z "$KEEP_UPSTREAM_FILES" ]; then echo "Removing upstream files." rm $FREEIMAGE_TARBALL rm $FREEIMAGE_DOC fi debian/compat0000644000000000000000000000000212267131545010372 0ustar 8 debian/rules0000755000000000000000000000213412267131545010254 0ustar #!/usr/bin/make -f # -*- makefile -*- CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -fPIC CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -fPIC LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) %: dh $@ --with=autoreconf gen-src-list: fromdos gensrclist.sh fromdos genfipsrclist.sh sh gensrclist.sh sh genfipsrclist.sh override_dh_autoreconf: dh_autoreconf $(MAKE) -- -f $(CURDIR)/debian/rules gen-src-list override_dh_auto_build: $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -f Makefile.fip CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" override_dh_auto_install: mkdir -p debian/tmp/usr/include mkdir -p debian/tmp/usr/lib $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp $(MAKE) -f Makefile.fip install DESTDIR=$(CURDIR)/debian/tmp override_dh_auto_clean: $(MAKE) clean $(MAKE) -f Makefile.fip clean override_dh_installdocs: dh_installdocs extra.Debian/* override_dh_installchangelogs: dh_installchangelogs Whatsnew.txt override_dh_strip: dh_strip --dbg-package=libfreeimage3-dbg get-orig-source: $(dir $_)freeimage-get-orig-source debian/patches/0000755000000000000000000000000013447167354010633 5ustar debian/patches/series0000644000000000000000000000020113447165200012025 0ustar disable_embedded_libraries.patch fix_ftbfs_amd64.patch makefile_modifications.patch tag_truncation.patch Fix-CVE-2016-5684.patch debian/patches/makefile_modifications.patch0000644000000000000000000000570612267131545016341 0ustar Some modificatoins to the makefiles to help in build Debian packages. Also removed -s (strip) option so we can make debug package. With the compiler options we're using by default, debugging should still be possible. ========================================================================== Index: freeimage/Makefile.fip =================================================================== --- freeimage.orig/Makefile.fip 2014-01-13 17:29:48.737061690 -0500 +++ freeimage/Makefile.fip 2014-01-13 17:29:48.729061689 -0500 @@ -15,10 +15,12 @@ MODULES = $(SRCS:.c=.o) MODULES := $(MODULES:.cpp=.o) -CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS -CFLAGS += $(INCLUDE) -CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -CXXFLAGS += $(INCLUDE) +CFLAGS ?= -O3 -fPIC +override CFLAGS += -fexceptions -fvisibility=hidden -DNO_LCMS +override CFLAGS += $(INCLUDE) +CXXFLAGS ?= -O3 -fPIC +override CXXFLAGS += -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy +override CXXFLAGS += $(INCLUDE) ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) CFLAGS += -fPIC @@ -59,7 +61,7 @@ $(AR) r $@ $(MODULES) $(SHAREDLIB): $(MODULES) - $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + $(CXX) -shared -Wl,-soname,$(VERLIBNAME) -Wl,-z,defs $(LDFLAGS) -o $@ $(MODULES) $(CXXFLAGS) $(LIBRARIES) install: install -d $(INCDIR) $(INSTALLDIR) @@ -67,6 +69,8 @@ install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) clean: rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME) Index: freeimage/Makefile.gnu =================================================================== --- freeimage.orig/Makefile.gnu 2014-01-13 17:29:48.737061690 -0500 +++ freeimage/Makefile.gnu 2014-01-13 17:29:48.729061689 -0500 @@ -15,10 +15,12 @@ MODULES = $(SRCS:.c=.o) MODULES := $(MODULES:.cpp=.o) -CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS -CFLAGS += $(INCLUDE) -CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -CXXFLAGS += $(INCLUDE) +CFLAGS ?= -O3 -fPIC +override CFLAGS += -fexceptions -fvisibility=hidden -DNO_LCMS +override CFLAGS += $(INCLUDE) +CXXFLAGS ?= -O3 -fPIC +override CXXFLAGS += -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy +override CXXFLAGS += $(INCLUDE) ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) CFLAGS += -fPIC @@ -58,7 +60,7 @@ $(AR) r $@ $(MODULES) $(SHAREDLIB): $(MODULES) - $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + $(CXX) -shared -Wl,-soname,$(VERLIBNAME) -Wl,-z,defs $(LDFLAGS) -o $@ $(MODULES) $(CXXFLAGS) $(LIBRARIES) install: install -d $(INCDIR) $(INSTALLDIR) debian/patches/fix_ftbfs_amd64.patch0000644000000000000000000000207512267131545014615 0ustar Patch that fixes several problems for building on amd64. Thanks Fedora guys. ===================================================================== Index: freeimage/Source/FreeImage/PluginBMP.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginBMP.cpp 2014-01-14 11:43:25.776431191 -0500 +++ freeimage/Source/FreeImage/PluginBMP.cpp 2014-01-14 11:43:25.768431191 -0500 @@ -192,6 +192,8 @@ return TRUE; } +#define MIN(a, b) ( ((a) < (b))? (a):(b) ) + /** Load image pixels for 4-bit RLE compressed dib @param io FreeImage IO Index: freeimage/Source/FreeImage.h =================================================================== --- freeimage.orig/Source/FreeImage.h 2014-01-13 17:15:32.449041339 -0500 +++ freeimage/Source/FreeImage.h 2014-01-14 11:51:29.864428839 -0500 @@ -141,8 +141,10 @@ typedef uint16_t WORD; typedef uint32_t DWORD; typedef int32_t LONG; +#ifndef _LIBRAW_TYPES_H typedef int64_t INT64; typedef uint64_t UINT64; +#endif #else // MS is not C99 ISO compliant typedef long BOOL; debian/patches/Fix-CVE-2016-5684.patch0000644000000000000000000000226013447163577014012 0ustar From: Debian Science Maintainers Date: Mon, 10 Oct 2016 08:22:44 +0100 Subject: CVE-2016-5684 --- Source/FreeImage/PluginXPM.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/FreeImage/PluginXPM.cpp b/Source/FreeImage/PluginXPM.cpp index a698321..cc7bd07 100644 --- a/Source/FreeImage/PluginXPM.cpp +++ b/Source/FreeImage/PluginXPM.cpp @@ -181,6 +181,11 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { } free(str); + // check info string + if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { + throw "Improperly formed info string"; + } + if (colors > 256) { dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); } else { @@ -193,7 +198,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { FILE_RGBA rgba; str = ReadString(io, handle); - if(!str) + if(!str || (strlen(str) < (size_t)cpp)) throw "Error reading color strings"; std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars debian/patches/disable_embedded_libraries.patch0000644000000000000000000003433412267131545017123 0ustar Description: Disable embedded libraries freeimage normally builds with embedded copies of libjpeg, libpng, libmng, libopenjpeg, libopenexr, zlib, libtiff. . Switch to using packaged versions for all of these except libtiff, where freeimage digs deep into its internals. . This patch does not modify Makefile.srcs and fipMakefile.srcs - those are patched as part of the patch build process. Origin: vendor Forwarded: no Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595560 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/freeimage/+bug/898825 Author: Julien Cristau Author: Evan Broder Last-Update: 2011-12-04 Index: freeimage/gensrclist.sh =================================================================== --- freeimage.orig/gensrclist.sh 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/gensrclist.sh 2014-01-20 00:15:38.270122337 -0500 @@ -1,6 +1,6 @@ #!/bin/sh -DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src" +DIRLIST=". Source Source/Metadata Source/FreeImageToolkit" echo "VER_MAJOR = 3" > Makefile.srcs echo "VER_MINOR = 15.4" >> Makefile.srcs @@ -12,15 +12,17 @@ egrep 'RelativePath=.*\.(c|cpp)' $DIR/*.2008.vcproj | cut -d'"' -f2 | tr '\\' '/' | awk '{print "'$DIR'/"$0}' | tr '\r\n' ' ' | tr -s ' ' >> Makefile.srcs fi done +echo -n ' Source/LibJPEG/transupp.c' >> Makefile.srcs echo >> Makefile.srcs echo -n "INCLS = " >> Makefile.srcs -find . -name "*.h" -print | xargs echo >> Makefile.srcs +find . \( -name 'Lib*' -or -name 'OpenEXR' -or -name 'ZLib' \) -prune -or -name '*.h' -print | sort | xargs echo -n >> Makefile.srcs echo >> Makefile.srcs echo -n "INCLUDE =" >> Makefile.srcs for DIR in $DIRLIST; do echo -n " -I$DIR" >> Makefile.srcs done +echo ' $(shell pkg-config --cflags zlib OpenEXR libraw libpng libtiff-4)' >> Makefile.srcs echo >> Makefile.srcs Index: freeimage/genfipsrclist.sh =================================================================== --- freeimage.orig/genfipsrclist.sh 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/genfipsrclist.sh 2014-01-20 00:15:38.270122337 -0500 @@ -1,6 +1,6 @@ #!/bin/sh -DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Wrapper/FreeImagePlus" +DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Wrapper/FreeImagePlus" echo "VER_MAJOR = 3" > fipMakefile.srcs @@ -13,11 +13,13 @@ egrep 'RelativePath=.*\.(c|cpp)' $DIR/*.2008.vcproj | cut -d'"' -f2 | tr '\\' '/' | awk '{print "'$DIR'/"$0}' | tr '\r\n' ' ' | tr -s ' ' >> fipMakefile.srcs fi done +echo -n ' Source/LibJPEG/transupp.c' >> fipMakefile.srcs echo >> fipMakefile.srcs echo -n "INCLUDE =" >> fipMakefile.srcs for DIR in $DIRLIST; do echo -n " -I$DIR" >> fipMakefile.srcs done +echo ' $(shell pkg-config --cflags zlib OpenEXR libraw libpng libtiff-4)' >> fipMakefile.srcs echo >> fipMakefile.srcs Index: freeimage/Source/FreeImage/ZLibInterface.cpp =================================================================== --- freeimage.orig/Source/FreeImage/ZLibInterface.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/ZLibInterface.cpp 2014-01-20 00:15:38.270122337 -0500 @@ -19,10 +19,10 @@ // Use at your own risk! // ========================================================== -#include "../ZLib/zlib.h" +#include #include "FreeImage.h" #include "Utilities.h" -#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ +//#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ /** Compresses a source buffer into a target buffer, using the ZLib library. @@ -115,7 +115,7 @@ return 0; case Z_OK: { // patch header, setup crc and length (stolen from mod_trace_output) - BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code + BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code crc = crc32(crc, source, source_size); memcpy(target + 4 + dest_len, &crc, 4); memcpy(target + 8 + dest_len, &source_size, 4); Index: freeimage/Source/FreeImage/PluginJPEG.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginJPEG.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginJPEG.cpp 2014-01-20 00:15:38.270122337 -0500 @@ -35,9 +35,10 @@ #undef FAR #include -#include "../LibJPEG/jinclude.h" -#include "../LibJPEG/jpeglib.h" -#include "../LibJPEG/jerror.h" +#include +#include +#include +#include } #include "FreeImage.h" Index: freeimage/Source/FreeImage/PluginEXR.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginEXR.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginEXR.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -22,16 +22,16 @@ #include "FreeImage.h" #include "Utilities.h" -#include "../OpenEXR/IlmImf/ImfIO.h" -#include "../OpenEXR/Iex/Iex.h" -#include "../OpenEXR/IlmImf/ImfOutputFile.h" -#include "../OpenEXR/IlmImf/ImfInputFile.h" -#include "../OpenEXR/IlmImf/ImfRgbaFile.h" -#include "../OpenEXR/IlmImf/ImfChannelList.h" -#include "../OpenEXR/IlmImf/ImfRgba.h" -#include "../OpenEXR/IlmImf/ImfArray.h" -#include "../OpenEXR/IlmImf/ImfPreviewImage.h" -#include "../OpenEXR/Half/half.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // ========================================================== Index: freeimage/Source/FreeImage/PluginJ2K.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginJ2K.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginJ2K.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -21,7 +21,7 @@ #include "FreeImage.h" #include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" +#include // ========================================================== // Plugin Interface Index: freeimage/Source/FreeImage/PluginPNG.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginPNG.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginPNG.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -37,8 +37,7 @@ // ---------------------------------------------------------- -#include "../ZLib/zlib.h" -#include "../LibPNG/png.h" +#include // ---------------------------------------------------------- @@ -106,7 +105,10 @@ tag = FreeImage_CreateTag(); if(!tag) return FALSE; - DWORD tag_length = (DWORD) MAX(text_ptr[i].text_length, text_ptr[i].itxt_length); + DWORD tag_length = text_ptr[i].text_length; +#ifdef PNG_iTXt_SUPPORTED + tag_length = MAX(tag_length, text_ptr[i].itxt_length); +#endif FreeImage_SetTagLength(tag, tag_length); FreeImage_SetTagCount(tag, tag_length); @@ -149,13 +151,19 @@ if(mdhandle) { do { memset(&text_metadata, 0, sizeof(png_text)); +#ifdef PNG_iTXt_SUPPORTED text_metadata.compression = 1; // iTXt, none +#else + text_metadata.compression = -1; +#endif text_metadata.key = (char*)FreeImage_GetTagKey(tag); // keyword, 1-79 character description of "text" text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string +#ifdef PNG_iTXt_SUPPORTED text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer +#endif // set the tag png_set_text(png_ptr, info_ptr, &text_metadata, 1); @@ -175,9 +183,11 @@ text_metadata.key = (char*)g_png_xmp_keyword; // keyword, 1-79 character description of "text" text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string +#ifdef PNG_iTXt_SUPPORTED text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer +#endif // set the tag png_set_text(png_ptr, info_ptr, &text_metadata, 1); @@ -559,7 +569,7 @@ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) { png_charp profile_name = NULL; - png_bytep profile_data = NULL; + png_charp profile_data = NULL; png_uint_32 profile_length = 0; int compression_type; @@ -599,7 +609,9 @@ row_pointers[height - 1 - k] = FreeImage_GetScanLine(dib, k); } +#ifdef PNG_BENIGN_ERRORS_SUPPORTED png_set_benign_errors(png_ptr, 1); +#endif png_read_image(png_ptr, row_pointers); // check if the bitmap contains transparency, if so enable it in the header @@ -843,7 +855,7 @@ FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib); if (iccProfile->size && iccProfile->data) { - png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_const_bytep)iccProfile->data, iccProfile->size); + png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_charp)iccProfile->data, iccProfile->size); } // write metadata Index: freeimage/Source/FreeImage/J2KHelper.cpp =================================================================== --- freeimage.orig/Source/FreeImage/J2KHelper.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/J2KHelper.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -21,7 +21,7 @@ #include "FreeImage.h" #include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" +#include /** Divide an integer by a power of 2 and round upwards Index: freeimage/Source/FreeImage/PluginJP2.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginJP2.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginJP2.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -21,7 +21,7 @@ #include "FreeImage.h" #include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" +#include // ========================================================== // Plugin Interface Index: freeimage/Source/FreeImage/PluginRAW.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginRAW.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginRAW.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -19,7 +19,7 @@ // Use at your own risk! // ========================================================== -#include "../LibRawLite/libraw/libraw.h" +#include #include "FreeImage.h" #include "Utilities.h" Index: freeimage/Source/FreeImageToolkit/JPEGTransform.cpp =================================================================== --- freeimage.orig/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImageToolkit/JPEGTransform.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -25,9 +25,10 @@ #undef FAR #include -#include "../LibJPEG/jinclude.h" -#include "../LibJPEG/jpeglib.h" -#include "../LibJPEG/jerror.h" +#include +#include +#include +#include #include "../LibJPEG/transupp.h" } Index: freeimage/Makefile.fip =================================================================== --- freeimage.orig/Makefile.fip 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Makefile.fip 2014-01-20 00:15:38.274122337 -0500 @@ -11,7 +11,7 @@ # Converts cr/lf to just lf DOS2UNIX = dos2unix -LIBRARIES = -lstdc++ +LIBRARIES = -lstdc++ -lmng -ljpeg -lopenjpeg $(shell pkg-config --libs zlib OpenEXR libraw libpng libtiff-4) MODULES = $(SRCS:.c=.o) MODULES := $(MODULES:.cpp=.o) Index: freeimage/Makefile.gnu =================================================================== --- freeimage.orig/Makefile.gnu 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Makefile.gnu 2014-01-20 00:15:38.274122337 -0500 @@ -11,7 +11,7 @@ # Converts cr/lf to just lf DOS2UNIX = dos2unix -LIBRARIES = -lstdc++ +LIBRARIES = -lstdc++ -ljpeg -lmng -lopenjpeg $(shell pkg-config --libs zlib OpenEXR libraw libpng libtiff-4) -lm MODULES = $(SRCS:.c=.o) MODULES := $(MODULES:.cpp=.o) Index: freeimage/Source/FreeImage/PluginTIFF.cpp =================================================================== --- freeimage.orig/Source/FreeImage/PluginTIFF.cpp 2014-01-20 00:15:38.278122337 -0500 +++ freeimage/Source/FreeImage/PluginTIFF.cpp 2014-01-20 00:15:38.274122337 -0500 @@ -39,7 +39,7 @@ #include "Utilities.h" #include "../LibTIFF4/tiffiop.h" #include "../Metadata/FreeImageTag.h" -#include "../OpenEXR/Half/half.h" +#include #include "FreeImageIO.h" #include "PSDParser.h" Index: freeimage/Source/LibTIFF4/tiffiop.h =================================================================== --- freeimage.orig/Source/LibTIFF4/tiffiop.h 2014-01-20 00:15:19.530121892 -0500 +++ freeimage/Source/LibTIFF4/tiffiop.h 2014-01-20 00:17:42.314125285 -0500 @@ -30,7 +30,9 @@ * ``Library-private'' definitions. */ -#include "tif_config.h" +#include +#define HAVE_SEARCH_H +#define HAVE_FCNTL_H #ifdef HAVE_FCNTL_H # include debian/patches/tag_truncation.patch0000644000000000000000000000366412267266560014704 0ustar Description: fixes tag truncation bug in TIFF files Origin: http://sourceforge.net/p/freeimage/discussion/36110/thread/3738788c/ http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/Metadata/XTIFF.cpp?r1=1.23&r2=1.24&view=patch Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735847 Index: freeimage/Source/Metadata/XTIFF.cpp =================================================================== --- freeimage.orig/Source/Metadata/XTIFF.cpp 2014-01-20 13:15:11.093762169 -0500 +++ freeimage/Source/Metadata/XTIFF.cpp 2014-01-20 13:15:11.085766168 -0500 @@ -451,10 +451,20 @@ FreeImage_SetTagValue(fitag, raw_data); break; + case TIFF_ASCII: default: { - // remember that raw_data = _TIFFmalloc(value_size * value_count); - const int value_size = _TIFFDataSize(fip->field_type); - size_t length = value_size * value_count; + size_t length = 0; + if(!mem_alloc && (fip->field_type == TIFF_ASCII) && (fip->field_readcount == TIFF_VARIABLE)) { + // when metadata tag is of type ASCII and it's value is of variable size (TIFF_VARIABLE), + // tiff_read_exif_tag function gives length of 1 so all strings are truncated ... + // ... try to avoid this by using an explicit calculation for 'length' + length = strlen((char*)raw_data) + 1; + } + else { + // remember that raw_data = _TIFFmalloc(value_size * value_count); + const int value_size = _TIFFDataSize(fip->field_type); + length = value_size * value_count; + } FreeImage_SetTagType(fitag, FIDT_ASCII); FreeImage_SetTagLength(fitag, (DWORD)length); FreeImage_SetTagCount(fitag, (DWORD)length); debian/control0000644000000000000000000000452613447163615010612 0ustar Source: freeimage Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian QA Group Build-Depends: debhelper (>= 8), dh-autoreconf, libjpeg-dev, liblcms2-dev, libmng-dev, libopenexr-dev, libopenjpeg-dev, libpng-dev, libraw-dev, libtiff-dev, pkg-config, tofrodos, zlib1g-dev Standards-Version: 3.9.5 Section: libs Homepage: http://freeimage.sourceforge.net/ Vcs-Git: git://git.debian.org/git/collab-maint/freeimage.git Vcs-Browser: http://git.debian.org/?p=collab-maint/freeimage.git Package: libfreeimage-dev Section: libdevel Architecture: any Depends: libfreeimage3 (= ${binary:Version}), ${misc:Depends} Description: Support library for graphics image formats (development files) FreeImage is an Open Source C/C++ library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, and cross-platform (works both with Linux, 32 bit Windows and Mac OS X). . This package contains the headers and static libraries needed to develop programs using FreeImage. Package: libfreeimage3 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Support library for graphics image formats (library) FreeImage is an Open Source C/C++ library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, and cross-platform (works both with Linux, 32 bit Windows and Mac OS X). . This package contains the FreeImage library. Package: libfreeimage3-dbg Section: debug Priority: extra Architecture: any Depends: libfreeimage3 (= ${binary:Version}), ${misc:Depends} Description: Support library for graphics image formats (debugging symbols) FreeImage is an Open Source C/C++ library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, and cross-platform (works both with Linux, 32 bit Windows and Mac OS X). . This package contains the debugging symbols for the FreeImage library. debian/source/0000755000000000000000000000000012267131545010474 5ustar debian/source/format0000644000000000000000000000001412267131545011702 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000005022512267131545011133 0ustar This package was debianized by: Federico Di Gregorio on Sat, 21 Apr 2007 09:36:44 +0200. It was downloaded from: http://freeimage.sourceforge.net/ Upstream Author: Hervé Drolon at drolon@infonie.fr Floris van den Berg at flvdberg@wxs.nl Copyright: Copyright (C) 2003-2007 FreeImage Group FreeImage is currently maintained by Harvé Drolon. FreeImage is licensed under the GNU General Public License (GPL) and the FreeImage Public License (FIPL). You can choose the license that has the most advantages for you. License (FIPL): 1. Definitions. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. 2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Floris van den Berg may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Floris van den Berg No one other than Floris van den Berg has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "FreeImage", `FreeImage Public License", "FIPL", or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the FreeImage Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by Dutch law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the The Netherlands: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Almelo, The Netherlands; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the court of Almelo, The Netherlands with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. EXHIBIT A. "The contents of this file are subject to the FreeImage Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://home.wxs.nl/~flvdberg/freeimage-license.txt Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. License (GPL): This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. freeimage embeds a copy of libtiff, whose copyright and license are: Copyright (C) 1988-1997 Sam Leffler Copyright (C) 1991-1997 Silicon Graphics, Inc. Portions Copyright (C) 1985-1987, 1990 Regents of the University of California Portions Copyright (C) 1990, 1991 Digital Equipment Corporation Portions Copyright (C) 1990 Sun Microsystems, Inc. Portions Copyright (C) 1990, 1995 Frank D. Cringle Portions Copyright (C) 1996 BancTec AB Portions Copyright (C) 1996 Mike Johnson Portions Copyright (C) 1996 Pixar Portions Copyright (C) 1997 Greg Ward Larson Portions Copyright (C) 2000 Frank Warmerdam Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. The Debian packaging is Copyright (C) 2007, Federico Di Gregorio and is licensed under the GPL, see above. debian/libfreeimage-dev.install0000644000000000000000000000025312267131545013753 0ustar debian/tmp/usr/include/* debian/tmp/usr/lib/libfreeimage.a debian/tmp/usr/lib/libfreeimage.so debian/tmp/usr/lib/libfreeimageplus.a debian/tmp/usr/lib/libfreeimageplus.so debian/libfreeimage3.lintian-overrides0000644000000000000000000000020712267131545015251 0ustar # Freeimage hooks deep into libtiff. Its claws haven't been extricated yet libfreeimage3: embedded-library usr/lib/libfreeimage*: tiff debian/watch0000644000000000000000000000016112267131545010223 0ustar version=3 opts="uversionmangle=s/(\d)(\d\d)(\d)/$1.$2.$3/" \ http://sf.net/freeimage/FreeImage(31[1-9]\d*)\.zip debian/libfreeimage3.install0000644000000000000000000000023412267131545013261 0ustar debian/tmp/usr/lib/libfreeimage-*.so debian/tmp/usr/lib/libfreeimage.so.3 debian/tmp/usr/lib/libfreeimageplus-*.so debian/tmp/usr/lib/libfreeimageplus.so.3