javascript - HTML/CSS: Background Image from raw image data, not url -


i raw image data of png-image webserver, , want use background image of div-element. possible without saving data image-file first?

use data uri:

document.getelementbyid('e').src = 'data:image/png;base64,ton_of_crap'; 

in wikipedia article, there code php , python outputs base-64 encoded images. can shove url() of css file (or src attribute of <img /> tag) , should work.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -