Take the 2-minute tour ×  I was wondering if it is possible to
save the first frame from camera preview, visible on a
SurfaceView. Within my activity I've currently implemented all
the SurfaceHolder.Callback methods. When I call startPreview on
camera object and than takePicture the callback is executed
correctly, but I need to take and save the picture more quickly,
so take the first visible frame of the preview would be very
useful. What can I do? Any suggestion would be greatly
appreciated.  share|improve this question add comment  1 Answer
It might seem incredibly simple, but I would do something like
this to save the first frame into a Bitmap.
mCamera.setPreviewCallback(new PreviewCallback() {
if (image == null) {                         out = new
ByteArrayOutputStream();                         yuvImage = new
YuvImage(data, ImageFormat.NV21, camera
.getParameters().getPreviewSize().width, camera
.getParameters().getPr