ImageProcessor.Request
public interface ImageProcessor.Request
A request for processing one or multiple ImageProxy.
Summary
Public methods |
|
|---|---|
abstract @NonNull ImageProxy |
Gets the input images. |
abstract int |
Gets the output image format. |
Public methods
getInputImage
abstract @NonNull 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 getFormat, getRowStride and/or getPixelStride.
Currently, the image format is always RGBA_8888 with pixel stride equals to 4 and row stride equals to width * 4.
getOutputFormat
abstract int getOutputFormat()
Gets the output image format.
The return value will one of the values in the table. The implementation must create the ResponseImageProxy following the corresponding instruction, or the processing may fail.
| Value | Instruction |
|---|---|
RGBA_8888 |
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. |