The HTML spec just landed a change, telling browsers to take EXIF resolution information into account when assigning images' intrinsic size.
https://github.com/whatwg/html/pull/5574
The spec currently tells browsers to look strictly at *binary* EXIF information; we are trying to figure out how to test this.
I know that XMP also defines fields which map to EXIF fields. I have two questions:
1. Is there a way to create an image with XMP fields which map to EXIF's `ResolutionUnit`, `XResolution`, `YResolution`, `PixelXDimension`, and `PixelYDimension`, without having the corresponding binary EXIF data, also?
2. Are there other metadata formats which contain fields that map to these EXIF fields?
Thank you!
Quote from: eeeps on July 08, 2021, 05:22:43 PM
1. Is there a way to create an image with XMP fields which map to EXIF's `ResolutionUnit`, `XResolution`, `YResolution`, `PixelXDimension`, and `PixelYDimension`, without having the corresponding binary EXIF data, also?
You can directly set the XMP-exif (https://exiftool.org/TagNames/XMP.html#exif), XMP-exifEX (https://exiftool.org/TagNames/XMP.html#exifEX) and XMP-tiff (https://exiftool.org/TagNames/XMP.html#tiff) tags without setting the EXIF tags at all. None of those tags are marked to avoid, so all you have to do is choose the tag name from those sections of the XMP tags page and prefix
XMP:, e.g.
-XMP:Orientation=Horizontal -XMP:ImageHeight=1200 -XMP:ImageWidth=1600.
Or if the EXIF tags are already set, use the exif2XMP.args file (https://github.com/exiftool/exiftool/blob/master/arg_files/exif2xmp.args) to copy all the EXIF data to the corrisponding XMP locations and remove the EXIF block
exiftool -EXIF:All= -tagsFromFile @ -@ exif2xmp.args /path/to/files/Quote2. Are there other metadata formats which contain fields that map to these EXIF fields?
There are technically a few IPTC tags that correspond with EXIF tags, but not many. Mostly the time related tags. See the exif2iptc.args file (https://github.com/exiftool/exiftool/blob/master/arg_files/exif2iptc.args) for details.
This is exactly the information I needed, and works perfectly. Thank you!!!
(Extra credit question: is there any way to change the placement of the eXIf block when writing EXIF to PNGs? By default, it goes after IDAT using 12.16; per https://github.com/w3c/PNG-spec/issues/28 it would be great to get it in front.)
July 9, 2021 - Version 12.29
- Changed PNG writer to add EXIF before IDAT
- Phil
Amazing! Thank you.