Skip to content

Commit

Permalink
add file types test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-moran committed May 3, 2015
1 parent a85a5a7 commit ee1445a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/filetypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var Jimp = require("../jimp.js");

var lenna = new Jimp("lenna.png", function(err, image) {
this.quality(1).write("./output/lenna-copy.jpg", loadJPEG); // JPEG copy
});

function loadJPEG(){
var jpg = new Jimp("./output/lenna-copy.jpg", function(err, image) {
jpg.invert().write("./output/lenna-invert.png");
});
}

0 comments on commit ee1445a

Please sign in to comment.