These three simple individual extensions are already rolled into Juan's Base64 extension, but I believe it may be useful to some to have access to individual functions for specific needs....
There is now a fourth little one, not included in Juan's extension, for the Canvas ImageSprite.
There is now a fifth one, for converting binary files to and from base64
Image To/From Base64
This extension has two functions, the first will convert whatever image is in an image component to a base64 string, the second will load a base64 string to an image component. There is an After Conversion to Base64 event as well
Blocks
Usage
AIX
ImageToBase64
JAVA
ImageBase64.java.txt (2.4 KB)
Canvas To Base64
This extension has the one function, working much the same as canvas saveas, but converting the canvas image to base64. There is an After Conversion event
Blocks
Usage
Updated: 2023-09-27T23:00:00Z, due to changes in code
AIX
CanvasToBase64
JAVA
CanvasBase64.java.txt (1.7 KB)
Camera Picture to Base64
This extension will allow the user to take a picture with their camera, and to then return the thumbnail image of the picture taken as a base64 string. There is an After Picture Taken / Conversion event.
Blocks
Usage
AIX
CameraToBase64
JAVA
CameraBase64.java.txt (2.6 KB)
Video
Base64 to ImageSprite
An extra one, created by @Kevinkun to set an imageSprite Picture from a base64 string
cn.kevinkun.SpriteBase64.aix (4.6 KB)
Base64Convertor
Another base64 tool, to convert a binary file to a base64 string, and to convert a suitable base64 string to a binary file. Requires full or absolute paths to files (you might use the File component to make the paths). The extension provides direct and event methods.
uk.co.metricrat.base64convertorV1.aix
Credits
My thanks to @shreyash, @Kumaraswamy, @vknow360, @Juan_Antonio for their help and support in creating these extensions
My thanks to @shreyash for the RUSH extension builder
Available for use in any MIT AppInventor projects or competitions
#####################################################################
This work by TIMAI2 is licensed under a
Creative Commons Attribution-ShareAlike 4.0 Unported License with attribution.
Please use name = TIMAI2 and link to this source page when giving credit.
#####################################################################