GemUtilImages

Utility class

Functions

Link copied to clipboard
fun asBitmap(iBitmap: IBitmap): Bitmap?

Converts an IBitmap to Bitmap

fun asBitmap(img: Image?, width: Int, height: Int): Bitmap?

Converts a Image to Bitmap.

fun asBitmap(image: RoadInfoImage?, width: Int, height: Int): Pair<Int, Bitmap?>

Converts RoadInfoImage as an Bitmap.

fun asBitmap(image: SignpostImage?, width: Int, height: Int): Pair<Int, Bitmap?>

Converts SignpostImage as an Bitmap.

fun asBitmap(byteBuffer: ByteBuffer?, width: Int, height: Int): Bitmap?

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

fun asBitmap(img: ByteArray, width: Int, height: Int): Bitmap?

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

fun asBitmap(imageId: Int, width: Int, height: Int): Bitmap?

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

fun asBitmap(format: EImagePixelFormat, buffer: ByteArray?, width: Int, height: Int): Bitmap?

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, Bitmap?>

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): Bitmap?

Converts an image to Bitmap

Link copied to clipboard
fun landmarkImageAsBitmap(value: Landmark?, imgSizes: Int): Bitmap?

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