Condividi tramite


Camera.Parameters.SetPictureSize(Int32, Int32) Method

Definition

Caution

deprecated

Sets the dimensions for pictures.

[Android.Runtime.Register("setPictureSize", "(II)V", "GetSetPictureSize_IIHandler")]
[System.Obsolete("deprecated")]
public virtual void SetPictureSize (int width, int height);
[<Android.Runtime.Register("setPictureSize", "(II)V", "GetSetPictureSize_IIHandler")>]
[<System.Obsolete("deprecated")>]
abstract member SetPictureSize : int * int -> unit
override this.SetPictureSize : int * int -> unit

Parameters

width
Int32

the width for pictures, in pixels

height
Int32

the height for pictures, in pixels

Attributes

Remarks

Sets the dimensions for pictures.

Applications need to consider the display orientation. See #setPreviewSize(int,int) for reference.

Exception on 176x144 (QCIF) resolution: Camera devices usually have a fixed capability for downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not fully supported due to this limitation on devices with high-resolution image sensors. Therefore, trying to configure a QCIF picture size with any preview or video size larger than 1920x1080 (either width or height) might not be supported, and #setParameters(Camera.Parameters) might throw a RuntimeException if it is not.

Java documentation for android.hardware.Camera.Parameters.setPictureSize(int, 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.

Applies to

See also

  • <xref:Android.Hardware.Camera.Parameters.SetPreviewSize(System.Int32%2c+System.Int32)>