if ((chars_per_pixel < 1) || (chars_per_pixel > 2))
return 0;
- uchar colors[1<<(chars_per_pixel*8)][4];
+ uchar (*colors)[4] = new uchar [1<<(chars_per_pixel*8)][4];
#ifdef WIN32
color_count = 0;
}
}
+ delete [] colors;
return 1;
}
if (!fl_measure_pixmap(cdata, w, h))
return 0;
- uchar buffer[w*h*4];
+ uchar *buffer = new uchar[w*h*4];
- if (!fl_convert_pixmap(cdata, buffer, bg))
+ if (!fl_convert_pixmap(cdata, buffer, bg)) {
+ delete buffer;
return 0;
+ }
// FIXME: Hack until fl_draw_image() supports alpha properly
#ifdef __APPLE_QUARTZ__
}
#endif
+ delete buffer;
return 1;
}