ThumbnailUtils

open class ThumbnailUtils
kotlin.Any
   ↳ android.media.ThumbnailUtils

Thumbnail generation routines for media provider.
Requires API level 8 (Android 2.2, Froyo)

Summary

Constants
static Int

Constant used to indicate we should recycle the input in #extractThumbnail(Bitmap, int, int, int) unless the output is the input.

Public constructors

Public methods
open static Bitmap!
createVideoThumbnail(filePath: String!, kind: Int)

Create a video thumbnail for a video.

open static Bitmap!
extractThumbnail(source: Bitmap!, width: Int, height: Int)

Creates a centered bitmap of the desired size.

open static Bitmap!
extractThumbnail(source: Bitmap!, width: Int, height: Int, options: Int)

Creates a centered bitmap of the desired size.

Constants

OPTIONS_RECYCLE_INPUT

added in API level 8
static val OPTIONS_RECYCLE_INPUT: Int

Constant used to indicate we should recycle the input in #extractThumbnail(Bitmap, int, int, int) unless the output is the input.
Requires API level 8 (Android 2.2, Froyo)

Value: 2

Public constructors

<init>

ThumbnailUtils()

Public methods

createVideoThumbnail

added in API level 8
open static fun createVideoThumbnail(filePath: String!, kind: Int): Bitmap!

Create a video thumbnail for a video. May return null if the video is corrupt or the format is not supported.
Requires API level 8 (Android 2.2, Froyo)

Parameters
filePath String!: the path of video file
kind String!: could be MINI_KIND or MICRO_KIND

extractThumbnail

added in API level 8
open static fun extractThumbnail(source: Bitmap!, width: Int, height: Int): Bitmap!

Creates a centered bitmap of the desired size.
Requires API level 8 (Android 2.2, Froyo)

Parameters
source Bitmap!: original bitmap source
width Bitmap!: targeted width
height Bitmap!: targeted height

extractThumbnail

added in API level 8
open static fun extractThumbnail(source: Bitmap!, width: Int, height: Int, options: Int): Bitmap!

Creates a centered bitmap of the desired size.
Requires API level 8 (Android 2.2, Froyo)

Parameters
source Bitmap!: original bitmap source
width Bitmap!: targeted width
height Bitmap!: targeted height
options Bitmap!: options used during thumbnail extraction