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

Allow libtiff_support_custom_tags to be missing #7020

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

radarhere
Copy link
Member

Resolves #7019

Image.core.libtiff_support_custom_tags may be missing, if libtiff is unavailable.

Pillow/src/_imaging.c

Lines 4256 to 4272 in 2d5f451

#ifdef HAVE_LIBTIFF
{
extern const char *ImagingTiffVersion(void);
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 *support_custom_tags;
#if TIFFLIB_VERSION >= 20111221 && TIFFLIB_VERSION != 20120218 && \
TIFFLIB_VERSION != 20120922
support_custom_tags = Py_True;
#else
support_custom_tags = Py_False;
#endif
PyDict_SetItemString(d, "libtiff_support_custom_tags", support_custom_tags);
}
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: module 'PIL._imaging' has no attribute 'libtiff_support_custom_tags'
2 participants