GemUtilImages

Utility class

Functions

Link copied to clipboard
fun asBitmap(iBitmap: IBitmap): <Error class: unknown class>?

Converts an IBitmap to Bitmap

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

Converts a Image to Bitmap.

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

Converts RoadInfoImage as an Bitmap.

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

Converts SignpostImage as an Bitmap.

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

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

Creates an android.graphics.Bitmap based on provided ByteArray that contains 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.

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.

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

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

Link copied to clipboard
fun landmarkImageAsBitmap(value: Landmark?, imgSizes: Int): <Error class: unknown class>?

Gets the Landmark.image as Bitmap.

Link copied to clipboard
external fun setDpi(dpi: Int)

Sets dpi (dots per inch) used for operations requiring image manipulation and size measurements.

Link copied to clipboard
fun toByteBuffer(image: Image, width: Int, height: Int): ByteBuffer?
fun toByteBuffer(image: AbstractGeometryImage?, width: Int, height: Int, activeInnerColor: Rgba? = null, activeOuterColor: Rgba? = null, inactiveInnerColor: Rgba? = null, inactiveOuterColor: Rgba? = null): ByteBuffer?

Converts an image to ByteBuffer

fun toByteBuffer(image: RoadInfoImage?, width: Int, height: Int, backgroundColor: Rgba? = null): Pair<Int, ByteBuffer?>?
fun toByteBuffer(image: LaneImage?, width: Int, height: Int, backgroundColor: Rgba? = null, activeColor: Rgba? = null, inactiveColor: Rgba? = null): Pair<Int, ByteBuffer?>?

Converts a LaneImage to ByteBuffer

fun toByteBuffer(image: SignpostImage?, width: Int, height: Int, borderSizeInPx: Int = 10, roundCorners: Boolean = true, maxRows: Int = 3, smallMode: Boolean = false): Pair<Int, ByteBuffer?>?

Converts a SignpostImage to ByteBuffer Note. result pair.first is the signpost's width