Firemonkey – Showing a image from base64 string (how to?)


I am creating a FMX applicacion (Delphi Seattle) for android/ios and I am receiving Json data through RESTResponse component. The json data has an Image (Photo) field in base64 (utf8 encoded) string that I would like to show in a TImage component. Please can you show me how can i do that?

UPDATE: I have already the JSON data as an object and as a string like this:

“Name” : “Alfred”,
“Photo”: “zC8bH24CIjYX5eedCWIvnNqar4xkQRqPxt2n8cReAwWD4+w/2qErkJggg==…”

So i have the Image in a base64 string. So my real questions would be:

How to convert the base64 string into an image?
How to show the image in a TImage component?

I am learning delphi, and trying to figure out by myself it’s a difficult, so i appreciate your help with this.


Comments are closed.