# ImageProcessor.Request

Artifact: [androidx.camera:camera-core](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/core/ImageProcessor.java+class:androidx.camera.core.ImageProcessor.Request) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/camera#1.3.0)

*** ** * ** ***


```
public interface ImageProcessor.Request
```

<br />

*** ** * ** ***

A request for processing one or multiple `https://developer.android.com/reference/androidx/camera/core/ImageProxy`.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/core/ImageProxy` | `https://developer.android.com/reference/androidx/camera/core/ImageProcessor.Request#getInputImage()()` Gets the input images. |
| `abstract int` | `https://developer.android.com/reference/androidx/camera/core/ImageProcessor.Request#getOutputFormat()()` Gets the output image format. |

## Public methods

### getInputImage

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/camera#1.3.0)

```
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 `https://developer.android.com/reference/androidx/camera/core/ImageProxy#getFormat()`, `https://developer.android.com/reference/androidx/camera/core/ImageProxy.PlaneProxy#getRowStride()` and/or `https://developer.android.com/reference/androidx/camera/core/ImageProxy.PlaneProxy#getPixelStride()`.

Currently, the image format is always `https://developer.android.com/reference/android/graphics/PixelFormat.html#RGBA_8888` with pixel stride equals to 4 and row stride equals to width \* 4.

### getOutputFormat

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/camera#1.3.0)

```
abstract int getOutputFormat()
```

Gets the output image format.

The return value will one of the values in the table. The implementation must create the `https://developer.android.com/reference/androidx/camera/core/ImageProcessor.Response``https://developer.android.com/reference/androidx/camera/core/ImageProxy` following the corresponding instruction, or the processing may fail.

| Value | Instruction |
|---|---|
| `https://developer.android.com/reference/android/graphics/PixelFormat.html#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`. |

Value is one of the following:

- `PixelFormat.RGBA_8888`

<br />