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 bug in TiffImagePlugin. Save and restore pointer to super.load in… #1754

Closed
wants to merge 2 commits into from

Conversation

Geka000
Copy link
Contributor

@Geka000 Geka000 commented Feb 29, 2016

There is a bug in TiffImagePlugin.py. If tiff file has two frames, first with tiff_ccitt compression, and second in packbits compression. _setup method replace self.load with self._load_libtiff if frame has tiff_ccitt, and when you try to load frame with other compression self.load still points to self._load_libtiff, but it need to point to super.load

@radarhere radarhere added the TIFF label Feb 29, 2016
@radarhere
Copy link
Member

Hi. Thanks for creating this PR, and joining the community effort to support Pillow. In order to try and avoid regressions in the code at a later point in time, tests are encouraged. Would you be able to add a test to check that this behaves correctly?

@Geka000
Copy link
Contributor Author

Geka000 commented Feb 29, 2016

Hello. I have added a test. it's failes on master branch, and it's works on my PR

@wiredfool
Copy link
Member

This is a valid problem, but I think the approach should be different. Rather than patching over a questionable design decision, we should fix the underlying issue.

@radarhere
Copy link
Member

I've created PR #1782 as an alternative fix, cherry-picking the test-related commit from this.

@wiredfool
Copy link
Member

Merged #1782

@wiredfool wiredfool closed this Apr 1, 2016
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.

3 participants