Add tag to JPEG APP13

Started by msundell, March 18, 2014, 06:58:08 AM

Previous topic - Next topic

msundell

I'm in no way an exif (or metadata) expert and this subject is most likely a newbie thing.
I've got two JPG files, one of them saved with Photoshop and another one coming from ImageMagick. In Photoshop a Path can be converted into a clipping path, this will act as a notification to other Adobe products that the Path should be used as the default clipping path when opening a "Photoshop saved" jpg file.

This information is put into the EXIF data "JPEG APP13":

exiftool.exe -a -s C:\temp\photoshop_file.jpg -v

JPEG APP13 (13834 bytes):
  + [Photoshop directory, 13820 bytes]
  | IPTCData (SubDirectory) -->
  | + [IPTC directory, 15 bytes]
  | | CurrentIPTCDigest = ....P$.&.F=....9
  | | -- IPTCEnvelope record --
  | | CodedCharacterSet = .%G
  | | -- IPTCApplication record --
  | | ApplicationRecordVersion = 60915
  | IPTCDigest = ....P$.&.F=....9
  | Photoshop_0x043a = ...printOutput.ClrSenumClrSRGBCInteenumInteClrmMpBlbool..printSi[snip]
  | Photoshop_0x043b = ...printOutputOptions.CptnboolClbrboolRgsMboolCrnCboolCntCboolLb[snip]
  | ResolutionInfo (SubDirectory) -->
  | + [BinaryData directory, 16 bytes]
  | | XResolution = 19660800
  | | DisplayedUnitsX = 1
  | | YResolution = 19660800
  | | DisplayedUnitsY = 1
  | PrintScale = ?.
  | GlobalAngle = .
  | GlobalAltitude = .
  | PrintFlags = .
  | PrintFlagsInfo = ..
  | ColorHalftoningInfo = /ff.lff../ff......2.Z..5.-..
  | ColorTransferFuncs = ..............................................................[snip]
  | GridGuidesInfo = ..@.@
  | URL_List =
  | Slices = ..P...PE416392.....P...null..boundsObjc.Rct1.Top longLeftlongBtomlong.PRgh[snip]
  | PixelAspectRatio = .?.
  | IDsBaseValue = .
  | PhotoshopThumbnail = .................Adobe_CM....Adobed...........................[snip]
  | VersionInfo = ...Adobe Photoshop.Adobe Photoshop CS5.1.
  | Photoshop_0x07d0 = ........Q.j...Q.j...Q.j....RM....RM....RM.....R.:...R.:...R.:...[snip]
  | ClippingPathName = .Path1..
  | JPEG_Quality (SubDirectory) -->
  | + [BinaryData directory, 7 bytes]
  | | PhotoshopQuality = 4
  | | PhotoshopFormat = 0
  | | ProgressiveScans = 1


BUT when I list exif for our ImageMagick file:

JPEG APP13 (8870 bytes):
  + [Photoshop directory, 8856 bytes]
  | Photoshop_0x07d0 = ......Q.j...Q.j...Q.j....RM....RM....RM.....R.:...R.:...R.:....T[snip]

So - is it possible to add the ClippingPath to the JPEG APP13 group of tags using exiftool? I've tried to -ClippingPath+=Path1 but it won't work and the tag is not writable. I need to address the JPEG APP13 group somehow.

Thanks,

Mikael

Phil Harvey

Hi Mikael,

I suspect that you will have to write the path as well as the clipping path name for this to work.  I don't have time to help you in detail right now, but here is a thread that talks about how to create user-defined tags to copy the paths.  Copying the clipping path name could be done in a similar manner.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

msundell

Hi Phil!
Tested the following code (from the thread):

c:\exiftool.exe -u -tagsFromFile 03.jpg -Photoshop:all 04.jpg

I need to create a script for ExifTool in order to remove the "Protected" and "ValueConv" flag from the input data?
The exiftool executable can't be used?
Thanks,
Mikael

Phil Harvey

Hi Mikael,

You need the config file from the other thread to be installed for the paths to be copied.  It is this config file that needs to be modified to remove the Protected and ValueConv, and to add your ClippingPathName.

See the sample config file for instructions on using a config file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).