2018-12-26
The problem of screenshots when you have a HiDPI display
These days I have a HiDPI display at home,
although work is still dual Dell U2412Ms (1920x1200 at 94 DPI).
This has made me run into an unusual problem, which is sort of the
ironic inverse of the HiDPI tiny app issue.
Put simply, every so often I want to take a screenshot of something,
whether it is how xterm
looks or
some web pages in Firefox. If I make
these screenshots at home, the natural size of them generally
gigantic. My rule of thumb is that it's generally going to be about
twice as large as it should be (or as it would be at work), although
sometimes it's 'only' 1.7 times as big. So far, these screenshots
strike me as excessively big, at least in a world where most people
probably don't have HiDPI displays.
(Browsers will generally downsize such giant images to screen resolution, especially if I display them inline using my current HTML, but then transferring all of that data is probably wasteful (although maybe not entirely). And if browsers don't resize them, these HiDPI images will overflow on regular DPI screens and force people to awkwardly scroll around to see them all, which they probably won't bother to do.)
So far my solution has been to take my screenshots at work, where
I still have my non-HiDPI displays; that's what I did for my
recent entry on xterm
. But that only
works when (or if) I'm at work; if I'm not and I need a screenshot
for an entry or whatever, I'm not entirely sure what to do right
now. There is a part of me that wants to use the full-sized image
and damn the torpedoes, and a part of me that thinks I should
downsize them to some lower resolution (although I often can't make
up my mind about what the lower resolution should be).
(One of my qualms about downsizing images is that for images with text in them, I'm not confident that the tools I have handy will do a great job of keeping text and other fine lines properly readable as they shrink things. And of course it's hard to check on a HiDPI display.)
I've sometimes considered if I want to try to put together some sort of nested X server or virtual desktop environment that is not scaled to be HiDPI aware (or at least the programs in it are not scaling themselves; the actual display can scale up). In theory this would give me the ability to make properly non-scaled regular DPI screenshots even at home, at the expense of having to construct an entire second desktop environment. So far that feels like overkill, especially since I don't take screenshots that often.
(For Firefox screenshots specifically, it's possible that I could
create a separate Firefox profile that was not scaled up to be HiDPI
aware, since I'm already manually setting layout.css.devPixelsPerPx
in my main Firefox. Of course then I would have to remember to make
the window a reasonable size, since a full-size window on my HiDPI
display would still be too big. But that's an easier problem.)