mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-01 05:00:14 +02:00
Fix for image magick returning non-integer pixels.
This commit is contained in:
@@ -56,7 +56,7 @@ def compare_images(a, b, c):
|
|||||||
with open(log_name, 'w') as output:
|
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)
|
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:
|
with open(log_name, 'r') as f:
|
||||||
pixels = int(f.read().strip())
|
pixels = int(float(f.read().strip()))
|
||||||
os.remove(log_name)
|
os.remove(log_name)
|
||||||
return pixels
|
return pixels
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user