Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1cbbd1

Browse filesBrowse files
committed
Fix tiff and jpeg export via PIL
1 parent 2b4ab26 commit b1cbbd1
Copy full SHA for b1cbbd1

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ def print_jpg(self, filename_or_obj, *args, **kwargs):
18831883
image = Image.frombuffer('RGBA', size, buf, 'raw', 'RGBA', 0, 1)
18841884
options = cbook.restrict_dict(kwargs, ['quality', 'optimize',
18851885
'progressive'])
1886-
return image.save(filename_or_obj, **options)
1886+
return image.save(filename_or_obj, format='jpeg', **options)
18871887
print_jpeg = print_jpg
18881888

18891889
filetypes['tif'] = filetypes['tiff'] = 'Tagged Image File Format'
@@ -1893,7 +1893,7 @@ def print_tif(self, filename_or_obj, *args, **kwargs):
18931893
buf, size = agg.print_to_buffer()
18941894
if kwargs.pop("dryrun", False): return
18951895
image = Image.frombuffer('RGBA', size, buf, 'raw', 'RGBA', 0, 1)
1896-
return image.save(filename_or_obj)
1896+
return image.save(filename_or_obj, format='tiff')
18971897
print_tiff = print_tif
18981898

18991899
def get_supported_filetypes(self):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.