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

Show all frames in ImageShow #6611

Merged
merged 1 commit into from Oct 12, 2022
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions src/PIL/ImageShow.py
Expand Up @@ -136,7 +136,7 @@ class WindowsViewer(Viewer):
"""The default viewer on Windows is the default system application for PNG files."""

format = "PNG"
options = {"compress_level": 1}
options = {"compress_level": 1, "save_all": True}
Copy link
Contributor

Choose a reason for hiding this comment

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

Photos, the default Windows viewer for images, does not support APNG and only shows the first frame. However, users can change their default viewer to one that does support APNG, so this is still a worthwhile change.


def get_command(self, file, **options):
return (
Expand All @@ -154,7 +154,7 @@ class MacViewer(Viewer):
"""The default viewer on macOS using ``Preview.app``."""

format = "PNG"
options = {"compress_level": 1}
options = {"compress_level": 1, "save_all": True}

def get_command(self, file, **options):
# on darwin open returns immediately resulting in the temp
Expand Down Expand Up @@ -197,7 +197,7 @@ def show_file(self, path=None, **options):

class UnixViewer(Viewer):
format = "PNG"
options = {"compress_level": 1}
options = {"compress_level": 1, "save_all": True}

def get_command(self, file, **options):
command = self.get_command_ex(file, **options)[0]
Expand Down