A picture's XMP GPS is never read, and which block answers for it is unmeasured #233

Closed
opened 2026-09-16 01:50:24 +02:00 by Claude · 1 comment
Collaborator

#222 measured which block answers for every property the fixture's XMP packet and Exif block both carry. The packet carries no GPS, so latitude, longitude and altitude are the one group whose order is still inferred.

What we do

crates/ephyra-images/src/exif.rs reads GPS from the Exif/TIFF block alone; read_xmp reads none of it. A picture carrying exif:GPSLatitude in its XMP packet and no GPS in its block therefore files no location here, where upstream's ImageTag.Latitude reads through the combined tag and would answer from the packet.

Verifying

The same way #222 was settled: give the contested picture in xtask/src/reference/assets.rs a GPS triple in its packet and a different one — or none — in its block, regenerate with cargo xtask reference gen-library-kinds, and let the read block show which upstream files. The comparison test then holds it.

The same fixture can settle xmp:Rating, which the measurement left untested: upstream filed no rating at all although the Exif block carried one, so that tag is now read by nothing, and whether the packet's rating would have answered is unknown.

Found reviewing #222.

#222 measured which block answers for every property the fixture's XMP packet and Exif block both carry. The packet carries no GPS, so latitude, longitude and altitude are the one group whose order is still inferred. ## What we do `crates/ephyra-images/src/exif.rs` reads GPS from the Exif/TIFF block alone; `read_xmp` reads none of it. A picture carrying `exif:GPSLatitude` in its XMP packet and no GPS in its block therefore files no location here, where upstream's `ImageTag.Latitude` reads through the combined tag and would answer from the packet. ## Verifying The same way #222 was settled: give the contested picture in `xtask/src/reference/assets.rs` a GPS triple in its packet and a different one — or none — in its block, regenerate with `cargo xtask reference gen-library-kinds`, and let the `read` block show which upstream files. The comparison test then holds it. The same fixture can settle `xmp:Rating`, which the measurement left untested: upstream filed no rating at all although the Exif block carried one, so that tag is now read by nothing, and whether the packet's rating would have answered is unknown. Found reviewing #222.
Author
Collaborator

Measured, and landed on main at ec3a4ee8. The answer is that no change was needed, and now it is written down as measured rather than inferred.

The contested picture's Exif block was stripped of its GPS directory and its packet given a location and a rating of 2, against the block's 3. Upstream then filed:

  • no latitude, longitude or altitude at all, though the packet names a place in the spelling a reader would answer from — so where a picture was taken is the block's alone, and no packet spelling is read;
  • a rating of 2, so the packet's rating outranks the block's even when the two disagree.

Both are negative results a fixture could have faked by carrying nothing, so it is worth saying the packet does parse: the rating proves it.

crates/ephyra-images/src/exif.rs already behaved this way, so only its module documentation changed — from "unmeasured" to what the key shows. The comparison test holds it, and fails if upstream ever moves.

Measured, and landed on `main` at `ec3a4ee8`. The answer is that no change was needed, and now it is written down as measured rather than inferred. The contested picture's Exif block was stripped of its GPS directory and its packet given a location and a rating of 2, against the block's 3. Upstream then filed: - **no latitude, longitude or altitude at all**, though the packet names a place in the spelling a reader would answer from — so where a picture was taken is the block's alone, and no packet spelling is read; - **a rating of 2**, so the packet's rating outranks the block's even when the two disagree. Both are negative results a fixture could have faked by carrying nothing, so it is worth saying the packet does parse: the rating proves it. `crates/ephyra-images/src/exif.rs` already behaved this way, so only its module documentation changed — from "unmeasured" to what the key shows. The comparison test holds it, and fails if upstream ever moves.
Sign in to join this conversation.
No description provided.