diff options
author | jaseg <git@jaseg.de> | 2021-12-30 23:40:06 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-12-30 23:40:06 +0100 |
commit | ad87bb610f5d1b063fb5a8259d6aabbc6955b65e (patch) | |
tree | d4b8dd16f6dd7674e8aee5c92e35c7d3cf260f83 /gerbonara/gerber/tests/image_support.py | |
parent | 9db91239ea0eac21f38435c1388f86f94f9ce8f3 (diff) | |
download | gerbonara-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.py | 1 |
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) |