Android摄像头抓取图像的格式
android.hardware.Camera.PreviewCallback
/** * Callback interface used to deliver copies of preview frames as * they are displayed. * * @see #setPreviewCallback(Camera.PreviewCallback) * @see #setOneShotPreviewCallback(Camera.PreviewCallback) * @see #setPreviewCallbackWithBuffer(Camera.PreviewCallback) * @see #startPreview() */ public interface PreviewCallback { /** * Called as preview frames are displayed. This callback is invoked * on the event thread {@link #open(int)} was called from. * * @param data the contents of the preview frame in the format defined * by {@link android.graphics.ImageFormat}, which can be queried * with {@link android.hardware.Camera.Parameters#getPreviewFormat()}. * If {@link android.hardware.Camera.Parameters#setPreviewFormat(int)} * is never called, the default will be the YCbCr_420_SP * (NV21) format. * @param camera the Camera service object. */ void onPreviewFrame(byte[] data, Camera camera); };