tweak graphicsmagick parameters
This commit is contained in:
parent
875a1b6eeb
commit
2210914740
@ -31,28 +31,28 @@ module.exports = (robot) ->
|
|||||||
compress = (image, callback) ->
|
compress = (image, callback) ->
|
||||||
gm(image)
|
gm(image)
|
||||||
.noProfile()
|
.noProfile()
|
||||||
.quality(rand(25,40))
|
.noise('uniform')
|
||||||
.colorize(rand(0,5),rand(0,5),rand(0,5))
|
.quality(rand(30,80))
|
||||||
|
.noise('uniform')
|
||||||
.toBuffer callback
|
.toBuffer callback
|
||||||
|
|
||||||
resize = (image, callback) ->
|
resize = (image, callback) ->
|
||||||
gm(image)
|
gm(image)
|
||||||
.resize(260000, '@>')
|
.scale('95%')
|
||||||
.resize('40%')
|
.scale('105%')
|
||||||
.resize('500%')
|
|
||||||
.toBuffer callback
|
.toBuffer callback
|
||||||
|
|
||||||
colorize = (image, callback) ->
|
colorize = (image, callback) ->
|
||||||
gm(image)
|
gm(image)
|
||||||
.modulate(rand(110,200), rand(100,110))
|
.modulate(rand(100,110), rand(100,150))
|
||||||
.toBuffer callback
|
.toBuffer callback
|
||||||
|
|
||||||
deepFry = (res, image) ->
|
deepFry = (res, image) ->
|
||||||
script = concat [
|
script = concat [
|
||||||
init(image),
|
init(image),
|
||||||
resize,
|
resize,
|
||||||
times(40, compress),
|
|
||||||
colorize
|
colorize
|
||||||
|
times(50, compress),
|
||||||
]
|
]
|
||||||
|
|
||||||
async.waterfall script, (err, image) ->
|
async.waterfall script, (err, image) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user