M Makumbi Well-Known Member Licensed User Jun 28, 2019 #1 i have a round image at B4X: 'ImageView1.SetBackgroundImage(BytesToImage(ktv)) ImageView1.SetBitmap(CreateRoundBitmap(Base64StringToImage(ktb), ImageView1.Width)) ' SavePhoto(Base64StringToImage(ktb)) i wante B4X: Sub SavePhoto (Pt As Bitmap,NewFile As String) Dim Out As OutputStream Out = File.OpenOutput(File.DirRootExternal, NewFile, False) Pt.WriteToStream(Out, 100, "PNG") Out.Close End Sub Attachments setungo.png 84.4 KB · Views: 232
i have a round image at B4X: 'ImageView1.SetBackgroundImage(BytesToImage(ktv)) ImageView1.SetBitmap(CreateRoundBitmap(Base64StringToImage(ktb), ImageView1.Width)) ' SavePhoto(Base64StringToImage(ktb)) i wante B4X: Sub SavePhoto (Pt As Bitmap,NewFile As String) Dim Out As OutputStream Out = File.OpenOutput(File.DirRootExternal, NewFile, False) Pt.WriteToStream(Out, 100, "PNG") Out.Close End Sub
DonManfred Expert Licensed User Longtime User Jun 28, 2019 #2 1. Create the Bitmap B4X: dim bmp as bitmap = CreateRoundBitmap(Base64StringToImage(ktb), ImageView1.Width) 2. Save the bitmap B4X: SavePhoto(bmp, filename) 3. Add the bitmap to the imageview B4X: ImageView1.SetBitmap(bmp) Last edited: Jun 30, 2019 Upvote 0
1. Create the Bitmap B4X: dim bmp as bitmap = CreateRoundBitmap(Base64StringToImage(ktb), ImageView1.Width) 2. Save the bitmap B4X: SavePhoto(bmp, filename) 3. Add the bitmap to the imageview B4X: ImageView1.SetBitmap(bmp)