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

Improved codec documentation #6094

Merged
merged 8 commits into from
Mar 6, 2022
Merged

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Feb 27, 2022

Helps #4818, by

  • mentioning set_as_raw() in the Python decoder documentation
  • removing the "Experimental" label from pulls_fd. It was added in Pillow 3.3.0, and the next release is Pillow 9.1.0.
  • noting that pulls_fd and pushes_fd allow more freedom, by abandoning Pillow's process of handling the file in blocks, but may lead to increase memory usage, if the codec is written to hold the everything in memory at once.
  • re-iterating that cleanup() is for... cleanup tasks, but also clarifying that if _pulls_fd or _pushes_fd was used, then the codec author probably doesn't need this, as they would have instinctively cleaned up their resources at the end of decode() or encode().
  • linking to the BlpImagePlugin and the example DdsImagePlugin as demonstrations of PyDecoder and PyEncoder.
  • linking to PsdImagePlugin, as a plugin that uses multiple tiles
  • documenting writing your own encoder in C

@radarhere radarhere changed the title Refer to set_as_raw() in Python decoder documentation Improved codec documentation Feb 28, 2022
docs/handbook/writing-your-own-image-plugin.rst Outdated Show resolved Hide resolved
docs/handbook/writing-your-own-image-plugin.rst Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@radarhere radarhere merged commit 397a940 into python-pillow:main Mar 6, 2022
@radarhere radarhere deleted the decoder branch March 6, 2022 21:02
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

2 participants