6

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.

1
  • convert is a command, not a function. Commented Aug 22, 2016 at 19:47

3 Answers 3

14

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..

Sign up to request clarification or add additional context in comments.

3 Comments

I thought convert was going to be a alias or whatever it is called for magick @dlemstra so it would still work.
Thank you to both of you. The answer that @dlemstra indicates worked. Specifically, I installed the legacy utilities, and then the convert function worked. Thank you.
Note that convert is also a windows command ("converts a FAT partition to NTFS") hence the erroneous parameter (you're actually calling the "FAT2NTFS" utility from windows, which do not know the Image magick's convert parameters)
5

Instead of convert.exe <args>, use magick.exe convert <args>.

2 Comments

Imagick is a php API for Imagemagick; how is imagick.exe going to work in this case?
The name imagick has been proposed however.
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.