public interface

ImageOutputConfig.Builder<B>

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

Subclasses:

VideoCapture.Builder, Preview.Builder, ImageAnalysis.Builder, ImageCapture.Builder, VideoCapture.Builder<T>

Overview

Builder for a ImageOutputConfig.

Summary

Methods
public java.lang.ObjectsetCustomOrderedResolutions(java.util.List<Size> resolutionsList)

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

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.ObjectsetMirrorMode(int mirrorMode)

Sets the mirror mode of the intended target for images from this configuration.

public java.lang.ObjectsetResolutionSelector(ResolutionSelector resolutionSelector)

Sets the resolution selector can be used by 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(int 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 setTargetAspectRatio(int 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 setMirrorMode(int mirrorMode)

Sets the mirror mode of the intended target for images from this configuration.

Valid values include: MirrorMode.MIRROR_MODE_OFF, MirrorMode.MIRROR_MODE_ON and MirrorMode.MIRROR_MODE_ON_FRONT_ONLY.

Parameters:

mirrorMode: The mirror mode 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.

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

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

The list should contain preferred priority from high to low and should be the subset of the supported sizes for the camera device. The list will be fully respected, meaning it will not be sorted or filtered by other configurations such as max/default/target/supported resolutions.

Parameters:

resolutionsList: The resolutions can be supported for this image config.

Returns:

The current Builder.

public java.lang.Object setResolutionSelector(ResolutionSelector resolutionSelector)

Sets the resolution selector can be used by target from this configuration.

Parameters:

resolutionSelector: The resolution selector to select a preferred resolution.

Returns:

The current Builder.