1.0.0 • Published 12 years ago
gmify v1.0.0
Easy Streaming GraphicsMagick
gmify provides a very simple interface to the GraphicsMagick image processer. It's a thin layer around the wonderful gm package, giving an API that satisfies the most common use case:
gmify("source.svg", "dest.png", function (file) {
file.flip()
.magnify()
.rotate("green", 45)
.blur(7, 3)
.crop(300, 300, 150, 130)
.edge(3);
}, function (err) {
if (err) {
// `err` is compiled from the raw stderr stream if appropriate.
// If it doesn't exist, then everything succeeded!
}
});
(If you want just straight-up format conversion, you can omit the third argument.)
For more info on all the things you can do with a GraphicsMagick file, consult the gm package's documentation.
Finally, don't forget to actually install GraphicsMagick on your system before using!
1.0.0
12 years ago