Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Apr 1, 2020

Fixes #4509.

Changes proposed in this pull request:

  • Initialise __frame to 0 to fix seek after open

src/PIL/PngImagePlugin.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pmrowla pmrowla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than the one minor comment, this should resolve the issue. It definitely should have occurred to me to test seek()/tell() on a regular PNG image in my PR, sorry about that!

@hugovk
Copy link
Member Author

hugovk commented Apr 2, 2020

Thanks, updated!

Also added a test for tell.

(Travis CI has a disk space error on the s390x job and no restart button, but it's all green on my fork.)

@hugovk hugovk added the Bug Any unexpected behavior, until confirmed feature. label Apr 2, 2020
@hugovk hugovk merged commit e9afb39 into python-pillow:master Apr 2, 2020
@hugovk hugovk deleted the fix-png-seek branch April 2, 2020 07:43
@hugovk hugovk mentioned this pull request Apr 2, 2020
23 tasks
@almarklein
Copy link

Thanks for the quick fix 👍

@python-pillow python-pillow deleted a comment from codecov bot Apr 2, 2020
@hugovk hugovk changed the title Fix PNG seek Fix PNG seek and tell Apr 2, 2020
@ericpre ericpre mentioned this pull request Apr 2, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Any unexpected behavior, until confirmed feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.