uniplan Active Member Licensed User Longtime User Mar 29, 2017 #1 Hi, i have base64 image string and i want to load into ImageView. How i can do it? Thnak you
DonManfred Expert Licensed User Longtime User Mar 29, 2017 #2 Convert the base64 to a bytearray. Create a bitmap from this bytearray. Put this bitmap into the imageview. Upvote 0
Convert the base64 to a bytearray. Create a bitmap from this bytearray. Put this bitmap into the imageview.
uniplan Active Member Licensed User Longtime User Mar 29, 2017 #3 Thank you...i just follow this mode, but how i can put the bitmap into imageview? now i create a html code with image tag and put into webview. Upvote 0
Thank you...i just follow this mode, but how i can put the bitmap into imageview? now i create a html code with image tag and put into webview.
eurojam Well-Known Member Licensed User Longtime User Mar 29, 2017 #4 or use this lib: https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/ Upvote 0
M MohammadNew Active Member Licensed User Longtime User Mar 29, 2017 #5 uniplan said: Hi, i have base64 image string and i want to load into ImageView. How i can do it? Thnak you Click to expand... you need library StringUtils B4X: Dim buffer() As Byte Dim b As Bitmap Dim su As StringUtils buffer = su.DecodeBase64(put here your source base64 image string) Dim In As InputStream In.InitializeFromBytesArray(buffer, 0, buffer.Length) b.Initialize2(In) ImageView1.Bitmap = b Upvote 0
uniplan said: Hi, i have base64 image string and i want to load into ImageView. How i can do it? Thnak you Click to expand... you need library StringUtils B4X: Dim buffer() As Byte Dim b As Bitmap Dim su As StringUtils buffer = su.DecodeBase64(put here your source base64 image string) Dim In As InputStream In.InitializeFromBytesArray(buffer, 0, buffer.Length) b.Initialize2(In) ImageView1.Bitmap = b