Question #200281 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/200281

    Status: Open => Solved

emrah kara confirmed that the question is solved:
i have a solution now.

ImageIO.write(new Screen().capture().getImage(),"jpg",new 
File("testImages/",i+".jpg"));
BufferedImage image1 =  ImageIO.read(new File("testImages/",i+".jpg"));
System.out.println("screenshot "+i+"wurde erstellt");

Thread.sleep(6000);

ImageIO.write(new Screen().capture().getImage(),"jpg",new 
File("testImages/",(i+10)+".jpg"));
BufferedImage image2 =  ImageIO.read(new File("testImages/",(i+10)+".jpg"));
System.out.println("screenshot "+(i+10)+"wurde erstellt");


int x1 = image1.getWidth();
        int x2 = image2.getWidth();
        if ( x1 != x2 ) {
            System.out.println( "Widths are different: " + x1 + " != " + x2 );
            return;
        }

        int y1 = image1.getHeight();
        int y2 = image2.getHeight();
        if ( y1 != y2 ) {
            System.out.println( "Heights are different: " + y1 + " != " + y2 );
            return;
        }

        for ( int x = 0; x < x1; x++ ) {
            for ( int y = 0; y < y1; y++ ){
                int p1 = image1.getRGB( x, y );
                int p2 = image2.getRGB( x, y );
                if ( p1 != p2 ) {
                    System.out.println("Pixel is different at x/y " + x + "/" + 
y + ": " + p1 + " != " + p2 );
                    return;
                }
            }
        }

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to