Re: [matplotlib-devel] Adding more image format support...

2010-07-07 Thread Friedrich Romstedt
2010/7/7 Michael Droettboom :
> Thanks for the offer.  In the meantime, I committed something myself for
> this.  (I should have written back to the list, sorry...)
>
> I'd still be interested in seeing your patch in case there's something extra
> or better in it that mine doesn't do.

Ok, nice, here it is.  I'd be interested in your approach if it differs.

Friedrich


figure_canvas.py
Description: Binary data
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Adding more image format support...

2010-07-07 Thread Michael Droettboom
Thanks for the offer.  In the meantime, I committed something myself for 
this.  (I should have written back to the list, sorry...)

I'd still be interested in seeing your patch in case there's something 
extra or better in it that mine doesn't do.

Mike

On 07/07/2010 02:43 PM, Friedrich Romstedt wrote:
> 2010/7/6 Michael Droettboom:
>
>> One solution to this may be to add an optional dependency on PIL, and if
>> found save JPEG files (and maybe some of the other esoteric formats PIL
>> supports).  The work done a couple of years back to manage the supported
>> file types should make this pretty easy.
>>  
> I wrote a backend for PIL, if there is interest, I can show the code.
> But it's just so easy, and maybe I'm just interfering with the pyplot
> internals, so fwiw.
>
> Friedrich
>


-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Adding more image format support...

2010-07-07 Thread Friedrich Romstedt
2010/7/6 Michael Droettboom :
> One solution to this may be to add an optional dependency on PIL, and if
> found save JPEG files (and maybe some of the other esoteric formats PIL
> supports).  The work done a couple of years back to manage the supported
> file types should make this pretty easy.

I wrote a backend for PIL, if there is interest, I can show the code.
But it's just so easy, and maybe I'm just interfering with the pyplot
internals, so fwiw.

Friedrich

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Adding more image format support...

2010-07-06 Thread John Hunter
On Tue, Jul 6, 2010 at 2:07 PM, Michael Droettboom  wrote:
> We've had some requests from internal users here at STScI to make it
> easier to save JPEG files directly from matplotlib.  We currently
> support JPEG saving from the Gtk* and Wx* backends (because those
> libraries come with JPEG saving support), but not in the Tk backend that
> most of our users use.
>
> One solution to this may be to add an optional dependency on PIL, and if
> found save JPEG files (and maybe some of the other esoteric formats PIL
> supports).  The work done a couple of years back to manage the supported
> file types should make this pretty easy.
>
> While adding a hard dependency on PIL is probably not a good idea, are
> there any objections to making it a soft dependency?

No objections from me -- we already optionally use it in imread.

JDH

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Adding more image format support...

2010-07-06 Thread Ryan May
On Tue, Jul 6, 2010 at 2:07 PM, Michael Droettboom  wrote:
> We've had some requests from internal users here at STScI to make it
> easier to save JPEG files directly from matplotlib.  We currently
> support JPEG saving from the Gtk* and Wx* backends (because those
> libraries come with JPEG saving support), but not in the Tk backend that
> most of our users use.
>
> One solution to this may be to add an optional dependency on PIL, and if
> found save JPEG files (and maybe some of the other esoteric formats PIL
> supports).  The work done a couple of years back to manage the supported
> file types should make this pretty easy.
>
> While adding a hard dependency on PIL is probably not a good idea, are
> there any objections to making it a soft dependency?

None here, especially when the alternative is writing our own bindings
to the jpeg library.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Adding more image format support...

2010-07-06 Thread Michael Droettboom
We've had some requests from internal users here at STScI to make it 
easier to save JPEG files directly from matplotlib.  We currently 
support JPEG saving from the Gtk* and Wx* backends (because those 
libraries come with JPEG saving support), but not in the Tk backend that 
most of our users use.

One solution to this may be to add an optional dependency on PIL, and if 
found save JPEG files (and maybe some of the other esoteric formats PIL 
supports).  The work done a couple of years back to manage the supported 
file types should make this pretty easy.

While adding a hard dependency on PIL is probably not a good idea, are 
there any objections to making it a soft dependency?

Mike

-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel