asBitmap

fun asBitmap(img: ByteArray, width: Int, height: Int): <Error class: unknown class>?

Creates an android.graphics.Bitmap based on provided ByteArray that contains image.

Parameters

img

Image data as ByteBuffer.

width

Image width in px.

height

Image height in px.


fun asBitmap(format: <Error class: unknown class>, buffer: ByteArray?, width: Int, height: Int): <Error class: unknown class>?

Converts a YUV 420 to ByteBuffer if possible.

Return

null if conversion fails.

Parameters

format

Image format

buffer

The buffer that keeps the image.

width

The width of the image.

height

The height of the image.

See also

EImagePixelFormat

fun asBitmap(byteBuffer: ByteBuffer?, width: Int, height: Int): <Error class: unknown class>?

Creates a Bitmap based on input buffer with format Bitmap.Config.ARGB_8888

Parameters

byteBuffer

Input buffer.

width

Image width.

height

Image height.


fun asBitmap(iBitmap: IBitmap): <Error class: unknown class>?

Converts an IBitmap to Bitmap

Parameters

iBitmap

The input image.


fun asBitmap(imageId: Int, width: Int, height: Int): <Error class: unknown class>?

Takes a Image by id from ImageDatabase and converts it to a Bitmap.

Parameters

imageId

The image id.


fun asBitmap(img: Image?, width: Int, height: Int): <Error class: unknown class>?

Converts a Image to Bitmap.


fun asBitmap(img: AbstractGeometryImage?, width: Int, height: Int, activeInnerColor: Rgba? = null, activeOuterColor: Rgba? = null, inactiveInnerColor: Rgba? = null, inactiveOuterColor: Rgba? = null): <Error class: unknown class>?

Converts an image to Bitmap


fun asBitmap(image: SignpostImage?, width: Int, height: Int): Pair<Int, <Error class: unknown class>?>

Converts SignpostImage as an Bitmap.

Return

pair of result width, actual bitmap. Note. if width is 0 then it will be auto calculated and returned in result pair.

Parameters

width

Desired width. If 0 it a width will be provided as result.

height

Desired height. Can't be 0.


fun asBitmap(image: RoadInfoImage?, width: Int, height: Int): Pair<Int, <Error class: unknown class>?>

Converts RoadInfoImage as an Bitmap.

Return

pair of result width, actual bitmap. Note. if width is 0 then it will be auto calculated and returned in result pair.

Parameters

width

Desired width. If 0 it a width will be provided as result.

height

Desired height. Can't be 0.


fun asBitmap(image: LaneImage?, width: Int, height: Int, bkColor: Rgba? = null, activeColor: Rgba? = null, inactiveColor: Rgba? = null): Pair<Int, <Error class: unknown class>?>

Converts input LaneImage to Bitmap

Return

Pair