Skip to content

Commit

Permalink
add paint method
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Jul 29, 2010
1 parent 933523c commit 924d9b8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -109,6 +109,7 @@ or clone the repo:
- morph
- negative
- noise
- paint


## Node version
Expand Down
10 changes: 10 additions & 0 deletions examples/paint.js
@@ -0,0 +1,10 @@
var gm = require('../gm')
, dir = __dirname + '/imgs'

gm(dir + '/original.png')
.paint(2)
.write(dir + '/paint.jpg', function(err){
if (err) return console.dir(arguments)
console.log(this.outname + ' created :: ' + arguments[3])
}
)
6 changes: 6 additions & 0 deletions lib/args.js
Expand Up @@ -204,6 +204,12 @@ module.exports = function(proto){
return this.arg(null, ["-noise", radius])
return this.arg(null, ["+noise", radius])
}

// http://www.graphicsmagick.org/GraphicsMagick.html#details-paint
proto.paint = function(radius){
return this.arg(null, ["-paint", radius])
}

}

function comment(arg){
Expand Down

0 comments on commit 924d9b8

Please sign in to comment.