ImageOutputConfig

@RequiresApi(21) interface ImageOutputConfig : ReadableConfig
androidx.camera.core.impl.ImageOutputConfig

Configuration containing options for configuring the output image data of a pipeline.

Summary

Nested classes
abstract

Builder for a ImageOutputConfig.

Valid integer rotation values including option indicating value not specified.

Valid integer rotation degrees values.

Valid integer rotation values.

Constants
static Int

Invalid integer rotation.

static Int

Rotation not specified.

Public methods
open Int
getAppTargetRotation(valueIfMissing: Int)

Retrieves the target rotation set by app explicitly.

open Size?
getDefaultResolution(@Nullable valueIfMissing: Size?)

Retrieves the default resolution of the target intending to use from this configuration.

open Size

Retrieves the default resolution of the target intending to use from this configuration.

open Size?
getMaxResolution(@Nullable valueIfMissing: Size?)

Retrieves the max resolution limitation of the target intending to use from this configuration.

open Size

Retrieves the max resolution limitation of the target intending to use from this configuration.

open MutableList<Pair<Int!, Array<Size!>!>!>?
getSupportedResolutions(@Nullable valueIfMissing: MutableList<Pair<Int!, Array<Size!>!>!>?)

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

open MutableList<Pair<Int!, Array<Size!>!>!>

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

open Int

Retrieves the aspect ratio of the target intending to use images from this configuration.

open Size?
getTargetResolution(@Nullable valueIfMissing: Size?)

Retrieves the resolution of the target intending to use from this configuration.

open Size

Retrieves the resolution of the target intending to use from this configuration.

open Int
getTargetRotation(valueIfMissing: Int)

Retrieves the rotation of the target intending to use images from this configuration.

open Int

Retrieves the rotation of the target intending to use images from this configuration.

open Boolean

Verifies whether the aspect ratio of the target intending to use images from this configuration is set.

Inherited functions
Properties
static Config.Option<Int!>!

Option: camerax.

static Config.Option<Size!>!

Option: camerax.

static Config.Option<Size!>!

Option: camerax.

static Config.Option<MutableList<Pair<Int!, Array<Size!>!>!>!>!

Option: camerax.

static Config.Option<Int!>!

Option: camerax.

static Config.Option<Size!>!

Option: camerax.

static Config.Option<Int!>!

Option: camerax.

Constants

INVALID_ROTATION

static val INVALID_ROTATION: Int

Invalid integer rotation.

Value: -1

ROTATION_NOT_SPECIFIED

static val ROTATION_NOT_SPECIFIED: Int

Rotation not specified.

Value: -1

Public methods

getAppTargetRotation

open fun getAppTargetRotation(valueIfMissing: Int): Int

Retrieves the target rotation set by app explicitly.

Parameters
valueIfMissing Int: The value to return if this configuration option has not been set.
Return
Int The stored value or valueIfMissing if the value does not exist in this configuration.

getDefaultResolution

@Nullable open fun getDefaultResolution(@Nullable valueIfMissing: Size?): Size?

Retrieves the default resolution of the target intending to use from this configuration.

Parameters
valueIfMissing Size?: The value to return if this configuration option has not been set.
Return
Size? The stored value or valueIfMissing if the value does not exist in this configuration.

getDefaultResolution

@NonNull open fun getDefaultResolution(): Size

Retrieves the default resolution of the target intending to use from this configuration.

Return
Size The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getMaxResolution

@Nullable open fun getMaxResolution(@Nullable valueIfMissing: Size?): Size?

Retrieves the max resolution limitation of the target intending to use from this configuration.

Parameters
valueIfMissing Size?: The value to return if this configuration option has not been set.
Return
Size? The stored value or valueIfMissing if the value does not exist in this configuration.

getMaxResolution

@NonNull open fun getMaxResolution(): Size

Retrieves the max resolution limitation of the target intending to use from this configuration.

Return
Size The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getSupportedResolutions

@Nullable open fun getSupportedResolutions(@Nullable valueIfMissing: MutableList<Pair<Int!, Array<Size!>!>!>?): MutableList<Pair<Int!, Array<Size!>!>!>?

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

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

Parameters
valueIfMissing MutableList<Pair<Int!, Array<Size!>!>!>?: The value to return if this configuration option has not been set.
Return
MutableList<Pair<Int!, Array<Size!>!>!>? The stored value or valueIfMissing if the value does not exist in this configuration.

getSupportedResolutions

@NonNull open fun getSupportedResolutions(): MutableList<Pair<Int!, Array<Size!>!>!>

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

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

Return
MutableList<Pair<Int!, Array<Size!>!>!> The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getTargetAspectRatio

open fun getTargetAspectRatio(): Int

Retrieves the aspect ratio of the target intending to use images from this configuration.

Return
Int The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getTargetResolution

@Nullable open fun getTargetResolution(@Nullable valueIfMissing: Size?): Size?

Retrieves the resolution of the target intending to use from this configuration.

Parameters
valueIfMissing Size?: The value to return if this configuration option has not been set.
Return
Size? The stored value or valueIfMissing if the value does not exist in this configuration.

getTargetResolution

@NonNull open fun getTargetResolution(): Size

Retrieves the resolution of the target intending to use from this configuration.

Return
Size The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getTargetRotation

open fun getTargetRotation(valueIfMissing: Int): Int

Retrieves the rotation of the target intending to use images from this configuration.

This is one of four valid values: Surface#ROTATION_0, Surface#ROTATION_90, Surface#ROTATION_180, Surface#ROTATION_270. Rotation values are relative to the device's "natural" rotation, Surface#ROTATION_0.

Parameters
valueIfMissing Int: The value to return if this configuration option has not been set.
Return
Int The stored value or valueIfMissing if the value does not exist in this configuration.

getTargetRotation

open fun getTargetRotation(): Int

Retrieves the rotation of the target intending to use images from this configuration.

This is one of four valid values: Surface#ROTATION_0, Surface#ROTATION_90, Surface#ROTATION_180, Surface#ROTATION_270. Rotation values are relative to the device's "natural" rotation, Surface#ROTATION_0.

Return
Int The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

hasTargetAspectRatio

open fun hasTargetAspectRatio(): Boolean

Verifies whether the aspect ratio of the target intending to use images from this configuration is set.

Return
Boolean true is the value exists in this configuration, false otherwise.

Properties

OPTION_APP_TARGET_ROTATION

static val OPTION_APP_TARGET_ROTATION: Config.Option<Int!>!

Option: camerax.core.imageOutput.appTargetRotation

OPTION_DEFAULT_RESOLUTION

static val OPTION_DEFAULT_RESOLUTION: Config.Option<Size!>!

Option: camerax.core.imageOutput.defaultResolution

OPTION_MAX_RESOLUTION

static val OPTION_MAX_RESOLUTION: Config.Option<Size!>!

Option: camerax.core.imageOutput.maxResolution

OPTION_SUPPORTED_RESOLUTIONS

static val OPTION_SUPPORTED_RESOLUTIONS: Config.Option<MutableList<Pair<Int!, Array<Size!>!>!>!>!

Option: camerax.core.imageOutput.supportedResolutions

OPTION_TARGET_ASPECT_RATIO

static val OPTION_TARGET_ASPECT_RATIO: Config.Option<Int!>!

Option: camerax.core.imageOutput.targetAspectRatio

OPTION_TARGET_RESOLUTION

static val OPTION_TARGET_RESOLUTION: Config.Option<Size!>!

Option: camerax.core.imageOutput.targetResolution

OPTION_TARGET_ROTATION

static val OPTION_TARGET_ROTATION: Config.Option<Int!>!

Option: camerax.core.imageOutput.targetRotation