functions-samples icon indicating copy to clipboard operation
functions-samples copied to clipboard

Firebase Cloud function imagemagick composite command to overlay images

Open abhishekjinxed opened this issue 7 years ago • 1 comments

i am trying to over image on another image using imagemagick on cloud function and looked into the imagemagick command like this:

convert a.png b.png -gravity center -composite result.png

i know it doesnt work like that in firebase cloud function so i looked for example and have something like this:

return spawn('convert', [tmpFilePath, tmpFilePath2, '-gravity', 'center', '-composite', tmpFilePath3]);

i get an error like this :

ChildProcessError: convert /tmp/default.jpg /tmp/IMG_4947.JPG
  -gravity center -composite /tmp/newimage.jpg failed with code 1

abhishekjinxed avatar Jul 04 '18 15:07 abhishekjinxed

@abhishekjinxed Did you ever figure out what that issue was? I'm getting the same thing..

timurridjanovic avatar Jul 02 '20 06:07 timurridjanovic