179
rated 0 times
[
180]
[
1]
/ answers: 1 / hits: 22205
/ 8 Years ago, tue, may 3, 2016, 12:00:00
Since images are data, we can write our code as
<img src=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg== alt=Red dot />
Now my point is: can we create that base64 data with javascript? Is there any framework for it?
My actual requirement is that I have a string like Cow and I want it as an image.
Note: I do not want a server call for it. I know I can call server side code by passing Cow as a parameter. My server side code can generate that image, but I want do this from the browser with JavaScript.
More From » image-processing