Gem Util Images
object GemUtilImages
Utility class
Functions
Link copied to clipboard
Converts RoadInfoImage as an Bitmap.
Converts SignpostImage as an Bitmap.
Creates a Bitmap based on input buffer with format Bitmap.Config.ARGB_8888
Creates an android.graphics.Bitmap based on provided ByteArray that contains image.
Takes a Image by id from ImageDatabase and converts it to a 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?>
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
Gets the Landmark.image as Bitmap.
Link copied to clipboard
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?>?
Converts a RoadInfoImage to 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