Increase resolution of java screenshot -



Increase resolution of java screenshot -

i using next code take screenshot in java:

import java.awt.awtexception; import java.awt.dimension; import java.awt.rectangle; import java.awt.robot; import java.awt.toolkit; import java.awt.image.bufferedimage; import javax.imageio.imageio; import java.io.file; import java.io.ioexception; public class main { public static void main(string[] args) throws awtexception, ioexception{ dimension screensize = toolkit.getdefaulttoolkit().getscreensize(); rectangle screenrectangle = new rectangle(screensize); robot robot = new robot(); bufferedimage image = robot.createscreencapture(screenrectangle); imageio.write(image, "png", new file("path/to/screenshot.png")); } }

this code works, screen shot outputted low resolution. how can increment resolution of screen shot?

thank you. if downwards vote, please tell me why can improve question.

there nil wrong code. have screen resolution of 1680x1050 pixels, , generated png file has size.

java screenshot

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -