Open MoeexT opened 5 years ago
For your second error about the Invalid Parameter, ran into a similar problem as well, and realized that it's because gm
doesn't support ImageMagick v7 yet because "The "magick" command is the new primary command of the Shell API, replacing the old "convert" command."; there's a PR #774 open to fix it. Meanwhile, you'll have to downgrade to ImageMagick v6 and make sure to uninstall imageMagick v7 before trying again.
New to node.js. Use gm for the first time. Encountered two problems:
Could not execute GraphicsMagick/ImageMagick: gm "convert" "C:\Users\...\.jpg" "-crop" "2442x1853+0+0" "C:\Users\...\_1.jpg" this most likely means the gm/convert binaries can't be found
. I solved this problem by usingconst gm = require('gm').subClass({imageMagick: true});
instead ofconst gm = require('gm');
Command failed: Invalid Parameter - -crop
, I searched for almost all solutions on stackOverflow and github issues. Still not solved until now.Here is the code:
I installed "gm" by
npm install -g gm
. And "ImageMagick-7.0.8-Q16" is installed correctly. (with 'convert' option selected). Thanks!