passing options to an image plugin encoder

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

passing options to an image plugin encoder

Patricio Stegmann-2
Hello all,

I developped a WSQ image plugin (for fingerprint images).
It works fine for encode and decode functions.
However there are options one would love to pass. The options are, for example, the target bitrate of the compression, or the image comments (to be put on the image headers).
I dont know how to do that. I tried to add some info keys like bitrate etc... However if I print the .info dict on the _save method, it is always empty !

>>> import Image
>>> l__img = Image.open('fgp_1.wsq')
>>> l__img.info['bitrate'] = 0.1
>>> l__img.save('0_1.wsq')
>>> print l__img.info
{}
>>>

And obviously the action is not performed. How can I pass options, arguments, keywords or whatever to the encoder so I can read them on the _save method ?

Thank you,


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