[Image-SIG] generating images of different sizes

Rajorshi Biswas rajorshi at alumnux.com
Tue Jul 20 14:19:04 CEST 2004

 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!


More information about the Image-SIG mailing list