BitmapUtils

Utils functions for bitmap conversions.

See also

Functions

Link copied to clipboard

Converts a YUV_420_888 image from CameraX API to a bitmap.

fun getBitmap(nv21Data: ByteArray, frameMetadata: FrameMetadata): Bitmap?

Converts NV21 format byte to bitmap.

fun getBitmap(data: ByteBuffer, width: Int, height: Int, rotationDegrees: Int): Bitmap?

Converts NV21 format byte buffer to bitmap.

Link copied to clipboard
fun getBitmapFromContentUri(contentResolver: ContentResolver, imageUri: Uri): Bitmap?
Link copied to clipboard
fun yuv420ThreePlanesToNV21(yuv420888planes: Array<Image.Plane>, width: Int, height: Int): ByteArray

Converts YUV_420_888 to NV21 bytes.