Language

ImageReader.Builder.SetImageFormat(Int32) Method

Definition

Set the default image format passed by the producer.

[Android.Runtime.Register("setImageFormat", "(I)Landroid/media/ImageReader$Builder;", "", ApiSince=33)]
public Android.Media.ImageReader.Builder SetImageFormat(int imageFormat);
[<Android.Runtime.Register("setImageFormat", "(I)Landroid/media/ImageReader$Builder;", "", ApiSince=33)>]
member this.SetImageFormat : int -> Android.Media.ImageReader.Builder

Parameters

imageFormat
Int32

The image format as the numeric value of an ImageFormatType or Format constant. Not all formats are supported; for example, Nv21 is not supported. If no format-setting method is called, the builder uses its default hardware-buffer format and dataspace instead.

Returns

the builder instance with customized image format value. This value cannot be null.

Attributes

Remarks

Set the default image format passed by the producer. May be overridden by the producer. This method replaces the combination of SetDefaultHardwareBufferFormat(Int32) and SetDefaultDataSpace(Int32). If none of these methods is called, the builder uses its default hardware-buffer format and dataspace.

Android reference for android.media.ImageReader.Builder.setImageFormat.

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