On Sat, Oct 2, 2010 at 12:39 PM, Jouni K. Seppänen <firstname.lastname@example.org> wrote:
Wow, I didn't know. Last time I tried that I got a traceback, and
Benjamin Root <email@example.com
> And yet, we still allow for saving to jpegs.
assumed that it was not supported exactly because jpeg is a nonsensical
format for most graphs.
I just tried again, and got "TypeError: 'int' object is unsubscriptable"
from PIL/JpegImagePlugin.pyc in _save(im, fp, filename). I suppose this
doesn't get much testing.
Yeah, I just double-checked which backend I was using and it turned out to be GTKAgg (I forgot that I changed it at one point for a test). In TkAgg, I get the same error message you report.
> Also, matplotlib is also able to do imshow(), pcolor() and otherYes, I guess there are some circumstances in which this would make
> rasterized drawings, so we aren't restricted to just line drawings.
sense. Would supporting WebP require new library dependencies?
I am certainly not an expert, but it would appear that we offload a lot of the file-format stuff to PIL anyway. So, if PIL ever supports WebP, then I would imagine (although I could be wrong) that it would be fairly trivial to add support to WebP at least to whereever we support JPEG.