diff --git a/src/modules/Image/x.c b/src/modules/Image/x.c index 21e0b0cbfff84cf04f7856c524d5a8a9ec297d09..30571dcc5aaa39244be1ded0935c7572ece4b8bb 100644 --- a/src/modules/Image/x.c +++ b/src/modules/Image/x.c @@ -1,4 +1,4 @@ -/* $Id: x.c,v 1.13 1997/11/07 06:06:18 mirar Exp $ */ +/* $Id: x.c,v 1.14 1997/11/08 00:10:03 grubba Exp $ */ /* **! module Image @@ -12,7 +12,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: x.c,v 1.13 1997/11/07 06:06:18 mirar Exp $"); +RCSID("$Id: x.c,v 1.14 1997/11/08 00:10:03 grubba Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -24,6 +24,7 @@ RCSID("$Id: x.c,v 1.13 1997/11/07 06:06:18 mirar Exp $"); #include "port.h" #include "image.h" +#include "colortable.h" #include "builtin_functions.h" extern struct program *image_colortable_program; @@ -52,7 +53,8 @@ void image_to8bit(INT32 args) /* compat function */ { struct neo_colortable *nct; struct object *o; - struct pike_string *res = begin_shared_string((THIS->xsize*THIS->ysize)); + struct image *this = THIS; + struct pike_string *res = begin_shared_string((this->xsize*this->ysize)); unsigned long i; rgb_group *s; unsigned char *d; @@ -62,14 +64,14 @@ void image_to8bit(INT32 args) /* compat function */ o=clone_object(image_colortable_program,args); nct=get_storage(o,image_colortable_program); - i=THIS->xsize*THIS->ysize; - s=THIS->img; + i=this->xsize*this->ysize; + s=this->img; d=(unsigned char *)res->str; THREADS_ALLOW(); - image_colortable_index_8bit_image(nct,THIS->img, - THIS->xsize*THIS->ysize,THIS->xsize); + image_colortable_index_8bit_image(nct,this->img,d, + this->xsize*this->ysize,this->xsize); THREADS_DISALLOW();