diff --git a/PIL/Image.py b/PIL/Image.py index e0e458057..1fb959a69 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -577,7 +577,7 @@ class Image(object): self.pyaccess = None self.readonly = 0 - def _dump(self, file=None, format=None): + def _dump(self, file=None, format=None, **options): import tempfile suffix = '' if format: @@ -588,11 +588,11 @@ class Image(object): self.load() if not format or format == "PPM": - self.im.save_ppm(file) + self.im.save_ppm(file, **options) else: if not file.endswith(format): file = file + "." + format - self.save(file, format, compress_level=1) + self.save(file, format, **options) return file def __eq__(self, other): diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py index 23e0126a7..6ea574d73 100644 --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -87,7 +87,7 @@ class Viewer(object): def save_image(self, image): """Save to temporary file, and return filename""" - return image._dump(format=self.get_format(image)) + return image._dump(format=self.get_format(image), compress_level=1) def show_image(self, image, **options): """Display given image"""