pike.git / src / modules / Image / togif.c

version» Context lines:

pike.git/src/modules/Image/togif.c:1:   /*      togif      Pontus Hagland, law@infovav.se    - $Id: togif.c,v 1.3 1997/03/18 17:23:21 mirar Exp $ + $Id: togif.c,v 1.4 1997/03/18 17:30:54 mirar Exp $      */      #include "global.h"      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"
pike.git/src/modules/Image/togif.c:88:    rgb2.r=testrange((long)rgb.r+err->r/FS_SCALE);    rgb2.g=testrange((long)rgb.g+err->g/FS_SCALE);    rgb2.b=testrange((long)rgb.b+err->b/FS_SCALE);   #ifdef FS_DEBUG    fprintf(stderr,"%g,%g,%g+%g,%g,%g=%g,%g,%g ",    1.0*rgb.r, 1.0*rgb.g, 1.0*rgb.b,    err->r*1.0/FS_SCALE, err->g*1.0/FS_SCALE, err->b*1.0/FS_SCALE,    rgb2.r*1.0, rgb2.g*1.0, rgb2.b*1.0);   #endif    if (closest) -  c=colortable_rgb_closest(ct,rgb2); +  c=colortable_rgb_nearest(ct,rgb2);    else    c=colortable_rgb(ct,rgb2);    rgb3=ct->clut[c];    cerr.r=(long)rgb.r*FS_SCALE-(long)rgb3.r*FS_SCALE+err->r;    cerr.g=(long)rgb.g*FS_SCALE-(long)rgb3.g*FS_SCALE+err->g;    cerr.b=(long)rgb.b*FS_SCALE-(long)rgb3.b*FS_SCALE+err->b;      #ifdef FS_DEBUG    fprintf(stderr,"got %g,%g,%g err %g,%g,%g ",    1.0*rgb3.r,