Saving image in .jpeg format

Hi all,
I have always used .png format for my matplotlib applications but now i am
compelled to save many figures in .jpeg format.
Those image should be automatically saved (no GUI) but i can't find out how to
save the images.

Executing this scripts

import pylab as p

It gives me this error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 345, in
    return fig.savefig(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 990, in
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/", line
1373, in print_figure
    '%s.' % (format, ', '.join(formats)))
ValueError: Format "jpg" is not supported.
Supported formats: emf, eps, pdf, png, ps, raw, rgba, svg, svgz.

Can anyone help me ? (.jpeg extension it doesn't work too)
By the way, what is the best backend to fulfill the task ? (better quality and
less memory leackage ?)

Thank you


Emanuele Passera

Tele-Rilevamento Europa - T.R.E. s.r.l.
a POLIMI spin-off company
Via Vittoria Colonna, 7
20149 Milano - Italia
tel.: +39.02.4343.121
fax: +39.02.4343.1230
e-mail: emanuele.passera@...1676...