Android Question Bitmap.Config ??

moster67

Expert
Licensed User
Longtime User
I have the following code:

B4X:
Dim mBmap As Bitmap
mBmap.InitializeMutable(640dip,480dip)

But I want to add a Bitmap.Config such as ARGB_8888 but I cannot see a way to do that with the methods available of the Bitmap-object. Am I missing something?

What I want to do is to convert the following Java-code to B4A:
B4X:
Bitmap.Config conf = Bitmap.Config.ARGB_8888; // see other conf types
Bitmap imageToDisplay = Bitmap.createBitmap(640,480,conf);

I know I can resolve it by other means but I thought I should ask first.....
 

moster67

Expert
Licensed User
Longtime User
Thanks, I was not aware of that but should have had suspected so.
However, if we wish to create a bitmap using perhaps ARGB_4444 or any other permissible value, how can we do that?
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Working with OpenCV and TensorFlow. Just wanted to be sure to use native methods of B4A as much as possible when available.
I will resolve it as suggested by you - no problems. Thanks.
 
Upvote 0
Top