Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated libtiff to 4.4.0 #6339

Merged
merged 2 commits into from May 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/installation.rst
Expand Up @@ -162,7 +162,7 @@ Many of Pillow's features require external libraries:

* **libtiff** provides compressed TIFF functionality

* Pillow has been tested with libtiff versions **3.x** and **4.0-4.3**
* Pillow has been tested with libtiff versions **3.x** and **4.0-4.4**

* **libfreetype** provides type related services

Expand Down
14 changes: 3 additions & 11 deletions src/libImaging/TiffDecode.c
Expand Up @@ -815,11 +815,11 @@ ImagingLibTiffMergeFieldInfo(

// custom fields added with ImagingLibTiffMergeFieldInfo are only used for
// decoding, ignore readcount;
int readcount = 1;
int readcount = is_var_length ? TIFF_VARIABLE : 1;
// we support writing a single value, or a variable number of values
int writecount = 1;
int writecount = is_var_length ? TIFF_VARIABLE : 1;
// whether the first value should encode the number of values.
int passcount = 0;
int passcount = (is_var_length && field_type != TIFF_ASCII) ? 1 : 0;

TIFFFieldInfo info[] = {
{key,
Expand All @@ -831,14 +831,6 @@ ImagingLibTiffMergeFieldInfo(
passcount,
"CustomField"}};

if (is_var_length) {
info[0].field_writecount = -1;
}

if (is_var_length && field_type != TIFF_ASCII) {
info[0].field_passcount = 1;
}

n = sizeof(info) / sizeof(info[0]);

// Test for libtiff 4.0 or later, excluding libtiff 3.9.6 and 3.9.7
Expand Down
6 changes: 3 additions & 3 deletions winbuild/build_prepare.py
Expand Up @@ -143,9 +143,9 @@ def cmd_msbuild(
"libs": [r"*.lib"],
},
"libtiff": {
"url": "https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz",
"filename": "tiff-4.3.0.tar.gz",
"dir": "tiff-4.3.0",
"url": "https://download.osgeo.org/libtiff/tiff-4.4.0.tar.gz",
"filename": "tiff-4.4.0.tar.gz",
"dir": "tiff-4.4.0",
"build": [
cmd_cmake("-DBUILD_SHARED_LIBS:BOOL=OFF"),
cmd_nmake(target="clean"),
Expand Down