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

Add support for variable length custom tags #173

Merged
merged 1 commit into from
Jan 16, 2024

Commits on Jan 15, 2024

  1. 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.
    pieleric committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    8fdf307 View commit details
    Browse the repository at this point in the history