问题出现在最后一行,当我尝试新建这样的数组时,它会崩溃。在 Logcat 中,它显示“java.lang.OutOfMemoryError”。那是什么意思?请帮忙。
Bitmap bmap;
Bitmap bMapRotate;
int bmapWidth;
int bmapHeight;
int[] bmapColorArray;
int bmapColorArraySize;
bmapWidth = bmap.getWidth();
bmapHeight = bmap.getHeight();
bmapColorArraySize = bmapWidth * bmapHeight;
bmapColorArray = new int[bmapColorArraySize];
bmap.getPixels(bmapColorArray, 0, bmapWidth, 0, 0, bmapWidth, bmapHeight);
然后调用将这个 int Array 传递给 native 层。