From 6f49c4d8590560ed1cd6a97f57de4d5e822276f3 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 31 Aug 2008 23:06:00 +0000 Subject: [PATCH] * ordered.c: r means radius, not diameter. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2813 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/dither/ordered.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipi/dither/ordered.c b/pipi/dither/ordered.c index f91a722..8c4bede 100644 --- a/pipi/dither/ordered.c +++ b/pipi/dither/ordered.c @@ -29,7 +29,7 @@ pipi_image_t *pipi_dither_halftone(pipi_image_t *img, double r, double angle) { #define PRECISION 4. pipi_image_t *ret, *kernel; - int k = (r * PRECISION / sqrt(2.) + .5); + int k = (r * PRECISION / 2. / sqrt(2.) + .5); kernel = pipi_render_halftone(k, k); ret = pipi_dither_ordered_ext(img, kernel, 1. / PRECISION, angle + 45.);