public interface

ImageProcessor.Request

 androidx.camera.core.ImageProcessor.Request

Subclasses:

ImageProcessorRequest

Overview

A request for processing one or multiple ImageProxy.

Summary

Methods
public ImageProxygetInputImage()

Gets the input images.

public intgetOutputFormat()

Gets the output image format.

Methods

public ImageProxy getInputImage()

Gets the input images.

Return a single image captured by the camera. The implementation should check the format of the image before processing it. For example, checking the value of ImageProxy.getFormat(), ImageProxy.PlaneProxy.getRowStride() and/or ImageProxy.PlaneProxy.getPixelStride().

Currently, the image format is always with pixel stride equals to 4 and row stride equals to width * 4.

public int getOutputFormat()

Gets the output image format.

The return value will one of the values in the table. The implementation must create the ImageProcessor.Response ImageProxy following the corresponding instruction, or the processing may fail.

Value Instruction
The output image must contain a single plane with a pixel stride of 4 and a row stride of width * 4. e.g. each pixel is stored on 4 bytes and each RGBA channel is stored with 8 bits of precision. For more details, see the JavaDoc of Bitmap.Config#ARGB_8888.