javascript - AJAXing Images and dealing with it's data -


jquery.ajax({   url: "http://img.bitpixels.com/getthumbnail?code=72853&size=200&url=http://www.facebook.com"}).done(function ( data ) {         if( console && console.log ) {             magically_display(data)         }     }); 

so i've got far ajaxing images. im confused, possible display image without getting base64 encoded version server? don't want use image object load image, nor want put url directly image tag, purpose find way encode image format can save in localstorage , later display using javascript.

any ideas guys?

https://developer.mozilla.org/en-us/docs/dom/storage

interface storage {   readonly attribute unsigned long length;   [indexgetter] domstring key(in unsigned long index);   [namegetter] domstring getitem(in domstring key);   [namesetter] void setitem(in domstring key, in domstring data);   [namedeleter] void removeitem(in domstring key);   void clear(); }; 

localstorage allows save string values. so, must "convert" image text , "convert back" current usecase. guess, base64 best solution.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -