Skip to content

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
Co-authored-by: Hugo van Kemenade <[email protected]>
@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.

2 participants