Page 1 of 1

Adding copyright metadata to image?

Posted: 2012-01-16T13:11:26-07:00
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

Re: Adding copyright metadata to image?

Posted: 2012-01-16T13:30:20-07:00
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

Re: Adding copyright metadata to image?

Posted: 2012-01-16T15:37:33-07:00
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