PRINTF ("shift, prec: r %d %d g %d %d b %d %d\n", image_info->red_shift, image_info->red_prec, image_info->green_shift, image_info->green_prec, image_info->blue_shift, image_info->blue_prec);
xlib_rgb_xpixel_from_rgb (uint32 rgb){  unsigned long pixel = 0;  if (image_info->bitmap)    {      return ((rgb & 0xff0000) >> 16) +	((rgb & 0xff00) >> 7) +	(rgb & 0xff) > 510;    }  else if (image_info->x_visual_info->class == PseudoColor)    pixel = colorcube[((rgb & 0xf00000) >> 12) |		     ((rgb & 0xf000) >> 8) |		     ((rgb & 0xf0) >> 4)];  else if (image_info->x_visual_info->depth < 8 &&	   image_info->x_visual_info->class == StaticColor)    {      pixel = colorcube_d[((rgb & 0x800000) >> 17) |			 ((rgb & 0x8000) >> 12) |			 ((rgb & 0x80) >> 7)];    }  else if (image_info->x_visual_info->class == TrueColor ||	   image_info->x_visual_info->class == DirectColor)    {#ifdef VERBOSE      printf ("shift, prec: r %d %d g %d %d b %d %d\n",	      image_info->red_shift,	      image_info->red_prec,	      image_info->green_shift,	      image_info->green_prec,	      image_info->blue_shift,	      image_info->blue_prec);#endif      pixel = (((((rgb & 0xff0000) >> 16) >>		 (8 - image_info->red_prec)) <<		image_info->red_shift) +	       ((((rgb & 0xff00) >> 8)  >>		 (8 - image_info->green_prec)) <<		image_info->green_shift) +	       (((rgb & 0xff) >>		 (8 - image_info->blue_prec)) <<		image_info->blue_shift));    }  else if (image_info->x_visual_info->class == StaticGray ||	   image_info->x_visual_info->class == GrayScale)    {      int gray = ((rgb & 0xff0000) >> 16) +	((rgb & 0xff00) >> 7) +	(rgb & 0xff);      return gray >> (10 - image_info->x_visual_info->depth);    }  return pixel;}