-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
int width = mpeg.get(FFMpeg.KEY_WIDTH);
int height = mpeg.get(FFMpeg.KEY_HEIGHT);
data = new byte[widthheight3/2];
mpeg.output(data);
ByteArrayOutputStream out = new ByteArrayOutputStream();
YuvImage yuv = new YuvImage(data, ImageFormat.NV21, width, height, null);
yuv.compressToJpeg(new Rect(0, 0, width, height), 50, out);
byte[] bytes = out.toByteArray();
Bitmap bitmap= BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
mImageView.setImageBitmap(bitmap);
调用output方法所得到的数据是不是就是yuv数据?
@doggycoder
Metadata
Metadata
Assignees
Labels
No labels