diff --git a/test/filetypes.js b/test/filetypes.js new file mode 100644 index 000000000..41f2da88a --- /dev/null +++ b/test/filetypes.js @@ -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"); + }); +} \ No newline at end of file