summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/tests/image_support.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-12-30 23:40:06 +0100
committerjaseg <git@jaseg.de>2021-12-30 23:40:06 +0100
commitad87bb610f5d1b063fb5a8259d6aabbc6955b65e (patch)
treed4b8dd16f6dd7674e8aee5c92e35c7d3cf260f83 /gerbonara/gerber/tests/image_support.py
parent9db91239ea0eac21f38435c1388f86f94f9ce8f3 (diff)
downloadgerbonara-ad87bb610f5d1b063fb5a8259d6aabbc6955b65e.tar.gz
gerbonara-ad87bb610f5d1b063fb5a8259d6aabbc6955b65e.tar.bz2
gerbonara-ad87bb610f5d1b063fb5a8259d6aabbc6955b65e.zip
fix ALL the tests ^^
Diffstat (limited to 'gerbonara/gerber/tests/image_support.py')
-rw-r--r--gerbonara/gerber/tests/image_support.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gerbonara/gerber/tests/image_support.py b/gerbonara/gerber/tests/image_support.py
index 96bc357..23b829d 100644
--- a/gerbonara/gerber/tests/image_support.py
+++ b/gerbonara/gerber/tests/image_support.py
@@ -129,6 +129,7 @@ def image_difference(reference, actual, diff_out=None):
out = np.array(Image.open(actual)).astype(float)
ref, out = ref.mean(axis=2), out.mean(axis=2) # convert to grayscale
+ # FIXME blur images here before comparison to mitigate aliasing issue
delta = np.abs(out - ref).astype(float) / 255
if diff_out:
Image.fromarray((delta*255).astype(np.uint8), mode='L').save(diff_out)