Bug 227943 - EXIF resolution information not applied
Summary: EXIF resolution information not applied
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-13 23:53 PDT by Eric Portis
Modified: 2021-07-20 23:54 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Portis 2021-07-13 23:53:59 PDT
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)
Comment 1 Simon Fraser (smfr) 2021-07-15 18:43:35 PDT
Firefox and Safari match for me. Chrome shows the image larger.

The image EXIF has a DPI of 32.4 pixels per inch.
Comment 2 Eric Portis 2021-07-16 16:49:23 PDT
@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.
Comment 3 Eric Portis 2021-07-16 16:50:55 PDT
s/ddpx/dppx
Comment 4 Radar WebKit Bug Importer 2021-07-20 23:54:16 PDT
<rdar://problem/80881733>