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 PNG seek and tell #4512

Merged
merged 3 commits into from Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tests/test_file_png.py
Expand Up @@ -629,6 +629,10 @@ def test_exif_argument(self, tmp_path):
with Image.open(test_file) as reloaded:
assert reloaded.info["exif"] == b"Exif\x00\x00exifstring"

def test_seek(self, tmp_path):
with Image.open(TEST_PNG_FILE) as im:
im.seek(0)


@pytest.mark.skipif(is_win32(), reason="Requires Unix or macOS")
@skip_unless_feature("zlib")
Expand Down
1 change: 1 addition & 0 deletions src/PIL/PngImagePlugin.py
Expand Up @@ -630,6 +630,7 @@ class PngImageFile(ImageFile.ImageFile):

format = "PNG"
format_description = "Portable network graphics"
__frame = 0
hugovk marked this conversation as resolved.
Show resolved Hide resolved

def _open(self):

Expand Down