//srcData为原始的yuv数组,format为YUV的格式
YuvImage yuv = new YuvImage(srcData, format, width, height, null);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
yuv.compressToJpeg(new Rect(0, 0, width, height), 100, stream);
Bitmap bitmap = BitmapFactory.decodeByteArray(stream.toByteArray(),
0, stream.size());
stream.close();
如何将YUV的byte数组转换为bitmap
最新推荐文章于 2024-05-13 09:24:50 发布