0

I have successfully created a image with the form of a square diamond by providing an original image and a masking image with background black alpha 0 and the diamond square white with alpha 1.

I use the following gm command

gm composite -compose in orgiginal.jpg diamond-mask.png result.png

Now I would like to reproduce the result using node.js gm module.

Fredrik Andersson
  • 3,567
  • 3
  • 19
  • 21

1 Answers1

0

I think node-gm doesn't provide support for composite/compose.

However there is a fork of GM on github that may be worth exploring: https://github.com/fanzter/gm/commit/822c917bbaaf984920e6625b65acd6d21c3ac360

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
  • Thanks, I will look it up. However I had several problems with GM and the node.js-wrapper so I ended up executing ImageMagick commands with system calls instead. – Fredrik Andersson Mar 01 '13 at 22:18