Fix for image magick returning non-integer pixels.

This commit is contained in:
Chris Palmer 2021-01-12 14:51:55 +00:00
parent accf4f7bc1
commit ac6e8e040a
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def compare_images(a, b, c):
with open(log_name, 'w') as output:
do_cmd(("magick compare -metric AE -fuzz %d%% %s %s %s" % (fuzz, a, b, c)).split(), output = output)
with open(log_name, 'r') as f:
pixels = int(f.read().strip())
pixels = int(float(f.read().strip()))
os.remove(log_name)
return pixels