From 4953d012cc2de81b9774284c950dcfece0b56122 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 29 Oct 2023 23:56:04 +0300 Subject: [PATCH] upgrade vendored libtiff to 4.6.0 Closes: https://github.com/libsdl-org/SDL_image/issues/397 --- .gitmodules | 2 +- VisualC/external/include/tiff.h | 3 ++- VisualC/external/include/tiffio.h | 2 +- VisualC/external/include/tiffvers.h | 14 ++++++++++---- VisualC/external/optional/x64/libtiff-6.dll | Bin 403456 -> 403456 bytes VisualC/external/optional/x86/libtiff-6.dll | Bin 398848 -> 398848 bytes external/libtiff | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 577e0a81..f9e4dfc4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,7 +17,7 @@ [submodule "external/libtiff"] path = external/libtiff url = https://github.com/libsdl-org/libtiff.git - branch = v4.5.1-SDL + branch = v4.6.0-SDL [submodule "external/zlib"] path = external/zlib url = https://github.com/libsdl-org/zlib.git diff --git a/VisualC/external/include/tiff.h b/VisualC/external/include/tiff.h index b2d11866..d8da33dc 100644 --- a/VisualC/external/include/tiff.h +++ b/VisualC/external/include/tiff.h @@ -646,7 +646,7 @@ typedef enum #define TIFFTAG_EP_EXPOSUREINDEX 37397 /* Exposure index */ #define TIFFTAG_EP_STANDARDID 37398 /* TIFF/EP standard version, n.n.n.n */ #define TIFFTAG_EP_SENSINGMETHOD 37399 /* Type of image sensor */ -/* +/* * TIFF/EP tags equivalent to EXIF tags * Note that TIFF-EP and EXIF use nearly the same metadata tag set, but TIFF-EP stores the tags in IFD 0, * while EXIF store the tags in a separate IFD. Either location is allowed by DNG, but the EXIF location is preferred. @@ -761,6 +761,7 @@ typedef enum #define TIFFTAG_LERC_MAXZERROR 65567 /* LERC maximum error */ #define TIFFTAG_WEBP_LEVEL 65568 /* WebP compression level */ #define TIFFTAG_WEBP_LOSSLESS 65569 /* WebP lossless/lossy */ +#define TIFFTAG_WEBP_LOSSLESS_EXACT 65571 /* WebP lossless exact mode. Set-only mode. Default is 1. Can be set to 0 to increase compression rate, but R,G,B in areas where alpha = 0 will not be preserved */ #define TIFFTAG_DEFLATE_SUBCODEC 65570 /* ZIP codec: to get/set the sub-codec to use. Will default to libdeflate when available */ #define DEFLATE_SUBCODEC_ZLIB 0 #define DEFLATE_SUBCODEC_LIBDEFLATE 1 diff --git a/VisualC/external/include/tiffio.h b/VisualC/external/include/tiffio.h index d6bf0cc5..20460542 100644 --- a/VisualC/external/include/tiffio.h +++ b/VisualC/external/include/tiffio.h @@ -277,7 +277,7 @@ typedef struct #define LOGLUV_PUBLIC 1 #endif -#if defined(__GNUC__) || defined(__attribute__) +#if defined(__GNUC__) || defined(__clang__) || defined(__attribute__) #define TIFF_ATTRIBUTE(x) __attribute__(x) #else #define TIFF_ATTRIBUTE(x) /*nothing*/ diff --git a/VisualC/external/include/tiffvers.h b/VisualC/external/include/tiffvers.h index ed847760..892e9a0b 100644 --- a/VisualC/external/include/tiffvers.h +++ b/VisualC/external/include/tiffvers.h @@ -1,9 +1,14 @@ +/* tiffvers.h version information is updated according to version information + * in configure.ac */ + /* clang-format off */ /* clang-format disabled because FindTIFF.cmake is very sensitive to the * formatting of below line being a single line. + * Furthermore, configure_file variables of type "@VAR@" are + * modified by clang-format and won't be substituted by CMake. */ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.5.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." +#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.6.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." /* * This define can be used in code that requires * compilation-related definitions specific to a @@ -11,12 +16,13 @@ * version checking should be done based on the * string returned by TIFFGetVersion. */ -#define TIFFLIB_VERSION 20230609 +#define TIFFLIB_VERSION 20230908 /* The following defines have been added in 4.5.0 */ #define TIFFLIB_MAJOR_VERSION 4 -#define TIFFLIB_MINOR_VERSION 5 -#define TIFFLIB_MICRO_VERSION 1 +#define TIFFLIB_MINOR_VERSION 6 +#define TIFFLIB_MICRO_VERSION 0 +#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "4.6.0" /* Macro added in 4.5.0. Returns TRUE if the current libtiff version is * greater or equal to major.minor.micro diff --git a/VisualC/external/optional/x64/libtiff-6.dll b/VisualC/external/optional/x64/libtiff-6.dll index 234d7799a7956b14303258f7d35ea533fbc8bef5..645e446b82453c001c0b815ebc3f783e3381b1b4 100644 GIT binary patch delta 49 zcmV-10M7q_&=`Qw7?9WkI7)%qh1vmy+5&~z1BKcIwb}(4u>&?PFt_%x1rAOFAI3hl H2L|~kBDNG- delta 49 zcmV-10M7q_&=`Qw7?9Wk;>m&9h1vmy+5&~z1BKcIwb}(4u>&