Issue 32 in pylibtiff: libtiff 4.x and custom tags

7 views
Skip to first unread message

pyli...@googlecode.com

unread,
Feb 17, 2015, 11:10:41 AM2/17/15
to pylibtif...@googlegroups.com
Status: Accepted
Owner: dho...@gmail.com
Labels: Type-Defect Priority-Medium

New issue 32 by dho...@gmail.com: libtiff 4.x and custom tags
https://code.google.com/p/pylibtiff/issues/detail?id=32

What steps will reproduce the problem?
1. Add custom tags of specific data type using the "add_tags" function in
libtiff_ctypes.py
2. Read or write file with these custom tags.
3. Get segmentation fault or assert(0)

What is the expected output? What do you see instead?
With libtiff 3.9 there are no segmentation faults or assertion errors or
other crashes.

Please use labels and text to provide additional information.
I originally added the custom tag functionality to libtiff_ctypes.py. I was
updating some of my environments that use pylibtiff with libtiff 4.0.3 and
found that the tests at the bottom of libtiff_ctypes cause a segmentation
fault that seems to be linked to the custom tag test. Also, when using
custom tags there seems to be certain types that aren't supported in the
new libtiff layout which results in an assert(0) error. One specific
example is a tag with type "TIFF_SLONG" will be assigned an internal type
of "TIFF_SETGET_SINT32", but the code to handle this type does not exist
later in the library calls.

I think the "correct" decision is to update libtiff_ctypes to check the
version of libtiff used and if 4.0+ use the new functions for adding custom
tags. The problem with that is I don't think there is any documentation for
creating custom tags in 4.0. I've asked the libtiff mailing list for any
advice and I'll go from there.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages