sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #09708
[Question #192713]: how to compare the images using sikuli
New question #192713 on Sikuli:
https://answers.launchpad.net/sikuli/+question/192713
we want to compare the two images using sikuli API.
Scenario : We have application running on iPhone , we have captured the image using the followed code.
final Screen displayScreen = (Screen) simArea.getScreen();
final BufferedImage bf = displayScreen.capture(simArea).getImage();
String capturedImagePath ="capture/myimage1.png";
final File expImg = new File(capturedImagePath);
Region.create(Region.create(App.focusedWindow()));
try{
ImageIO.write(bf, "png", expImg);
}
catch ( final IOException e ){
e.printStackTrace();
now we have expected images store in another folder. here we want to compare the both the images for verification.
we have tried using java
Image actual_img = ImageIO.read(new File("/Users/santoshk/Desktop/Sunflower.gif"));
Image expected_img = ImageIO.read(new File("/Users/santoshk/Desktop/Sunflower.gif"));
Boolean value = actual_img.equals(expected_img);
but it did not compare the images, please let us know how to compare the images using sikuli API.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.