Skip to content

Commit

Permalink
add passing of data uri
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 13, 2012
1 parent 132a7f5 commit e5aac33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -21,7 +21,7 @@ input.onchange = function(e){
var reader = new FileReader;

reader.onload = function(){
thumb(reader.result, 200, 200, function(err, img){
thumb(reader.result, 200, 200, function(err, img, datauri){
document.body.appendChild(img);
});
};
Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -61,6 +61,6 @@ function thumb(img, width, height, fn) {
function fromURI(str, fn) {
var img = new Image
img.onerror = fn;
img.onload = function(e){ fn(null, img) };
img.onload = function(e){ fn(null, img, str) };
img.src = str;
}

0 comments on commit e5aac33

Please sign in to comment.