ImageCaptureExtKt

Added in 1.4.0

public final class ImageCaptureExtKt


Summary

Public methods

static final @NonNull ImageProxy
takePicture(
    @NonNull ImageCapture receiver,
    Function0<Unit> onCaptureStarted,
    Function1<@NonNull IntegerUnit> onCaptureProcessProgressed,
    Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable
)

Captures a new still image for in memory access.

static final @NonNull ImageCapture.OutputFileResults
takePicture(
    @NonNull ImageCapture receiver,
    @NonNull ImageCapture.OutputFileOptions outputFileOptions,
    Function0<Unit> onCaptureStarted,
    Function1<@NonNull IntegerUnit> onCaptureProcessProgressed,
    Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable
)

Captures a new still image and saves to a file along with application specified metadata.

Public methods

public static final @NonNull ImageProxy takePicture(
    @NonNull ImageCapture receiver,
    Function0<Unit> onCaptureStarted,
    Function1<@NonNull IntegerUnit> onCaptureProcessProgressed,
    Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable
)

Captures a new still image for in memory access.

The caller is responsible for calling ImageProxy.close on the returned image.

Parameters
Function0<Unit> onCaptureStarted

Callback for when the camera has started exposing the frame.

Function1<@NonNull IntegerUnit> onCaptureProcessProgressed

Callback to report the progress of the capture's processing.

Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable

Callback to notify that the postview bitmap is available.

public static final @NonNull ImageCapture.OutputFileResults takePicture(
    @NonNull ImageCapture receiver,
    @NonNull ImageCapture.OutputFileOptions outputFileOptions,
    Function0<Unit> onCaptureStarted,
    Function1<@NonNull IntegerUnit> onCaptureProcessProgressed,
    Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable
)

Captures a new still image and saves to a file along with application specified metadata.

Parameters
@NonNull ImageCapture.OutputFileOptions outputFileOptions

Options to store the output image file.

Function0<Unit> onCaptureStarted

Callback for when the camera has started exposing the frame.

Function1<@NonNull IntegerUnit> onCaptureProcessProgressed

Callback to report the progress of the capture's processing.

Function1<@NonNull BitmapUnit> onPostviewBitmapAvailable

Callback to notify that the postview bitmap is available.