mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-18 19:24:47 +03:00
pushing compress_level=1 further to the caller of Image._dump() at ImageShow.save_image()
This commit is contained in:
parent
26119d7e2e
commit
55a6bea81c
|
@ -577,7 +577,7 @@ class Image(object):
|
||||||
self.pyaccess = None
|
self.pyaccess = None
|
||||||
self.readonly = 0
|
self.readonly = 0
|
||||||
|
|
||||||
def _dump(self, file=None, format=None):
|
def _dump(self, file=None, format=None, **options):
|
||||||
import tempfile
|
import tempfile
|
||||||
suffix = ''
|
suffix = ''
|
||||||
if format:
|
if format:
|
||||||
|
@ -588,11 +588,11 @@ class Image(object):
|
||||||
|
|
||||||
self.load()
|
self.load()
|
||||||
if not format or format == "PPM":
|
if not format or format == "PPM":
|
||||||
self.im.save_ppm(file)
|
self.im.save_ppm(file, **options)
|
||||||
else:
|
else:
|
||||||
if not file.endswith(format):
|
if not file.endswith(format):
|
||||||
file = file + "." + format
|
file = file + "." + format
|
||||||
self.save(file, format, compress_level=1)
|
self.save(file, format, **options)
|
||||||
return file
|
return file
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Viewer(object):
|
||||||
|
|
||||||
def save_image(self, image):
|
def save_image(self, image):
|
||||||
"""Save to temporary file, and return filename"""
|
"""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):
|
def show_image(self, image, **options):
|
||||||
"""Display given image"""
|
"""Display given image"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user