firebase / firebase/functions-samples

Firebase Cloud function imagemagick composite command to overlay images

Open
#429 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
3.8k
Avg merge
3d 23h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.