-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctypes: support adding custom tags with variable length
In libtiff, custom tags with variable length (eg, a binary blob) are indicated with the special constants TIFF_VARIABLE (-1) or TIFF_VARIABLE2 (-3). In such case, when reading a field the length is passed as first argument, and the data as a pointer as second argument. So far, some standard tags with such format were supported, but not custom tags. => Add support for such tags. Also fix the names of the attribute created automatically, which got broken in the switch from Python 2 to 3. What should have been named, for instance, TIFFTAG_CUSTOM, was named like TIFFTAG_b'CUSTOM', quotes included! Also fix the test cases, which were not working, mostly related to reading/writing tags.
- Loading branch information
Showing
1 changed file
with
103 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters