From b1bc49df6962e2feff07b9368c0b3516e2ab6024 Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Fri, 20 Mar 1998 17:53:13 +0100
Subject: [PATCH] simplified dither_floyd_steinberg_got

Rev: src/modules/Image/colortable.c:1.40
---
 src/modules/Image/colortable.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/modules/Image/colortable.c b/src/modules/Image/colortable.c
index bcbc5053b9..69229fe4e6 100644
--- a/src/modules/Image/colortable.c
+++ b/src/modules/Image/colortable.c
@@ -1,11 +1,11 @@
 #include <config.h>
 
-/* $Id: colortable.c,v 1.39 1998/02/10 13:27:04 mirar Exp $ */
+/* $Id: colortable.c,v 1.40 1998/03/20 16:53:13 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: colortable.c,v 1.39 1998/02/10 13:27:04 mirar Exp $
+**!	$Id: colortable.c,v 1.40 1998/03/20 16:53:13 mirar Exp $
 **! class colortable
 **!
 **!	This object keeps colortable information,
@@ -21,7 +21,7 @@
 #undef COLORTABLE_REDUCE_DEBUG
 
 #include "global.h"
-RCSID("$Id: colortable.c,v 1.39 1998/02/10 13:27:04 mirar Exp $");
+RCSID("$Id: colortable.c,v 1.40 1998/03/20 16:53:13 mirar Exp $");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1591,10 +1591,10 @@ static void dither_floyd_steinberg_got(struct nct_dither *dith,
    rgbd_group *er=dith->u.floyd_steinberg.errors;
    rgbd_group err;
 
-   err.r=(float)((int)d.r-(int)s.r)+dith->u.floyd_steinberg.errors[rowpos].r+0.5;
-   err.g=(float)((int)d.g-(int)s.g)+dith->u.floyd_steinberg.errors[rowpos].g+0.5;
-   err.b=(float)((int)d.b-(int)s.b)+dith->u.floyd_steinberg.errors[rowpos].b+0.5;
-
+   err.r=(float)((int)d.r-(int)s.r)+er[rowpos].r+0.5;
+   err.g=(float)((int)d.g-(int)s.g)+er[rowpos].g+0.5;
+   err.b=(float)((int)d.b-(int)s.b)+er[rowpos].b+0.5;
+ 
    ner[rowpos].r+=err.r*dith->u.floyd_steinberg.down;
    ner[rowpos].g+=err.g*dith->u.floyd_steinberg.down;
    ner[rowpos].b+=err.b*dith->u.floyd_steinberg.down;
-- 
GitLab