Skip to content

Fix PNG seek and tell - #4512

Merged
hugovk merged 3 commits into
python-pillow:masterfrom
hugovk:fix-png-seek
Apr 2, 2020
Merged

hugovk merged 3 commits into
python-pillow:masterfrom
hugovk:fix-png-seek

Conversation

@hugovk

@hugovk hugovk commented Apr 1, 2020 •

Copy link
Copy Markdown
Member

Fixes #4509.

Changes proposed in this pull request:

  • Initialise __frame to 0 to fix seek after open

Comment thread src/PIL/PngImagePlugin.py Resolved

@pmrowla pmrowla left a comment

Copy link
Copy Markdown
Contributor

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

hugovk commented Apr 2, 2020

Copy link
Copy Markdown
Member Author

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 done
@almarklein

Copy link
Copy Markdown

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 done
@aclark4life aclark4life added the PNG label Oct 8, 2026
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. PNG

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants