diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 66855bb97..4414dbe5e 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -272,7 +272,7 @@ class TestFileLibTiff(LibTiffTestCase): } libtiffs = [False] - if Image.core.libtiff_v4_or_greater: + if Image.core.libtiff_support_custom_tags: libtiffs.append(True) for libtiff in libtiffs: diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index a78f791ee..fa8c852c2 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -1556,7 +1556,7 @@ def _save(im, fp, filename): if tag not in TiffTags.LIBTIFF_CORE: if ( TiffTags.lookup(tag).type == TiffTags.UNDEFINED - or not Image.core.libtiff_v4_or_greater + or not Image.core.libtiff_support_custom_tags ): continue diff --git a/src/_imaging.c b/src/_imaging.c index 12c07f0ad..190b312bc 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -3969,13 +3969,13 @@ setup_module(PyObject* m) { PyDict_SetItemString(d, "libtiff_version", PyUnicode_FromString(ImagingTiffVersion())); // Test for libtiff 4.0 or later, excluding libtiff 3.9.6 and 3.9.7 - PyObject* v4_or_greater; + PyObject* support_custom_tags; #if TIFFLIB_VERSION >= 20111221 && TIFFLIB_VERSION != 20120218 && TIFFLIB_VERSION != 20120922 - v4_or_greater = Py_True; + support_custom_tags = Py_True; #else - v4_or_greater = Py_False; + support_custom_tags = Py_False; #endif - PyDict_SetItemString(d, "libtiff_v4_or_greater", v4_or_greater); + PyDict_SetItemString(d, "libtiff_support_custom_tags", support_custom_tags); } #endif