From 114afed869dc55d4fba10fcfc768ba580786ec92 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 20 Aug 2008 22:00:12 +0000 Subject: [PATCH] * median.c: fix the RGBA median filter. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2745 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/filter/median.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipi/filter/median.c b/pipi/filter/median.c index 029ca9c..e338552 100644 --- a/pipi/filter/median.c +++ b/pipi/filter/median.c @@ -134,10 +134,10 @@ pipi_image_t *pipi_median_ext(pipi_image_t *src, int rx, int ry) } else { - dstdata[4 * (y * w + x)] = list[size / 8 * 4]; - dstdata[4 * (y * w + x) + 1] = list[size / 8 * 4 + 1]; - dstdata[4 * (y * w + x) + 2] = list[size / 8 * 4 + 2]; - dstdata[4 * (y * w + x) + 3] = list[size / 8 * 4 + 3]; + dstdata[4 * (y * w + x)] = list[size / 2 * 4]; + dstdata[4 * (y * w + x) + 1] = list[size / 2 * 4 + 1]; + dstdata[4 * (y * w + x) + 2] = list[size / 2 * 4 + 2]; + dstdata[4 * (y * w + x) + 3] = list[size / 2 * 4 + 3]; } } }