Repository navigation
Added custom int and float TIFF tags - #3350
Conversation
f46139b to
5dc1e0a
Compare
2ed1d5b to
b01e92e
Compare
|
|
||
|
|
||
| def _libtiff_version(): | ||
| return Image.core.libtiff_version.split("\n")[0].split("Version ")[1] |
There was a problem hiding this comment.
tiffvers.h:
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.9\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
* version or versions of the library. Runtime
* version checking should be done based on the
* string returned by TIFFGetVersion.
*/
#define TIFFLIB_VERSION 20171118
And TIFFGetVersion returns TIFFLIB_VERSION_STR. It's a bit odd they don't return the plain 4.0.9 version.
Anyway, has the version been string been of this form for a long time? Do we feel this splitting to be robust?
| n = sizeof(info) / sizeof(info[0]); | ||
|
|
||
| // Test for libtiff 4.0 or later, excluding libtiff 3.9.6 and 3.9.7 | ||
| #if TIFFLIB_VERSION >= 20111221 && TIFFLIB_VERSION != 20120218 && TIFFLIB_VERSION != 20120922 |
There was a problem hiding this comment.
On the Python side, we're extracting the x.y.z version from TIFFLIB_VERSION_STR.
Here, we're using TIFFLIB_VERSION which is yyyymmdd, and checking it's later than 4.0's date, but excluding some known 3.x which were released later than 4.0.
Do we feel safe that there won't be any more 3.x releases after 4.0? 3.9.7 was six years ago, so that's one sign.
Can we extract the real x.y.z from TIFFLIB_VERSION_STR here instead?
|
|
||
| } | ||
|
|
||
| int ImagingLibTiffMergeFieldInfo(ImagingCodecState state, TIFFDataType field_type, int key){ |
There was a problem hiding this comment.
Let's convert this whole file to use spaces not tabs.
There was a problem hiding this comment.
They were just in the lines that I added, but done.
b01e92e to
63bd022
Compare
Co-Authored-By: radarhere <[email protected]>
Co-Authored-By: radarhere <[email protected]>
1c07f59 to
d8e66c1
Compare
Resolves #660