Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add gamma
  • Loading branch information
aheckmann committed Jul 29, 2010
1 parent 1f7d661 commit 60aeb6a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -98,6 +98,7 @@ or clone the repo:
- emboss
- enhance
- equalize
- gamma
- monochrome


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

gm(dir + '/original.png')
.gamma(1.7, 2.3, 1.3)
.write(dir + '/gamma.png', function(err){
if (err) return console.dir(arguments)
console.log(this.outname + ' created :: ' + arguments[3])
}
)
5 changes: 5 additions & 0 deletions lib/args.js
Expand Up @@ -150,4 +150,9 @@ module.exports = function(proto){
return this.arg(null, ["-equalize"])
}

// http://www.graphicsmagick.org/GraphicsMagick.html#details-gamma
proto.gamma = function(r, g, b){
return this.arg(null, ["-gamma", [r,g,b].join(",")])
}

}

0 comments on commit 60aeb6a

Please sign in to comment.