screenshoter icon indicating copy to clipboard operation
screenshoter copied to clipboard

Set DPI for the generated png images so they do not look too big

Open vlsi opened this issue 4 years ago • 2 comments

E.g. https://stackoverflow.com/a/4833697/1261287

An alternative option is org.apache.xmlgraphics.image.writer.ImageWriterUtil.saveAsPNG(image, DPI, outfile)

AFAIK:

  1. HiDPI PNGs have 144 DPI by default
  2. Default resolution is 72 DPI

I think it would be great if the PNGs used 72*scale for the DPI, so "text size" in OS preview (and in Twitter!) becomes consistent.

WDYT?

vlsi avatar Apr 16 '20 13:04 vlsi

This solution will work if you save images to a file. However, I don't see how to adapt it to the clipboard image (which is default mode). Any ideas?

amaembo avatar Apr 17 '20 08:04 amaembo

I wonder what would happen if you convert the image to bytes and pass it as image/png bytes to the clipboard.

vlsi avatar Apr 17 '20 09:04 vlsi