Skip to content
Snippets Groups Projects
Commit a00ca98f authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed bug and threading-bug.

Rev: src/modules/Image/x.c:1.14
parent 99f1eab0
No related branches found
No related tags found
No related merge requests found
/* $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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment