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 image file formats documentation #6313

Merged
merged 3 commits into from May 23, 2022

Conversation

radarhere
Copy link
Member

Addresses concerns raised in #6273 (reply in thread)

  1. https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html#gif

The library writes LZW encoded files in GIF87a by default, unless GIF89a features are used or GIF89a is already in use.

This could be interpreted to mean that LZW encoding is not used for GIF89a. This is not the case (and @raygard would know, as he actually wrote #5291).

  1. The "Reading local images" example relies on the ability of the user to set im.size. This was removed in Changed Image size property to be read-only by default #3203, so I've updated the example to use crop() instead.

  2. https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html

So if copy() is called on an image, or another method internally creates a copy of the image, the fp (file pointer), along with any methods and attributes specific to a format. The format attribute will be None.

The first sentence seems to just stop, so I've reworked it.

@raygard
Copy link
Contributor

raygard commented May 20, 2022

Thanks! This looks much better. The "read local image" example works now. I didn't realize you could do it like that; it may come in handy.

@hugovk hugovk merged commit 68e39cb into python-pillow:main May 23, 2022
@radarhere radarhere deleted the documentation branch May 23, 2022 07:18
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