I have been trying to load images which are in database(on local phone) .JSON talks to java and gets the byte array which i am encoding as 64 bit data and returns a string array . Now i am trying to parse the json data. I see the array but how do i read it or set it image tag in html . All answers are appreciated
Use the data://
URI scheme.
For example, if the base64-encoded data is:
iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
then you'd drop that data into an image's src
attribute like so:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
which draws this image:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With