如何通过graphicsmagick命令编辑exif元数据?

时间:2015-10-20 07:11:35

标签: metadata exif graphicsmagick utilities

如何通过graphicsmagick命令编辑或添加exif元数据?我尝试了以下内容:

gm convert -set EXIF:XPKeywords "bird, sleep, moon" bird.jpg bird2.jpg

我的命令正在成功执行,图像正在创建,但exif元数据未更新。

1 个答案:

答案 0 :(得分:0)

我不相信你可以用GraphicsMagick做到这一点,我会建议exiv2这样:

exiv2 -M"add Exif.Image.XPKeywords Ascii 'bird,sleep,moon'" image.jpg

然后您也可以使用jhead查看它们:

jhead -v image.jpg

JFIF SOI marker: Units: 0 (aspect ratio)  X-density=1 Y-density=1
Exif header 50 bytes long
Exif section in Intel order
(dir has 1 entries)
    Windows-XP keywords = "bird,sleep,moon"
Approximate quality factor for qtable 0: 92 (scale 16.28, var 1.13)
Approximate quality factor for qtable 1: 92 (scale 16.20, var 0.15)
JPEG image is 2000w * 2000h, 3 color components, 8 bits per sample
File name    : image.jpg
File size    : 6968929 bytes
File date    : 2015:10:20 09:23:24
Resolution   : 2000 x 2000