FA-79225 / Image orientation metadata / Member archive
Fractional X resolution is truncated to an integer · case 05
Scans at 333 1/3 dpi or 72.00 stored as 7200/100 get slightly wrong printed widths.
Case contract
Input {w, h, tag?, unit?, xres: [num, den], yres?: [num, den]}. ResolutionUnit 2 is inches (25.4 mm), 3 is centimetres (10 mm), a missing unit defaults to 2 and any other unit has no physical size (None). A missing yres equals xres; non-positive rational parts give None. For tags 5..8 the displayed width comes from the stored height at YResolution. Return displayed [width, height] in tenths of a millimetre, each rounded half up from the exact value.
Why this case matters
Camera, phone and scanner images carry an orientation hint separately from the stored pixels; galleries, thumbnailers, editors and upload pipelines must interpret it consistently or photos appear sideways, mirrored or doubly rotated.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: rational resolution precision 0 | [1228, 1373] | [1228, 1372] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗