MCPcopy Index your code
hub / github.com/mailru/FileAPI / loadImage

Function loadImage

tests/tests.js:39–50  ·  view source on GitHub ↗
(src, fn)

Source from the content-addressed store, hash-verified

37
38
39 function loadImage(src, fn){
40 if( src.file ){
41 fn(src.file);
42 }
43 else {
44 var img = document.createElement('img');
45 img.onload = function (){
46 fn(img);
47 };
48 img.src = src;
49 }
50 }
51
52
53 function toCanvas(img){

Callers 1

imageEqualFunction · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected