title: Image comparison in Selenium WebDriver using Java
body: <p>I am currently working in Selenium WebDriver to compare two images during automation. Currently I am using pixel comparison but the problem comes if the browser size is changed or the system is different on which I run the automation.</p>
  
  <p>I have to compare two images, one is the golden one which is already saved in a location and the other one is the screenshot taken during the automation. As soon as the screenshot is taken, it is compared with the golden image I have, and a pass or fail is asserted accordingly. The problem comes if the browser size or the system resolution is different when the screenshot is taken, because this will affect the resolution of the image which might not be same as the resolution of the golden image I have for reference. Here both the images are same but the pixels might change with the browser size or system change. </p>
  
  <p>So is there any way to compare two images using java in selenium with out using pixel comparison?</p>