Missing Xmp & Iptc metadata in TIF files? #3049
-
|
Hi! This may be related to a similar question I brought up as regards PNG files (#3045). I think Xmp & Iptc metadata is not being written to TIF files when they are saved. I attempted to add additional keywords to the attached file (which was created in Photoshop, and had keywords added in Bridge). I stepped through the ImageSharp source code when SaveAsync() was called, and while the Xmp/Iptc metadata I'd added was present in the Image object, only Exif metadata appeared to be processed. I also didn't see any methods for writing Xmp/Iptc metadata in the TIF encoder, like I see with the JPG encoder. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
TIFF is a container format. Metadata is stored per Image File Directory (IFD), not as a single global block. In ImageSharp this maps to metadata living on Storing these profiles at the image level would either require arbitrarily picking one frame’s metadata or attempting to merge profiles, both of which are lossy and incorrect. Keeping metadata frame-scoped preserves round-tripping and makes mutations explicit. I’ve verified that the XMP/IPTC metadata is present on the root frame and that it roundtrips through the TIFF encoder. Ensuring the data is updated is handled explicitly by the |
Beta Was this translation helpful? Give feedback.
TIFF is a container format. Metadata is stored per Image File Directory (IFD), not as a single global block.
In ImageSharp this maps to metadata living on
ImageFrameMetadatarather thanImageMetadata, because each frame (page) in a TIFF can legally carry its own independent tag set. That includes XMP, IPTC, EXIF, ICC, resolution, orientation, compression, etc. Multi-page TIFFs commonly differ per frame, and there is no safe or spec-defined way to merge or “globalise” those profiles.Storing these profiles at the image level would either require arbitrarily picking one frame’s metadata or attempting to merge profiles, both of which are lossy and incorrect. Keeping metadata frame-scoped pre…