public static abstract class ImageCapture.OnImageCapturedCallback
extends Object


Callback for when an image capture has completed.


Public constructors


Public methods

void onCaptureSuccess(ImageProxy image)

Callback for when the image has been captured.

void onError(ImageCaptureException exception)

Callback for when an error occurred during image capture.

Inherited methods

Public constructors


public OnImageCapturedCallback ()

Public methods


public void onCaptureSuccess (ImageProxy image)

Callback for when the image has been captured.

The application is responsible for calling ImageProxy.close() to close the image.

The image is of format ImageFormat.JPEG, queryable via ImageProxy.getFormat().

The image is provided as captured by the underlying ImageReader without rotation applied. The value in image.getImageInfo().getRotationDegrees() describes the magnitude of clockwise rotation, which if applied to the image will make it match the currently configured target rotation.

For example, if the current target rotation is set to the display rotation, rotationDegrees is the rotation to apply to the image to match the display orientation. A rotation of 90 degrees would mean rotating the image 90