public interface

ImageOutputConfig.Builder<B>

 androidx.camera.core.ImageOutputConfig.Builder<B>

Subclasses:

ImageAnalysisConfig.Builder, PreviewConfig.Builder, VideoCaptureConfig.Builder, ImageCaptureConfig.Builder

Overview

Builder for a ImageOutputConfig.

Summary

Methods
public java.lang.ObjectsetDefaultResolution(Size resolution)

Sets the default resolution of the intended target from this configuration.

public java.lang.ObjectsetMaxResolution(Size resolution)

Sets the max resolution limitation of the intended target from this configuration.

public java.lang.ObjectsetSupportedResolutions(java.util.List<> resolutionsList)

Sets the supported resolutions can be used by target from this configuration.

public java.lang.ObjectsetTargetAspectRatio(AspectRatio aspectRatio)

Sets the aspect ratio of the intended target for images from this configuration.

public java.lang.ObjectsetTargetAspectRatioCustom(Rational aspectRatio)

Sets the aspect ratio of the intended target for images from this configuration.

public java.lang.ObjectsetTargetResolution(Size resolution)

Sets the resolution of the intended target from this configuration.

public java.lang.ObjectsetTargetRotation(int rotation)

Sets the rotation of the intended target for images from this configuration.

Methods

public java.lang.Object setTargetAspectRatioCustom(Rational aspectRatio)

Sets the aspect ratio of the intended target for images from this configuration.

This is the ratio of the target's width to the image's height, where the numerator of the provided corresponds to the width, and the denominator corresponds to the height.

This method can be used to request an aspect ratio that is not from the standard set of aspect ratios defined in the AspectRatio.

This method will remove any value set by setTargetAspectRatio().

Parameters:

aspectRatio: A representing the ratio of the target's width and height.

Returns:

The current Builder.

public java.lang.Object setTargetAspectRatio(AspectRatio aspectRatio)

Sets the aspect ratio of the intended target for images from this configuration.

It is not allowed to set both target aspect ratio and target resolution on the same use case.

Parameters:

aspectRatio: A AspectRatio representing the ratio of the target's width and height.

Returns:

The current Builder.

public java.lang.Object setTargetRotation(int rotation)

Sets the rotation of the intended target for images from this configuration.

This is one of four valid values: , , , . Rotation values are relative to the "natural" rotation, .

Parameters:

rotation: The rotation of the intended target.

Returns:

The current Builder.

public java.lang.Object setTargetResolution(Size resolution)

Sets the resolution of the intended target from this configuration.

It is not allowed to set both target aspect ratio and target resolution on the same use case.

The target aspect ratio will also be set the same as the aspect ratio of the provided . Make sure to set the target resolution with the correct orientation.

Parameters:

resolution: The target resolution to choose from supported output sizes list.

Returns:

The current Builder.

public java.lang.Object setDefaultResolution(Size resolution)

Sets the default resolution of the intended target from this configuration.

Parameters:

resolution: The default resolution to choose from supported output sizes list.

Returns:

The current Builder.

public java.lang.Object setMaxResolution(Size resolution)

Sets the max resolution limitation of the intended target from this configuration.

Parameters:

resolution: The max resolution limitation to choose from supported output sizes list.

Returns:

The current Builder.

public java.lang.Object setSupportedResolutions(java.util.List<> resolutionsList)

Sets the supported resolutions can be used by target from this configuration.

Pair list is composed with and array. The array should be subset of the complete supported sizes list for the camera device.

Parameters:

resolutionsList: The resolutions can be supported for image formats.

Returns:

The current Builder.