createFromBitmap
fun createFromBitmap(input: Bitmap, rotation: ImageRotation = ImageRotation.Rotation0, cropRect: Rect = Rect(0, 0, input.width, input.height)): InputImage
Creates an SDK InputImage instance from Android Bitmap.
Return
an InputImage object created from the provided android.graphics.Bitmap.
Parameters
input
Bitmap image.
rotation
rotation needed to transform the image to the correct orientation.
cropRect
crop rectangle associated with this frame. The crop rectangle specifies the region of valid pixels in the image (e.g. pixels visible in camera preview). Crop rectangle does not take into account image orientation, it should be set for raw image.