public final class StillCaptureHandler
extends java.lang.Object
It should be created once and passed to
Camera3.startCaptureSession(String, PreviewHandler, List)
when the capture
session is started. You only need to create multiple handlers if you want to capture images in
multiple formats/sizes. Many capture requests can be made from one session.
Constructor and Description |
---|
StillCaptureHandler(int imageFormat,
android.util.Size imageSize,
OnImageAvailableListener onImageAvailableListener) |
Modifier and Type | Method and Description |
---|---|
int |
getImageFormat() |
android.util.Size |
getImageSize() |
public StillCaptureHandler(int imageFormat, @NonNull android.util.Size imageSize, @NonNull OnImageAvailableListener onImageAvailableListener)
imageFormat
- The format to capture in (from ImageFormat
).
E.g. ImageFormat.JPEGimageSize
- The size of the image to capture. This size should come from
Camera3.getAvailableImageSizes(String, int)
or
Camera3.getLargestAvailableImageSize(String, int)
//TODO test when this is not from the listonImageAvailableListener
- a callback to receive the images from this session once they
have been captured