- Jun 6, 2020
- 11,517
- 4,383
I noticed the other day that there were quite a few questions regarding decoding base64 image stings, so I quickly put together this simple but effective base64 encode/decode images library for others to use.
I will be turning more of my simple but useful routines to libraries, but not too many
Instructions:
In Globals add the following line
Dim Base64Con As Base64Image
Dim Base64Con As Base64Convert
To get an encoded base64 data stream, and return it as an bitmap ready to load into an image view for example, use the following line.
Base64Con.DecodeToImage(ImgStr As String) As Bitmap
Or
To get an image file, and encode it into an base64 data stream, ready to save into a database or file for example, use the following line.
Base64Con.EncodeFromImage(FolderPath [COLOR=rgb(65, 105...
[URL='https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/']Base64 encode/decode image library[/URL]
I will be turning more of my simple but useful routines to libraries, but not too many

Instructions:
In Globals add the following line
Dim Base64Con As Base64Convert
To get an encoded base64 data stream, and return it as an bitmap ready to load into an image view for example, use the following line.
Base64Con.DecodeToImage(ImgStr As String) As Bitmap
Or
To get an image file, and encode it into an base64 data stream, ready to save into a database or file for example, use the following line.
Base64Con.EncodeFromImage(FolderPath [COLOR=rgb(65, 105...
[URL='https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/']Base64 encode/decode image library[/URL]
برای دیدن لینک ها باید ثبت نام کنید