Modifying JPEG compression with PIL?

Dinu C. Gherman gherman at darwin.in-berlin.de
Tue May 16 13:39:04 EDT 2000


Fredrik Lundh wrote:
> 
> Dinu C. Gherman <gherman at darwin.in-berlin.de> wrote:
> > Sorry, but I always fail to find appropriate PIL documenta-
> > tion, so forgive me when I ask if using PIL I can take a JPEG
> > and increase its compression, so it will shrink in file size
> > (and lose data as well)? If so, where can I read how to do
> > it?
> 
> im.save("foo.jpg", quality=50)
> 
> http://www.pythonware.com/library/pil/handbook/image.htm
> http://www.pythonware.com/library/pil/handbook/formats.htm
> 
> </F>
> 
> <!-- (the eff-bot guide to) the standard python library:
> http://www.pythonware.com/people/fredrik/librarybook.htm
> -->

Thanks Fredrik! I'll bookmark it right away!

Dinu

-- 
Dinu C. Gherman
................................................................
"The only possible values [for quality] are 'excellent' and 'in-
sanely excellent', depending on whether lives are at stake or 
not. Otherwise you don't enjoy your work, you don't work well, 
and the project goes down the drain." 
                    (Kent Beck, "Extreme Programming Explained")



More information about the Python-list mailing list