(function(console) {
  'use strict';

  console.image = function image (url, callback) {
    var img = new Image;
    var canvas = document.createElement('canvas');
    var ctx = canvas.getContext('2d');

    img.onload = function () {
      var width = canvas.width = img.width;
      var height = canvas.height = img.height;

      ctx.drawImage(img, 0, 0);

      var data = ctx.getImageData(0, 0, width, height).data;
      var text_shadow = 'text-shadow:';

      for (var x = 0; x < width; x++) {
        for (var y = 0; y < height; y++) {
          var offset = y * width * 4 + x * 4;
          // text_shadow += `${x}px ${y}px 0 rgba(${data[offset]},${data[offset + 1]},${data[offset + 2]},${data[offset + 3]}),`;
          text_shadow += x + 'px ' + y + 'px 0 rgba(' + data[offset] + ',' + data[offset + 1] + ',' + data[offset + 2] + ',' + data[offset + 3] + '),';
        }
      }

      text_shadow = text_shadow.slice(0, -1);

      console.log('%c.', 'color:transparent;' + text_shadow);
      callback && callback();
    }

    img.src = url;
  };

})(console);

@@ -10,16 +10,24 @@
 (console
+, global
 ) %7B%0A  'u
@@ -38,17 +38,16 @@
 trict';%0A
-%0A
   consol
@@ -204,17 +204,130 @@
 ('2d');%0A
-%0A
+    if (global.Promise) %7B%0A      return new Promise(function (resolve, reject) %7B%0A        img.onerror = reject;%0A    
     img.
@@ -351,24 +351,28 @@
  () %7B%0A      
+ 
+   
 var width = 
@@ -397,16 +397,20 @@
 .width;%0A
+    
       va
@@ -455,16 +455,20 @@
 %0A%0A      
+  
+  
 ctx.draw
@@ -482,24 +482,28 @@
 mg, 0, 0);%0A%0A
+    
       var da
@@ -553,24 +553,28 @@
 data;%0A      
+   
+ 
 var text_sha
@@ -598,24 +598,28 @@
 w:';%0A%0A      
+   
+ 
 for (var x =
@@ -640,32 +640,36 @@
  x++) %7B%0A        
+   
+ 
 for (var y = 0; 
@@ -683,24 +683,28 @@
 ght; y++) %7B%0A
+    
           va
@@ -737,16 +737,20 @@
  x * 4;%0A
+    
         
@@ -877,24 +877,28 @@
 ;%0A          
+    
 text_shadow 
@@ -1039,16 +1039,20 @@
     
+    
 %7D%0A      
 %7D%0A%0A 
@@ -1043,27 +1043,35 @@
     %7D%0A      
+ 
-%7D%0A%0A
+   %7D%0A%0A    
       text_s
@@ -1111,16 +1111,20 @@
 %0A%0A      
+  
+  
 console.
@@ -1171,16 +1171,945 @@
 hadow);%0A
+          callback ? callback() : resolve();%0A        %7D%0A        img.src = url;%0A      %7D)%0A    %7D else %7B%0A      img.onload = function () %7B%0A        var width = canvas.width = img.width;%0A        var height = canvas.height = img.height;%0A%0A        ctx.drawImage(img, 0, 0);%0A%0A        var data = ctx.getImageData(0, 0, width, height).data;%0A        var text_shadow = 'text-shadow:';%0A%0A        for (var x = 0; x %3C width; x++) %7B%0A          for (var y = 0; y %3C height; y++) %7B%0A            var offset = y * width * 4 + x * 4;%0A            // text_shadow += %60$%7Bx%7Dpx $%7By%7Dpx 0 rgba($%7Bdata%5Boffset%5D%7D,$%7Bdata%5Boffset + 1%5D%7D,$%7Bdata%5Boffset + 2%5D%7D,$%7Bdata%5Boffset + 3%5D%7D),%60;%0A            text_shadow += x + 'px ' + y + 'px 0 rgba(' + data%5Boffset%5D + ',' + data%5Boffset + 1%5D + ',' + data%5Boffset + 2%5D + ',' + data%5Boffset + 3%5D + '),';%0A          %7D%0A        %7D%0A%0A        text_shadow = text_shadow.slice(0, -1);%0A%0A        console.log('%25c.', 'color:transparent;' + text_shadow);%0A  
       ca
@@ -2130,27 +2130,30 @@
 back();%0A    
-%7D%0A%0A
+  %7D%0A  
     img.src 
@@ -2159,16 +2159,22 @@
  = url;%0A
+    %7D%0A
   %7D;%0A%0A%7D)
@@ -2181,11 +2181,17 @@
 (console
+, this
 );%0A

Support promise