I have array contain strings and I want to display them in image format (each image contain a string). I need display image in format: <img src="data:image/png;base64,...<data>..."/>
, all images in a HTML page. How to create base64 encoded image from String?
I tried to search from google, but there are tutorials for "create base64 encoded image from image file".
Example: If my text is "600153957", the output will be:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAAOCAIAAAD42Ti+AAADv0lEQVRIidVWT0gqaxQ/14ZBRYaMSSLEhEKshYREVAwuQkTETRLiooVEtIgWLUQiwqSFyxZuAhmmCJGQFuJCypW4CJEIEZIWFQViIGVCMflMOG/xdeeaXeXxFu9xf6vD7zu/7/yZ7xzmByLCnwnZ/53Av8eX1A8ODtRq9fPz838WfmFhoa+vb3Z29urqqpvPx8fHXz/x5QB/olKpMAyzsrKCbUgkEkql0m63p1Kpf8JzHHd0dISIzWbTbDarVCqZTLa2tvb09OTxeDQaDUVRUgie5wEgEok4HA69Xt9sNr8LEZFhGCnb+fl5Kdav1JeXlxmGqVarEiOKokajsdvt8Xicoqh4PN6bj0ajABAMBhGxXq/TNK1SqRwORzgcbjabbrc7Go0mEgkAODw8RMSZmZnJyUlEzOfzAHB6evpdiIjX19e5XC4WiwGA0+n8FUtqOU3Tfr+/vYWCIMhksnK5jIhWq9Vqtfbm3W63lHo4HFYqlbVaDb9icXERAARBQES5XL66uoqIjUYDAPb29noIw+GwVPNnLGKFQiEAkMlkJpOJVI+IDodjamqK2D6fj2XZ3jwiSqmbTKaJiYm7uzvp6O3tjdRmNptFUURElmW3t7clYSgU+q2QwGazURTVXtLnmCaTSZZlU6mU0+l0uVwPDw8AcHFxYTKZiANFUfV6ndjd+HbQNF0qlQwGw87ODgA8Pj4ajUbywARBUCgUAOD1ekul0svLy/7+PgDo9frvQoLX19dMJmOxWNRqdeeYqlQqMj3k25FHRlHU5uYmcfB6vQzDELsb3951RKzValtbWwCQSqVubm4AQC6XA4BWqyUTJYqizWaTSpXGrF1ImJOTE+lFdXa91WoNDQ0BAGmhKIoA0N/f32q1iMPl5aXRaCR2N74DarXa7/cDQKFQGB0dvb+/f39/LxQK5XKZDLRCoTg7O8vn8wMDAx6PZ3Bw8LuQMOl0GgDsdnv7/Z+pj42NkXTJBpiengaAubm5YrEIALe3t8ViUVJ2478jGAwCAMdxADAyMgIAyWQSAEibCHiebzQau7u73YQAkMvldDrd+Pj4l9ulMTUYDLFYjGVZjuMImc1maZoWBMFiscjlcrJSevDtDyabzS4tLQEA2VrVajWdThPGYrGQFY6Ix8fHABCJRKQbOoQEcrl8fX29Y3A/U2+1Wj6fj2EYjuMqlYp0zPP88PAwy7LS8u7Nu91usjRcLpdWq+V5nvCZTIZhGJ1OFwgEGo2G5B8IBDY2Ntpv6BASmM3m8/PzjtR/4B/7+/U3c4foNnBzZrIAAAAASUVORK5CYII=">
Live example: http://goo.gl/mYBUI . I want protect my numbers like this website. By this way, the spam software which scan text to find this numbers can't read them.
Please help me! Sorry for my bad English.