Adding copyright metadata to image?

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
joeya
Posts: 1
Joined: 2012-01-16T13:07:59-07:00
Authentication code: 8675308

Adding copyright metadata to image?

Post by joeya »

I'm struggling with adding a simple copyright to the metadata of existing JPG images. (I'm using Rmagick to make these changes, but any pointers appreciated.)

I don't want to replace all metadata, just add a single entry.

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

Re: Adding copyright metadata to image?

Post by fmw42 »

see -comment

http://www.imagemagick.org/script/comma ... a4#comment

You have to use -comment before reading in the image. Or use -set comment after reading in the image.

convert -comment "this is a comment" rose: rose.png
or
convert rose: -set comment "this is a comment" rose.png

identify -verbose rose.png
....

Properties:
comment: this is a comment
date:create: 2012-01-16T12:32:04-08:00
date:modify: 2012-01-16T12:32:04-08:00
png:bKGD : chunk was found (see Background color, above)
png:IHDR.bit_depth : 8
png:IHDR.color_type : 2
png:IHDR.interlace_method: 0
png:IHDR.width,height : 70, 46
png:pHYs : x_res=72, y_res=72, units=0
png:text : 3 tEXt/zTXt/iTXt chunks were found
signature: a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Adding copyright metadata to image?

Post by el_supremo »

IM will decompress the JPG data on input and then recompresss on output, which can degrade the image. You would be better off using a program which only alters the metadata. I forget the names - jhead is one I think?

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply