BitmapUtils

Utility class for creating bitmaps

Deprecated

Location Plugin is deprecated, use Location Component Plugin instead.

open class BitmapUtils

Functions

createBitmapFromView
Link copied to clipboard

Convert a view to a bitmap.

open fun createBitmapFromView(view: View): Bitmap
equals
Link copied to clipboard

Validates if the bytes of a bitmap matches another

open fun equals(bitmap: Bitmap, other: Bitmap): Boolean
getBitmapFromDrawable
Link copied to clipboard

Extract an underlying bitmap from a drawable

open fun getBitmapFromDrawable(sourceDrawable: Drawable): Bitmap
getByteArrayFromDrawable
Link copied to clipboard

Create a byte array out of drawable

open fun getByteArrayFromDrawable(drawable: Drawable): Array<Byte>
getDrawableFromByteArray
Link copied to clipboard

Decode byte array to drawable object

open fun getDrawableFromByteArray(context: Context, array: Array<Byte>): Drawable
getDrawableFromRes
Link copied to clipboard

Get a drawable from a resource.

open fun getDrawableFromRes(context: Context, drawableRes: Int): Drawable

Get a tinted drawable from a resource.

open fun getDrawableFromRes(context: Context, drawableRes: Int, tintColor: Integer): Drawable
mergeBitmap
Link copied to clipboard

Create a bitmap from a background and a foreground bitmap

open fun mergeBitmap(background: Bitmap, foreground: Bitmap): Bitmap
open fun mergeBitmap(background: Bitmap, foreground: Bitmap, left: Float, top: Float): Bitmap