From ad87bb610f5d1b063fb5a8259d6aabbc6955b65e Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 30 Dec 2021 23:40:06 +0100 Subject: fix ALL the tests ^^ --- gerbonara/gerber/tests/image_support.py | 1 + 1 file changed, 1 insertion(+) (limited to 'gerbonara/gerber/tests/image_support.py') 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) -- cgit