다음을 통해 공유


MtpDevice.GetThumbnail(Int32) Method

Definition

Returns the thumbnail data for an object as a byte array.

[Android.Runtime.Register("getThumbnail", "(I)[B", "")]
public byte[]? GetThumbnail (int objectHandle);
[<Android.Runtime.Register("getThumbnail", "(I)[B", "")>]
member this.GetThumbnail : int -> byte[]

Parameters

objectHandle
Int32

handle of the object to read

Returns

Byte[]

the object's thumbnail, or null if reading fails

Attributes

Remarks

Returns the thumbnail data for an object as a byte array. The size and format of the thumbnail data can be determined via MtpObjectInfo#getThumbCompressedSize and MtpObjectInfo#getThumbFormat. For typical devices the format is JPEG.

Java documentation for android.mtp.MtpDevice.getThumbnail(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