jspaint
jspaint copied to clipboard
Pasted screenshots show up twice as big (HiDPI Retina screenshot)
trafficstars
https://github.com/1j01/jspaint/assets/10224533/4aa8a60c-e9cf-4234-a39d-5f3de2627326
In order to use jspaint, I must set the zoom to 50% every time, as shown in the video. Is there any way to keep a permanant 50% zoom every time I load the page, or perhaps default to 50% zoom on HiDPI displays?
There is a feature request for a persistent zoom setting. That said, I think maybe the app is supposed to scale the canvas for HiDPI displays, I don't remember... OK, looking at the code, it was left as a question mark in a comment:
https://github.com/1j01/jspaint/blob/c5cf78424ce58c0e7bb81c7de882641ec9dc30ae/src/functions.js#L209
Thinking about this some more...
- The current approach favors consistency in the physical size of an image file viewed across devices, but at the clear detriment of the screenshot editing use case, as you've pointed out.
- Changing it so the app scales the canvas by the device pixel ratio...
- would make existing drawings appear smaller when reopened. This will cause some confusion for a time, but new images will naturally be created at the new default scale, or people will learn to zoom in if they prefer a lower resolution canvas. The MS Paint UI does at least make it easier to zoom in than zoom out, as you can use the Magnifier tool.
- This new approach would make screenshots created on the same device appear at the correct size, although screenshots from other devices would have no such guarantee. In fact, the reverse problem could occur: a screenshot taken on a 1 DPI screen, when viewed on a 2 DPI screen, would appear half the size, whereas currently it would appear at a more reasonable size.
- It's also possible these screenshots may embed some DPI information that could be queried, although this seems like a can of worms, especially since not all programs would preserve this information.