You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
313B

  1. from PIL import Image
  2. from pixelmatch.contrib.PIL import pixelmatch
  3. img_a = Image.open("../image/AI.jpg")
  4. img_b = Image.open("../image/AI3.jpg")
  5. img_diff = Image.new("RGBA", img_a.size)
  6. # note how there is no need to specify dimensions
  7. mismatch = pixelmatch(img_a, img_b, img_diff, includeAA=True)
  8. print(mismatch)