amaembo / screenshoter

IDEA plugin to make code screenshots
Other
88 stars 17 forks source link

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

Open vlsi opened 4 years ago

vlsi commented 4 years ago

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?

amaembo commented 4 years ago

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?

vlsi commented 4 years ago

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