MacOS "Comments" field of image (when getting info): Read and write?
Posted: 2016-12-24T13:17:07-07:00
Hello,
(my IM version info is in my signature)
I am converting a bunch of images to a specific file format (JPG) and I need to store the original file names in the metadata of the image.
For example: "foo.png" gets converted to "foo.jpg" and its original file name gets stored in the meta data of the converted image file (I am throwing out the PNG version after conversion by IM).
I noticed, when getting info on a test image, that there is a "Comments" field:
But when I try to read the exif info, I don't see "comments":
… and:
Question(s):
1. Using IM, Is it possible for me to read and write to the comments section of the image's meta data (as seen in above screen shot).
2. If you had to store the original file name in an image, where would you put it? Should I use Exif or IPTC fields for this?
3. Can IM read/write Exif/IPTC or "get info" (as seen above in screen shot)?
Thanks a billion for you help, I really appreciate it!
(my IM version info is in my signature)
I am converting a bunch of images to a specific file format (JPG) and I need to store the original file names in the metadata of the image.
For example: "foo.png" gets converted to "foo.jpg" and its original file name gets stored in the meta data of the converted image file (I am throwing out the PNG version after conversion by IM).
I noticed, when getting info on a test image, that there is a "Comments" field:
But when I try to read the exif info, I don't see "comments":
Code: Select all
$ identify -format '%[EXIF:*]' test.jpg
exif:ColorSpace=1
exif:DateTime=2016:12:24 12:07:49
exif:ExifImageLength=1500
exif:ExifImageWidth=2100
exif:ExifOffset=172
exif:Orientation=1
exif:ResolutionUnit=2
exif:Software=Adobe Photoshop CC 2017 (Macintosh)
exif:thumbnail:Compression=6
exif:thumbnail:JPEGInterchangeFormat=310
exif:thumbnail:JPEGInterchangeFormatLength=920
exif:thumbnail:ResolutionUnit=2
exif:thumbnail:XResolution=72/1
exif:thumbnail:YResolution=72/1
exif:XResolution=3000000/10000
exif:YResolution=3000000/10000
Code: Select all
$ identify -verbose test.jpg
Image: test.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 2100x1500+0+0
Resolution: 300x300
Print size: 7x5
Units: PixelsPerInch
Type: Bilevel
Endianess: Undefined
Colorspace: sRGB
Depth: 8/1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Pixels: 3150000
Gray:
min: 255 (1)
max: 255 (1)
mean: 255 (1)
standard deviation: nan (nan)
kurtosis: nan
skewness: nan
entropy: nan
Colors: 1
Histogram:
3150000: (255,255,255) #FFFFFF gray(255)
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2100x1500+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 99
Orientation: TopLeft
Properties:
date:create: 2016-12-24T12:08:13-08:00
date:modify: 2016-12-24T12:07:52-08:00
exif:ColorSpace: 1
exif:DateTime: 2016:12:24 12:07:49
exif:ExifImageLength: 1500
exif:ExifImageWidth: 2100
exif:ExifOffset: 172
exif:Orientation: 1
exif:ResolutionUnit: 2
exif:Software: Adobe Photoshop CC 2017 (Macintosh)
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 310
exif:thumbnail:JPEGInterchangeFormatLength: 920
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
exif:XResolution: 3000000/10000
exif:YResolution: 3000000/10000
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: 5efb91b21ee3e35677d9c72f0f95990a8b55e96ae1a6541f6bf41b9e16f54930
Profiles:
Profile-8bim: 3190 bytes
Profile-exif: 1236 bytes
Profile-icc: 3144 bytes
Profile-xmp: 3339 bytes
Artifacts:
filename: test.jpg
verbose: true
Tainted: False
Filesize: 222KB
Number pixels: 3.15M
Pixels per second: 39.38MB
User time: 0.060u
Elapsed time: 0:01.079
Version: ImageMagick 6.9.7-0 Q16 x86_64 2016-12-18 http://www.imagemagick.org
1. Using IM, Is it possible for me to read and write to the comments section of the image's meta data (as seen in above screen shot).
2. If you had to store the original file name in an image, where would you put it? Should I use Exif or IPTC fields for this?
3. Can IM read/write Exif/IPTC or "get info" (as seen above in screen shot)?
Thanks a billion for you help, I really appreciate it!