pike.git
/
src
/
modules
/
Image
/
togif.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Image/togif.c:1:
/* togif
-
$Id: togif.c,v 1.
29
1998/01/
13
22:
59
:
25
hubbe
Exp $
+
$Id: togif.c,v 1.
30
1998/01/
16
22:
09
:
14
grubba
Exp $
old GIF API compat stuff */ /* **! module Image **! note
-
**! $Id: togif.c,v 1.
29
1998/01/
13
22:
59
:
25
hubbe
Exp $
+
**! $Id: togif.c,v 1.
30
1998/01/
16
22:
09
:
14
grubba
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:315:
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)");