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

version» Context lines:

pike.git/src/modules/Image/togif.c:1:   /*      togif    - $Id: togif.c,v 1.31 1998/04/20 18:53:34 grubba Exp $ + $Id: togif.c,v 1.32 1998/04/24 13:51:03 mirar Exp $      old GIF API compat stuff      */      /*   **! module Image   **! note - **! $Id: togif.c,v 1.31 1998/04/20 18:53:34 grubba Exp $ + **! $Id: togif.c,v 1.32 1998/04/24 13:51:03 mirar Exp $   **! class image   */      #include "global.h"      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"
pike.git/src/modules/Image/togif.c:311:    INT32 args_start,INT32 args,char *name)   {    INT32 i;    if (args-args_start<3) return;    for (i=0; i<3; i++)    if (sp[-args+i+args_start].type!=T_INT)    error("Illegal r,g,b argument to %s\n",name);    img->rgb.r=(unsigned char)sp[-args+args_start].u.integer;    img->rgb.g=(unsigned char)sp[1-args+args_start].u.integer;    img->rgb.b=(unsigned char)sp[2-args+args_start].u.integer; -  if (args-args_start>=4) { +  if (args-args_start>=4)    if (sp[3-args+args_start].type!=T_INT)    error("Illegal alpha argument to %s\n",name);    else    img->alpha=sp[3-args+args_start].u.integer; -  } else +  else    img->alpha=0;   }      void image_togif(INT32 args)   {    rgb_group *transparent=NULL;       if (args>=3)    {    getrgb(THIS,args>3,args,"image->togif() (transparency)");