unsigned int srpos=0, sgpos=0, sbpos=0;
unsigned int srmsk=0, sgmsk=0, sbmsk=0;
unsigned int srsiz=0, sgsiz=0, sbsiz=0;
- int i;
XColor *colors = 0;
unsigned char spread_map[3][256];
- /* Note: height+2 in "to" to be to work around an array bounds overrun
+ /* Note: height+2 in "to" to work around an array bounds overrun
in gluBuild2DMipmaps / gluScaleImage.
*/
XImage *from = image;
if (colors == 0) /* truecolor */
{
+ int i;
for (i = 0; i < 256; i++)
{
spread_map[0][i] = spread_bits (i, srsiz);
}
}
+ /* trying to track down an intermittent crash in ximage_putpixel_32 */
+ if (to->width < from->width) abort();
+ if (to->height < from->height) abort();
+
for (y = 0; y < from->height; y++)
for (x = 0; x < from->width; x++)
{