Java Question [solved ]b4a bitmap to library android.graphics.Bitmap

MarkusR

Well-Known Member
Licensed User
maybe someone had done this.

i need to give my library a bitmap from b4a

library part:
B4X:
    public Texture(android.graphics.Bitmap Bitmap1)
    {
        this.Bitmap1 =Bitmap1;
    }

b4a part:
B4X:
Dim bmp As Bitmap = LoadBitmap(File.DirAssets,"wood.png")
Cube1.SetTexture(bmp)
 

MarkusR

Well-Known Member
Licensed User
i have plan b, i using byte array or inputstream for the image file.
 

MarkusR

Well-Known Member
Licensed User
@Erel,
omg, yes, it was just because both side know Bitmap :)
your advice work very well. thank you very much.

correct in library
B4X:
public void SetTexture(android.graphics.Bitmap Bitmap1)

wrong in library
B4X:
public void SetTexture(Bitmap Bitmap1)
 
Top