[Bug report] InputImage.getBitmapInternal() returns null
arianaa30 opened this issue · comments
arianaa30 commented
I am trying to convert an object of type Image into Bitmap so to attach it to a Canvas object after MLKit processing. But when calling inputImage.getBitmapInternal()
it returns null. Is it a bug?
Image image = imageReader.acquireLatestImage();
InputImage inputImage = InputImage.fromMediaImage(image, rotation);
Bitmap bitmap= inputImage.getBitmapInternal();
//....
canvas.drawBitmap(bitmap, 0, 0, new Paint(Paint.ANTI_ALIAS_FLAG));
jackqdyulei commented
getBitmapInternal
is not the public API, which should not be used by developer.
In your case you should convert it yourself from media image to bitmap