IPTC??

H
Posted By
hobbacher
Jan 1, 2005
Views
545
Replies
1
Status
Closed
Sometimes my Photoshop (ver 4) does not recognize the IPTC comments, which wrote with other programs. What can I do? Or should I abstain from usinf Ps for IPTC comments?

AFH

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

T
toby
Jan 3, 2005
Photoshop likes its IPTC data inside its image resources and in a specific format. Here are some notes I wrote regarding embedding Photoshop metadata in JFIF. This may be somewhat out of date with respect to the latest versions of Photoshop, but the guidelines below should be backwards compatible.

—– 8 Feb 2004
You need to add an application specific marker to a JFIF file. The JFIF format spec can be found here: http://www.ijg.org/files/

The JFIF spec does not mention the APP13 (0xED) marker used by Adobe, but paraphrasing that document, the Photoshop image resources (metadata) marker appears to have the following format:

X’FF’, X’ED’ [=M_APP13], length, identifier, image resources data

length (2 bytes) Total field byte count, including the byte count value (2 bytes), but excluding the
marker itself

identifier This zero terminated string ("Photoshop 3.0") uniquely
identifies this marker.
= 50 68 6F 74 6F 73 68 6F 70 20 33 2E 30 00

The content of this marker is the Photoshop image resource data, which is described in the Photoshop SDK ("Photoshop File Formats.pdf", chapter 2).

The IPTC-NAA record (File Info information) is stored as an image resource with ID = 0x0404 (1028). The format of this data is also documented in the SDK ("iimv4.pdf"). Note that Photoshop uses only a small subset of the datasets defined in that document, and uses an application record (2:xx) only; it does not write the object envelope record (1:xx). It uses a tag marker = 0x1c (which I can’t find documented).

Within the IPTC data, several datasets comprise the File Info. The C code posted earlier – which was derived from the IPTC spec – should be sufficient to construct this data.

Note that Photoshop stores many other image resources for different non-pixel parts of the document (paths, for example) – these should be preserved.

In summary, the resulting JPG consists of several nested data formats like the layers of an onion:

JFIF (.JPG):
JFIF APP0 marker
APP13 marker, containing Photoshop image resource data:
image resource ID=1028 (File Info), in IPTC-NAA format:
Application record (2), for example:
Version dataset 2:00 (this is mandatory in the IPTC spec) Keyword dataset(s) 2:25
Caption dataset(s) 2:120
….more datasets…
….more image resources…
….more markers, including JPEG data…
(end)

You may find the IJG Group’s tools and source code (link above) useful,
e.g.
djpeg -v test.jpg
gives a rough breakdown of the JFIF contents.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections