ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[Image-SIG] generating images of different sizes
by Rajorshi Biswas other posts by this author
Jul 20 2004 12:19PM messages near this date
Re: [Image-SIG] generating images of different sizes | [Image-SIG] (no subject)
Hi,
 This is my first post to the image-sig mailing list, so
hello to you all.
 My knowledge of different file formats is somewhat limited.
What I have to do is essentially this : Given a resolution
(such as 352x288) and a file-size (such as 300KB), I have
to generate images using PIL of the following formats:
[ jpeg, gif, wbmp, bmp, png, tiff ]. 
 I have achieved the first part, that is I can, starting
from a jpg image, generate all the other types with any
resolution (by resizing and using PIL's Image.save). But
I have no control over file size.
 To do that I found that there's a variant of the Image.save
method that takes in a third parameter:
Image.save( filename, format, options ).
 The PIL manual says that 
"Keyword options can be used to provide additional 
instructions to the writer. If a writer doesn't recognise 
an option, it is silently ignored. The available options 
are described later in this handbook."
 Could someone please tell me what these options are ?
I seem to be unable to find the 'options' in the manual.
If it is not there, could someone tell me,

1] What i need to do to reduce the size of the tiff files
I generate, what options I need to add to the call
Image.save('a.tiff') .

2] Same for bmp files.
 
 That's a lot of queries for the first post! Please help!

Thanks.
Rajorshi



_______________________________________________
Image-SIG maillist  -  Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved