Bug 180582 - MacOS screenshots can have the wrong DPI value
Summary: MacOS screenshots can have the wrong DPI value
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-08 08:11 PST by Craig Francis
Modified: 2017-12-10 03:24 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Francis 2017-12-08 08:11:09 PST
1) Open a browser window on a 144 dpi monitor
2) Run `screencapture -x -i screenshot.png`, press the [space] key, and screenshot the window.
3) Run `sips -g dpiWidth screenshot.png`.

The DPI is incorrectly set to 72.000, it should say 144.000.

When these screenshots are used, e.g. in an email (MacOS Mail), they will be shown at twice their normal size.

Firefox correctly sets the DPI value.

Chrome also sets the DPI correctly when the window is opened - but does not update it when moving between monitors. As in, when you drag the window over to a 72 DPI monitor, the screenshots will still be recorded as being 144.000 ( https://crbug.com/793312 )
Comment 1 Simon Fraser (smfr) 2017-12-09 12:33:11 PST
Please file this bug at bug report.apple.com. It's not a WebKit bug.
Comment 2 Craig Francis 2017-12-10 03:24:15 PST
Thanks Simon, it has been raised as bug 35955716

https://bugreport.apple.com/web/?problemID=35955716