Reputation: 339
I'm trying to use imagemagick to create a simple .gif file from a few png files, using the general approach outlined here: http://www.r-bloggers.com/animated-plots-with-r/
However, I'm on a Windows 10 machine, and I think that's causing problems with the convert function as generally described here: http://www.imagemagick.org/discourse-server/viewtopic.php?t=19679
Can someone please explain how I can either change imagemagick or Windows so that it works?
Specifically the command I'm giving and the error that occurs is shown below:
convert *.png new.gif
The error:
Invalid Parameter - the.gif
Thank you for your help.
Upvotes: 5
Views: 5765
Reputation: 1161
With Version: ImageMagick 7.0.3-4 Q8 x64 2016-10-10 on my Windows 10, adding 'magick' in front of 'convert' gets rid of the 'invalid parameter' error. For example,
magick convert foo.jpg -quality 60 low_foo.jpg
If preferring to define the steps in a file: save the following file as convert.sh:
SRC="$1"
LOW=60
magick convert $SRC.jpg -quality $LOW low_$SRC.jpg
magick convert $SRC.jpg -quality $LOW low_$SRC.webp
magick convert $SRC.jpg -quality $LOW -resize 50% "$SRC"_"$LOW"q_50pc.jpg
magick convert $SRC.jpg -quality $LOW -resize 50% "$SRC"_"$LOW"q_50pc.webp
and running sh convert.sh foo
at a bash command prompt processes foo.jpg in four different ways. It bears to mention that after the installment, 'C:\Program Files\ImageMagick-7.0.3-Q8' appears first on the list at the System/Advanced System Setting/System Variable/Path.
Upvotes: 0
Reputation: 7954
Instead of convert.exe <args>
, use magick.exe convert <args>
.
Upvotes: 5
Reputation: 8143
You probably installed ImageMagick 7.X on your machine. This version no longer includes convert.exe
and the error that you are receiving is from the convert command of Windows. You can use magick.exe
instead or select Install legacy utilities (e.g. convert)
during the installation to install convert.exe
on your machine..
Upvotes: 13