[Image-SIG] PIL 1.1.5: jpeg comment

Rudolf Bahr quasi at web.de
Sun Sep 19 21:47:36 CEST 2004


Debian/unstable, kernel 2.6.8.1, PIL 1.1.5a5, python 2.3
========================================================

Due to a patch described and announced in the January Archive it 
is now possible in PIL 1.1.5 to retrieve comments in jpeg-files:

import Image
im = Image.open('myimage.jpg')
print im.app['COM']

This brings up the comment which has been stored by GIMP, convert 
or some other program.

My question is now:

Is it intended, sometime in the future, to be able to store a new 
comment, for instance, by:

im.app['COM']='My new comment text'
im.save('myimage-1.jpg')

or, how could I store a comment in jpeg-files using PIL?
This might be interesting in conjunction with im.show().

Users are never satisfied :-)

Regards,

Rudolf Bahr


More information about the Image-SIG mailing list