Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to save High Quality JPG image by setting Image module from PIL

Reply
Thread Tools

How to save High Quality JPG image by setting Image module from PIL

 
 
Daniel Mark
Guest
Posts: n/a
 
      09-25-2006
hello all:

I am using Image module from PIL to save created image as JPG format.

Is there any option I could set for function Image.save so that the
stored image will have the highest quality.



Thank you
-Daniel

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      09-25-2006
Daniel Mark wrote:

> I am using Image module from PIL to save created image as JPG format.
>
> Is there any option I could set for function Image.save so that the
> stored image will have the highest quality.


something like

im.save(filename, quality=90)

should do the trick.

if you want to play with the quality setting, reading the "jpeg quality
100 is overkill" part of this post:

http://article.gmane.org/gmane.comp....match=overkill

might also be a good idea.

</F>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
PIL: Wiping out metadata on save only on progressive JPG's frankborell@gmail.com Python 0 01-26-2010 01:52 PM
PIL: problem to convert an image array to PIL format Sverre Python 2 12-17-2009 04:33 PM
looks like in PIL, resize() will give high quality thumbnails than thumbnail() Summercoolness@gmail.com Python 1 07-01-2006 10:58 AM
Quality setting for saved jpg files Miles Computer Support 6 04-14-2005 08:05 AM



Advertisments