MarkusR Well-Known Member Licensed User Longtime User Apr 14, 2018 #1 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)
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 Longtime User Apr 14, 2018 #2 i have plan b, i using byte array or inputstream for the image file.
Erel B4X founder Staff member Licensed User Longtime User Apr 15, 2018 #3 MarkusR said: i have plan b, i using byte array or inputstream for the image file. Click to expand... Why? The code you posted should work (after you fix the Texture method signature to: B4X: public void SetTexture(android.graphics.Bitmap Bitmap1)
MarkusR said: i have plan b, i using byte array or inputstream for the image file. Click to expand... Why? The code you posted should work (after you fix the Texture method signature to: B4X: public void SetTexture(android.graphics.Bitmap Bitmap1)
MarkusR Well-Known Member Licensed User Longtime User Apr 15, 2018 #4 @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)
@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)