I’m using a HiDPI display with a scaling factor of 150%. Everytime a I create a screenshot and paste it into Discourse, everything’s too large. I need to manually apply a scaling factor to the image to make it look alright.
Let’s assume I create a screenshot of the following box which has a size of 110x110px.
When I paste that screenshot (Ctrl+V) into the composer I get an image with a size of 167x167px.
Ideally I’d get a an image with the correct size without me having to remember the correct percentage to downscale the image (which is 66% in my case).
Not sure, I guess it depends on the user and kind of photos you post. Sometimes I copy an image on my phone and paste it on desktop, so there’s that scenario as well.
Either way, starting with option 2 would sidestep the false positives, it would just provide a nicer default alternative size in the preview.
It looks like screenshot tools encode some information about DPI into the PNG files. e.g. if I upload a screenshot from my high-dpi macOS environment to https://www.metadata2go.com/, I see
The code from that gist returns false for a screenshot I created on my Linux system with a scale factor of 150%. The pHYs chunk of that image looks like this: