473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Adding a comment to an image using PIL

I am trying to use PIL to add a comment to an image. I have never used PIL
before, but I discovered that it is possible to print an existing comment
with the following:

im = PIL.Image.open('filename.jpg')
print im.app['COM']

I figured that I could write a comment by reversing this procedure:

im.app['COM'] = 'New comment'
im.save('newfilename.jpg')

However, when I open newfilename.jpg, I find that key 'COM' does not
exist -- the comment is not being written. Presumably, I am doing
something wrong.
--
Jeffrey Barish

Oct 31 '06 #1
0 1045

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jay Sartoris | last post by:
Hi, I'm adding a node to my XML document using DOM. When I serialize it, I lose my comments that are above my root node. I've created an OutputFormat obect and set the setOmitComments(false)...
2
by: Gail Zacharias | last post by:
I am investigating the possibility of using pgsql as the database in an application. I have some unusual requirements that I'd like to ask you all about. I apologize in advance if my terminology is...
1
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
7
by: Adam Maltby | last post by:
Hi, I am adding an new picbox and animated gif to it at runtime Dim img As Image = Image.FromFile(Application.StartupPath & "\animation.gif") With pic_Wait .Location = New Point(300, 250)...
2
by: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new...
5
by: Neo Geshel | last post by:
Greetings. I am in a very big pickle. I am trying to add page content - as well as a submit button - programatically to a web form that is supposed to submit to DB and then refresh. That...
3
by: Earl | last post by:
Looking for an idea here. I've got a .Net app connecting to SQL2005 where I allow users to add pictures to the database. But I don't want them adding gigantic images, so I'm looking for an idea on...
1
by: Joe Cool | last post by:
I am attempting to add a function to an application I am working on to modify the JPEG Comment in a Jpeg image file. I can retrieve the JPEG Comment with no problem. The problem is modifying it....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.