Cleaning IPTC metadata erases Photoshop JPEG markers (APP13)

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

User avatar
Moderator & Librarian
Posts: 6350
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Cleaning IPTC metadata erases Photoshop JPEG markers (APP13)

Post by XnTriq »

<!--// This topic is a spin-off of “XnConvert Removes Image Paths”. //-->

Start XnView v2.49.2, select E5440a.jpg in the browser, and go to EditMetadataClean…:


E5440a.jpg inspected with Stuffware Photo Studio:


Photoshop (vector) clipping paths: wrote:Photoshop tags are found in PSD and PSB files, as well as inside embedded Photoshop information in many other file types (JPEG, TIFF, PDF, PNG to name a few).

Many Photoshop tags are marked as Unknown (indicated by a question mark after the tag name) because the information they provide is not very useful under normal circumstances. These unknown tags are not extracted unless the Unknown (-u) option is used. See ... matashtml/ for the official specification wrote:Image resource blocks are the basic building unit of several file formats, including Photoshop's native file format, JPEG, and TIFF. Image resources are used to store non-pixel data associated with images, such as pen tool paths.

They are referred to as resource blocks because they hold data that was stored in the Macintosh's resource fork in early versions of Photoshop. wrote:The Adobe's Photoshop program, a de-facto standard for image manipulation, uses the APP13 segment for storing non-graphic information, such as layers, paths, IPTC data and more. The unit for this kind of information is called a "resource data block" (because they hold data that was stored in the Macintosh's resource fork in early versions of Photoshop). The content of an APP13 segment is formed by an identifier string (usually "Photoshop 3.0\000", but also 'Adobe_Photoshop2.5:', used by earlier versions, is accepted; in this case some additional undocumented bytes are read (resolution info?) and saved in a root 'Resolution' record) followed by a sequence of resource data blocks; a resource block has the following structure:

Code: Select all

[Record name]    [size]   [description]
(Type)           4 bytes  Photoshop uses '8BIM' from ver 4.0 on
(ID)             2 bytes  a unique identifier, e.g., "\004\004" for IPTC
(Name)             ...    a Pascal string (padded to make size even)
(Size)           4 bytes  actual size of resource data
(Data)             ...    resource data, padded to make size even
(a Pascal string is made up of a single byte, giving the string length, followed by the string itself, padded to make size even including the length byte; since the string length is explicit, there is no need of a terminating null character). The signature (type) is usually '8BIM', but Photoshop used '8BPS' up to version 3.0, and some rogue program (Adobe PhotoDeluxe?) is using 'PHUT' ("PHotoshop User Tags" ?) for path information (ID=7d0-bb7). Valid Image Resource IDs are listed in the Photoshop-style tags' list section. In general a resource block contains only a few bytes, but there is an important block, the IPTC block, which can be quite large; the structure of this block is analysed in more detail in the IPTC data block section.
You do not have the required permissions to view the files attached to this post.