Renderscript ScriptIntrinsicYuvToRGB and Bitmap allocation
问题 I want to make my own SurfaceView and send there a frames which I've obtained from onPreviewFrame(byte[] data, Camera camera) method. To do it, I need to conver frames from Yuv to ARGB and to draw them to a Canvas to my SurfaceView. Here is my onPreviewFrame: public void onPreviewFrame(byte[] data, Camera camera) { if (camera != null) { camera.addCallbackBuffer(data); } // using RenderScript Bitmap bitmap = RenderScriptFilter.convertYuvToRgbIntrinsic(rs, data, PREVIEW_WIDTH, PREVIEW_HEIGHT);