I'm using GraphicsMagick for node to take a source image, resize, crop and then apply a mask:
gm(tempfile)
.quality(90)
.resize(null, 38)
.gravity('Center')
.crop(20, 34)
.mask('./public/assets/mask.png')
.write(thumb, function (err) {
if (err) throw err
console.log('success')
})
After running, The image is resized and cropped successfully, but the mask is not applied. No error is thrown (i.e. the console prints 'success').
Attached to this is also the mask image I'm trying to use. I want the image to draw only on the black part. I've tried using a transparent png (the gm docs say it masks based on alpha channel), as well as a black and white jpg, but the result is the same.
I'm sure I'm missing something obvious, but I'm stumped Thanks!