Sdílet prostřednictvím


StreamConfigurationMap.GetOutputSizes Method

Definition

Overloads

GetOutputSizes(Int32)

Get a list of sizes compatible with the requested image format.

GetOutputSizes(Class)

Get a list of sizes compatible with klass to use as an output.

GetOutputSizes(Int32)

Get a list of sizes compatible with the requested image format.

[Android.Runtime.Register("getOutputSizes", "(I)[Landroid/util/Size;", "")]
public Android.Util.Size[]? GetOutputSizes (int format);
[<Android.Runtime.Register("getOutputSizes", "(I)[Landroid/util/Size;", "")>]
member this.GetOutputSizes : int -> Android.Util.Size[]

Parameters

format
Int32

an image format from ImageFormat or PixelFormat

Returns

Size[]

an array of supported sizes, or null if the format is not a supported output

Attributes

Remarks

Get a list of sizes compatible with the requested image format.

The format should be a supported format (one of the formats returned by #getOutputFormats).

As of API level 23, the #getHighResolutionOutputSizes method can be used on devices that support the android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE capability to get a list of high-resolution output sizes that cannot operate at the preferred 20fps rate. This means that for some supported formats, this method will return an empty list, if all the supported resolutions operate at below 20fps. For devices that do not support the BURST_CAPTURE capability, all output resolutions are listed through this method.

Java documentation for android.hardware.camera2.params.StreamConfigurationMap.getOutputSizes(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to

GetOutputSizes(Class)

Get a list of sizes compatible with klass to use as an output.

[Android.Runtime.Register("getOutputSizes", "(Ljava/lang/Class;)[Landroid/util/Size;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public Android.Util.Size[]? GetOutputSizes (Java.Lang.Class? klass);
[<Android.Runtime.Register("getOutputSizes", "(Ljava/lang/Class;)[Landroid/util/Size;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
member this.GetOutputSizes : Java.Lang.Class -> Android.Util.Size[]

Parameters

klass
Class

a non-nullClass object reference

Returns

Size[]

an array of supported sizes for ImageFormat#PRIVATE format, or null iff the klass is not a supported output.

Attributes

Remarks

Get a list of sizes compatible with klass to use as an output.

Some of the supported classes may support additional formats beyond ImageFormat#PRIVATE; this function only returns sizes for ImageFormat#PRIVATE. For example, android.media.ImageReader supports ImageFormat#YUV_420_888 and ImageFormat#PRIVATE, this method will only return the sizes for ImageFormat#PRIVATE for android.media.ImageReader class.

If a well-defined format such as NV21 is required, use #getOutputSizes(int) instead.

The klass should be a supported output, that querying #isOutputSupportedFor(Class) should return true.

Java documentation for android.hardware.camera2.params.StreamConfigurationMap.getOutputSizes(java.lang.Class<T>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to