Advertisement
kavallo

Leer Imagen Serializada

Oct 14th, 2019
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3.     <div id="imagen"></div>
  4.     <script type="text/Javascript">
  5.        
  6.         var image = new Image();
  7.         image.onload = function(){
  8.            console.log(image.width); // image is loaded and we have image width
  9.         }
  10.         image.src = 'data:image/png;base64,';
  11.          document.getElementById("imagen").appendChild(image);
  12.     </script>
  13. </body>
  14. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement