> You are right, the function returns a pointer, in the manual it says a
> pointer on a pixel of the image. What I don't understand is why the
> dereferenced pointer has such a big value, i.e. why pixelValue= *pixPtr=
> e.g. 35654414.
What is the variable type that you are dereferencing?
If pixPtr is a long*, then pixelValue= *pixPtr will use
four bytes to determine the pixelValue. If pixPtr is
a short*, then it will use two bytes, if pixPtr is a
char*, then it will use only one byte, and this seems
to be what you are expecting.
So, it sounds like you either need to declare pixPtr
to be a char*, int8*, uInt8*, or some other type that
points to only one byte. Or, you can cast it like
pixelValue= *(char*)pixPtr;
Aren't pointers fun?
Greg McKaskle