Navigation Menu

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

Improve encoding of TIFF tags #3861

Merged
merged 4 commits into from Jun 30, 2019
Merged

Improve encoding of TIFF tags #3861

merged 4 commits into from Jun 30, 2019

Conversation

olt
Copy link
Contributor

@olt olt commented May 22, 2019

I improved the TIFF encoder to support more types (especially arrays). This is required for the GeoTIFF format which encodes geospatial information.

  • Pass tagtype from v2 directory to libtiff encoder, instead of
    autodetecting type.
  • Use explicit types. E.g. uint32_t for TIFF_LONG to fix issues on
    platforms with 64bit longs.
  • Add support for multiple values (arrays). Requires type in v2
    directory and values must be passed as a tuple.
  • Add support for signed types (e.g. TIFFTypes.TIFF_SIGNED_SHORT).

Note: I changed the versionadded 3.0.0 note in the docs as this has been fixed with a3d45e9 which is included in 5.4.

/cc @radarhere You are probably most familiar with this part.

@radarhere radarhere added the TIFF label May 22, 2019
@olt
Copy link
Contributor Author

olt commented Jun 3, 2019

I fixed the linting errors and (hopefully) the compile error on Windows.
I can rebase the changes if desired.

@olt

This comment has been minimized.

@hugovk

This comment has been minimized.

@olt

This comment has been minimized.

@olt
Copy link
Contributor Author

olt commented Jun 13, 2019

Rebased again. All ✅

@hugovk
Copy link
Member

hugovk commented Jun 29, 2019

@olt Thanks for the PR and for your patience in rebasing! There's one last conflict, if you can clear that then let's merge this for Monday's release.

- Pass tagtype from v2 directory to libtiff encoder, instead of
autodetecting type.
- Use explicit types. E.g. uint32_t for TIFF_LONG to fix issues on
platforms with 64bit longs.
- Add support for multiple values (arrays). Requires type in v2
directory and values must be passed as a tuple.
- Add support for signed types (e.g. TIFFTypes.TIFF_SIGNED_SHORT).
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
@hugovk hugovk merged commit 2af4026 into python-pillow:master Jun 30, 2019
@hugovk
Copy link
Member

hugovk commented Jun 30, 2019

Thanks!

Would be great to still add release notes for this one in https://github.com/python-pillow/Pillow/blob/master/docs/releasenotes/6.1.0.rst.

hugovk added a commit to hugovk/Pillow that referenced this pull request Jul 1, 2019
@hugovk
Copy link
Member

hugovk commented Jul 1, 2019

Release notes for this one added in #3930.

hugovk added a commit that referenced this pull request Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants