You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix in backend_bases.py:
Add the keyword-argument "format" and set it to "jpeg" in the print function
line 1819:
def print_jpg(self, filename_or_obj, *args, **kwargs):
#[...] function body
#Replcace this line:
return image.save(filename_or_obj, **options)
#By this one:
return image.save(filename_or_obj, format="jpeg", **options)
It might seem quick&dirty but the format information is lost on the print_method(...) call [which leads to print_jpg( )] in print_figure(...)
Thank you!
Python 2.7 Matplotlib 1.1.0 via Python(x,y) on Windows XP Pro
The text was updated successfully, but these errors were encountered:
From what I've seen it seems to concern only the formats requiring PIL image.save( ), so I believe it would be only for JPG and TIF. PNG works like a charm "as is".
Hello!
I have a project which requires me to render my figure to my IIS Web Server in JPG format (constraint due to an old browser).
Using AGG backend and saving file to a StringIO, you get an "unknown extension" Error
To reproduce:
Work-around "client-code"-side: giving a "name" attribute to the stream
Fix in backend_bases.py:
Add the keyword-argument "format" and set it to "jpeg" in the print function
It might seem quick&dirty but the format information is lost on the print_method(...) call [which leads to print_jpg( )] in print_figure(...)
Thank you!
Python 2.7 Matplotlib 1.1.0 via Python(x,y) on Windows XP Pro
The text was updated successfully, but these errors were encountered: