Skip to content

Why does PiDNG store all tags in IFD0 ? #65

@pinchartl

Description

@pinchartl

It recently came to my attention, through a patch sent to the libcamera mailing list (https://lists.libcamera.org/pipermail/libcamera-devel/2022-July/032036.html), that PiDNG stores all tags in IFD0.

The DNG specification (https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/dng_spec_1_6_0_0.pdf) states the following, in the subIFDs trees section:

DNG recommends the use of SubIFD trees, as described in the TIFF-EP
specification. SubIFD chains are not supported.

The highest-resolution and quality IFD should use NewSubFileType
equal to 0. Reduced resolution (or quality) thumbnails or previews,
if any, should use NewSubFileType equal to 1 (for a primary preview)
or 10001.H (for an alternate preview).

DNG recommends, but does not require, that the first IFD contain a
low-resolution thumbnail, as described in the TIFF-EP specification.

and in the metadata section:

Additional metadata may be embedded in DNG in the following ways:

• Using TIFF-EP or EXIF metadata tags
• Using the IPTC metadata tag (33723)
• Using the XMP metadata tag (700)

Note that TIFF-EP and EXIF use nearly the same metadata tag set, but
TIFF-EP stores the tags in IFD 0, while EXIF store the tags in a
separate IFD. Either location is allowed by DNG, but the EXIF
location is preferred.

While the DNG specification seems to allow storing the EXIF tags in IFD0, as well as storing the main image there too, that isn't recommended. I would thus like to know why PiDNG does it this way, and if you are maybe following a newer or better specification or recommendation I would have missed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions