Language

MediaStore.Images.Thumbnails.GetThumbnail Method

Definition

Overloads

Name Description
GetThumbnail(ContentResolver, Int64, ThumbnailKind, BitmapFactory+Options)

This method checks if the thumbnails of the specified image (origId) has been created.

GetThumbnail(ContentResolver, Int64, Int64, ThumbnailKind, BitmapFactory+Options)

This method checks if the thumbnails of the specified image (origId) has been created.

GetThumbnail(ContentResolver, Int64, ThumbnailKind, BitmapFactory+Options)

This method checks if the thumbnails of the specified image (origId) has been created.

[Android.Runtime.Register("getThumbnail", "(Landroid/content/ContentResolver;JILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? GetThumbnail(Android.Content.ContentResolver? cr, long imageId, Android.Provider.ThumbnailKind kind, Android.Graphics.BitmapFactory.Options? options);
[<Android.Runtime.Register("getThumbnail", "(Landroid/content/ContentResolver;JILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member GetThumbnail : Android.Content.ContentResolver * int64 * Android.Provider.ThumbnailKind * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

cr
ContentResolver

ContentResolver used to dispatch queries to MediaProvider.

imageId
Int64

the image item to obtain a thumbnail for.

kind
ThumbnailKind

The type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND.

options
BitmapFactory.Options

this is only used for MINI_KIND when decoding the Bitmap

Returns

decoded thumbnail, or null if problem was encountered.

Attributes

Remarks

This method was deprecated in API level 29. Callers should migrate to using ContentResolver.loadThumbnail, since it offers richer control over requested thumbnail sizes and cancellation behavior.

Return thumbnail representing a specific image item. If a thumbnail doesn't exist, this method will block until it's generated. Callers are responsible for their own in-memory caching of returned values. As of Build.VERSION_CODES.Q, this output of the thumbnail has correct rotation, don't need to rotate it again.

Android reference for android.provider.MediaStore.Images.Thumbnails.getThumbnail.

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

GetThumbnail(ContentResolver, Int64, Int64, ThumbnailKind, BitmapFactory+Options)

This method checks if the thumbnails of the specified image (origId) has been created.

[Android.Runtime.Register("getThumbnail", "(Landroid/content/ContentResolver;JJILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? GetThumbnail(Android.Content.ContentResolver? cr, long imageId, long groupId, Android.Provider.ThumbnailKind kind, Android.Graphics.BitmapFactory.Options? options);
[<Android.Runtime.Register("getThumbnail", "(Landroid/content/ContentResolver;JJILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member GetThumbnail : Android.Content.ContentResolver * int64 * int64 * Android.Provider.ThumbnailKind * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

cr
ContentResolver

ContentResolver used to dispatch queries to MediaProvider.

imageId
Int64

the image item to obtain a thumbnail for.

groupId
Int64

the id of group to which this request belongs

kind
ThumbnailKind

The type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND.

options
BitmapFactory.Options

this is only used for MINI_KIND when decoding the Bitmap

Returns

decoded thumbnail, or null if problem was encountered.

Attributes

Remarks

This method was deprecated in API level 29. Callers should migrate to using ContentResolver.loadThumbnail, since it offers richer control over requested thumbnail sizes and cancellation behavior.

Return thumbnail representing a specific image item. If a thumbnail doesn't exist, this method will block until it's generated. Callers are responsible for their own in-memory caching of returned values. As of Build.VERSION_CODES.Q, this output of the thumbnail has correct rotation, don't need to rotate it again.

Android reference for android.provider.MediaStore.Images.Thumbnails.getThumbnail.

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