您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678
  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)