Examples of captureImage()


Examples of net.cakenet.jsaton.nativedef.WindowReference.captureImage()

            String date = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(new Date());
            File f = FileManager.getUserFile("screenshots", date + ".png");
            try {
                WindowReference ref = currentEditor == null ? WindowManager.getDesktop() :
                        currentEditor.script.getTarget();
                BufferedImage img = ref.captureImage().toImage();
                ImageIO.write(img, "PNG", f);
                System.out.println("Screenshot saved as file://" + f.getAbsolutePath());
            } catch (Exception e1) {
                System.out.println("Failed to capture screenshot: " + e1.getLocalizedMessage());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.