forked from ncb000gt/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Mayfield
committed
Aug 29, 2010
1 parent
caa11a8
commit 856a1f7
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
ImageMagick bindings for node.js | ||
# Merlin - ImageMagick bindings for node.js # | ||
|
||
## Usage ## | ||
|
||
var merlin = require('merlin'); | ||
|
||
// create a new MerlinImage with a node Buffer containing data from an image | ||
var image = new merlin.MerlinImage(buffer); | ||
var new_image = image.resize(300, 400); | ||
// operations can be chained | ||
var new_image = new_image.negative().crop(100, 100, 0, 0); | ||
// when finished, get the buffer from the image | ||
res.write(new_image.getBuffer()); | ||
|
||
## Supported Operations ## | ||
MerlinImage.rotate(/*double*/ degrees) | ||
MerlinImage.crop(/*int*/ width, /*int*/ height, /*int*/xoffset, /*int*/yoffset) | ||
MerlinImage.resize(/*int*/ width, /*int*/ height) | ||
MerlinImage.negative() | ||
|
||
More to come! We plan to create bindings for as much of the ImageMagick API as we can. | ||
|