Javascript Hex String to Image
- by Gunnar Hoffman
Hello everyone.
I'll cut right to the chase. Right now I am developing a web based application. It has a PHP REST based architecture that serves up XML documents. On many of these documents attributes are hex encoded picture strings.
On the client side jQuery AJAX fetches an XML document with a picture in it. I need to display said picture in some <img> tags. However my knowledge on such methods is lacking so here I am asking for help.
Goal:
JavaScript String variable in hex or base64 HTML displayed image.
Cross browser is required, or a hack for the ones that do not support it is fine.
Thanks,
Gunnar