直接给出代码:
int height = imgBase.GetHeight();
int width = imgBase.GetWidth();
int *pixel = new int[height * width];for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
pixel[x * width + y] = imgBase.GetPixel(x, y);
}
}这样会存在执行时内存溢出情况,同一幅图像有时没事,有时就不行请大家帮帮忙,想想解决方法