Bug 227943
| Summary: | EXIF resolution information not applied | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Portis <e> |
| Component: | Images | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 11 | ||
Eric Portis
https://cdpn.io/eeeps/debug/LYyRVOR
The third image on this page should have an intrinsic size of 1920 x 1280, from its EXIF information. Instead, it has an intrinsic size of 864 x 576.
It displays as expected in both Chrome 91 and Firefox 90. Safari passes the relevant Web Platform Tests (https://wpt.fyi/results/density-size-correction?label=master&label=stable&aligned), so there must be an issue with this particular image.
Tested on:
Safari Version 14.1 (16611.1.21.161.3)
Safari Technology Preview Release 127 (Safari 15.0, WebKit 16612.1.18.11.3)
macOS Big Sur 11.3 (20E232)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
Firefox and Safari match for me. Chrome shows the image larger.
The image EXIF has a DPI of 32.4 pixels per inch.
Eric Portis
@smfr:
Make sure you test in Firefox 90, which is fairly new and also the first version to ship support for EXIF-based intrinsic sizing. In v90, the third image appears large (as expected), for me.
Re: the DPI, a couple of notes...
- Binary EXIF stores `XResolution` and `YResolution` as rationals, hence 162/5 in the exiftool code. (A happy side effect of this is perfect precision.) exiftool prints decimals when it reports, though.
- The default values, according to the EXIF spec, are 72 dpi, so 32.4 is equivalent to 0.45x/ddpx, in terms of HTML/CSS.
Eric Portis
s/ddpx/dppx
Radar WebKit Bug Importer
<rdar://problem/80881733>