Add "comment information" to images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Add "comment information" to images

Post by Albireo »

Hello!

It's easy to remove "profile and comment information" from the images.
But if I want to add some information.
(rounded corner, soft edge, some text or something)

It's possible?

//Jan
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Add "comment information" to images

Post by fmw42 »

don't really understand what you want! what does adding round corners to an image have to do with comments.

for adding comments, see http://www.imagemagick.org/script/comma ... hp#comment

for adding text onto an image see http://www.imagemagick.org/Usage/text/
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Add "comment information" to images

Post by Bonzo »

If you are talking about EXIF data etc. I do not think you can add or modify it, only delete it.
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Re: Add "comment information" to images

Post by Albireo »

Thanks for the tip!
I don't know how to use this "-comment"
How can I put the comment in the images?
(I've tried to just put the "-comment" in a convert command, but failed.
I have also searched for examples of "command" but have not found.)
and
How can I read the comment?

________________________________________

Usage:
If there are a variety of images in a directory
and all are treated different, sometimes it would be good to know how the image is modified.

This could be solved by giving the picture a long descriptive name
(but I think it's hard to handle long file names)

//Jan
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Add "comment information" to images

Post by Bonzo »

I had forgotten about -comment

I have tried adding a comment to a jpg, miff & png. I do not get any errors but I am unable to find the comment; I have tried a hex viewer, EXIF tool. Was it added ?
dawnsong
Posts: 3
Joined: 2015-12-09T23:17:11-07:00
Authentication code: 1151

Re: Add "comment information" to images

Post by dawnsong »

This way to retrieve your comments:

Code: Select all

identify -verbose commentedPciture.png |grep comment
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Add "comment information" to images

Post by fmw42 »

When you say you want to add a comment to the image, does that mean having the text in a meta data comment field or imbedded into the image pixel data so it can be read when viewing the image. If the latter, do you want to add it in the image or below the image. Please be more specific.

To add textual information in the comment field,

Code: Select all

convert image -set comment "sometext" image
To retrieve text in the command field,

Code: Select all

convert image -format "%c" info:
What is your IM version and platform? Please always provide that information, since syntax may differ.
Post Reply