I am trying to add a comment to an image using imagemagick and read it back For adding a comment i can do
convert -comment "processed" original.jpg converted.jpg
Now the output of identify -verbose converted.jpeg
Properties:
comment: processed
date:create: 2017-05-17T12:22:36+06:00
date:modify: 2017-05-17T12:22:36+06:00
exif:ColorSpace: 1
exif:DateTime: 2017:02:04 12:21:36
exif:ExifImageLength: 1273
exif:ExifImageWidth: 900
exif:ExifOffset: 164
exif:Orientation: 1
exif:ResolutionUnit: 2
exif:Software: Adobe Photoshop CS5 Windows
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 302
exif:thumbnail:JPEGInterchangeFormatLength: 3805
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 300/1
exif:thumbnail:YResolution: 300/1
Is there a cleaner way to read back the comments other than
identify -verbose converted.jpg | grep 'comment'