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

Fix 12-year-old FIXME #655

Merged
merged 2 commits into from May 20, 2014
Merged

Fix 12-year-old FIXME #655

merged 2 commits into from May 20, 2014

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 10, 2014

Comments in docs and code for Image.thumbnail(), dating back to PIL 1.1.3 from March 14, 2002:

If omitted, it defaults to PIL.Image.NEAREST (this will be changed to ANTIALIAS in a future version).

# FIXME: the default resampling filter will be changed
        # to ANTIALIAS in future versions

It is now the future.

The resample parameter was added in PIL 1.1.2 (May 2001) and defaulted to ANTIALIAS. In 1.1.3 (March 2002) it was changed to NEAREST with the FIXME note.

No reason is given in the PIL 1.1.3 release notes, but it looks like there were initially some problems with ANTIALIAS so they went with the safer option:

(1.1.3c2 released)

  • ...
  • Fixed segmentation violation in ANTIALIAS filter (an internal buffer wasn’t properly allocated).

(1.1.3c1 released)

  • Added ANTIALIAS downsampling filter for high-quality “resize” and “thumbnail” operations. Also added filter option to the “thumbnail” operation; the default value is NEAREST, but this will most likely change in future versions.

PR also contains some pep8 and pyflakes cleanup.

TODO:

  • Update the docs
  • Should there be a note in the docs saying the default was NEAREST before version 2.5.0?

@hugovk hugovk mentioned this pull request May 11, 2014
@wiredfool wiredfool merged commit 74514fa into python-pillow:master May 20, 2014
@wiredfool
Copy link
Member

The docs should get update from the docstring. I'll update it for the previous default.

@hugovk hugovk deleted the antialias branch May 20, 2014 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants