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

Support custom comments and PLT markers when saving JPEG2000 images #6903

Merged
merged 22 commits into from
Mar 29, 2023

Conversation

joshware
Copy link
Contributor

Changes proposed in this pull request:

Adds two new options when saving JPEG2000 images.

  • The comment parameter to the save function replaces the default "Created by OpenJPEG version" with a given string.
  • The add_plt parameter includes a PLT marker segment codestream, which is required for some ancient image viewers.

@radarhere radarhere added the JPEG label Jan 19, 2023
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@radarhere
Copy link
Member

PLT marker segment codestream, which is required for some ancient image viewers.

Could you elaborate on this? What are some example of the 'ancient image viewers'?

Also, it's required for old image viewers, but the option was only added to OpenJPEG two years ago?

@joshware
Copy link
Contributor Author

Well, it's technically one image viewer I'm referring to, it's called 'RICS' and it's used in Pathology and It's built on the Kadaku library.
It dates back to around 2003, and only runs on Windows 2003/XP.

So I've been needing to integrate with/replace it with something more modern.

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@radarhere
Copy link
Member

I didn't think that "add_" was necessary, so I've renamed "add_plt" to just "plt".

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@radarhere radarhere changed the title Add support for custom comments and inclusion of PLT marker segments when saving JPEG2000 files Support custom comments and PLT markers when saving JPEG2000 files Mar 29, 2023
@radarhere radarhere changed the title Support custom comments and PLT markers when saving JPEG2000 files Support custom comments and PLT markers when saving JPEG2000 images Mar 29, 2023
@radarhere radarhere merged commit f8be096 into python-pillow:main Mar 29, 2023
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.

3 participants