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
Adding copyright metadata to image?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Adding copyright metadata to image?
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
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
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Adding copyright metadata to image?
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
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.
See my message in this topic for a link to a zip of all the files.