HELP! Simple C Question
This is a short routine that *should* dump the pixel values of the image in
the window iff_window. It works fine for a 16-color image. But when it
reads a 32-color image, it does fine for colors 0-15, but thinks colors
16-31 are 0-15 again. What am I doing wrong here?
Thanks for your help!
void PixelDump (iff_x, iff_y) /* Tells it the width & height of the window
*/
int iff_x, iff_y;
{
int i, j;
long int color;
for (j=0;j<iff_y;j++){
for (i=0;i<iff_x;i++) {
color = ReadPixel(iff_window->RPort,i,j);
printf ("Color is %ld\n", color); }