aheckmann / gm

GraphicsMagick for node
http://aheckmann.github.com/gm/
6.95k stars 615 forks source link

Could not execute GraphicsMagick #819

Closed xunder-matth closed 3 years ago

xunder-matth commented 3 years ago
gm('./background.png')
        .fill('#e0e0e0')
        .font("./NyataFTR-Regular.otf", 30)
        .drawText(580, 206, "10 ms").write("./backgroundfix.png", (err) => {
            if (err) console.log(err);
            else console.log("Writed to image.");
        });

This code is throwing error: Error: Could not execute GraphicsMagick/ImageMagick: convert "./background.png" "-fill" "#e0e0e0" "-pointsize" "30" "-font" "./NyataFTR-Regular.otf" "-draw" "text 580,206 \"10 ms\"" "./backgroundfix.png" this most likely means the gm/convert binaries can't be found

I can confirm I installed gm:

$ gm -version
GraphicsMagick 1.3.35 2020-02-23 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
xunder-matth commented 3 years ago

Fixed sudo apt install graphicsmagick-imagemagick-compat

StellaYangF commented 3 years ago

I got the same problem. How can I resolve through windows?