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
Post a Comment