Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

8 lignes
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)