I have a question about screenshot in java: exist a library for take screenshot and save them for java? Now I'm using buffered images and AWT robot (you can find the repo here : GitHub), but them have some memory leak and use a lot of memory (foreach screen it take the memory use increment about ~ 40 MB). Can you give me a library or some trick for take screenshot using less memory as possible?
Here the code that i use for screenshot, but it has the problem mentioned.(It take a partial screen)
ImageIO.write(new Robot().createScreenCapture(Main.so.getScreenBounds()).getSubimage(
partialScreen.selectionBounds.x,
partialScreen.selectionBounds.y,
partialScreen.selectionBounds.width,
partialScreen.selectionBounds.height), "png", tempFile);
So much thanks!