Page 1 of 2

No matter what, second parameter of convert always invalid.

Posted: 2011-10-20T10:38:32-07:00
by blindley
I'm trying out some things from the examples on the main site, like this:

Code: Select all

convert -background lightblue -fill blue -font Candice -pointsize 72 label:Anthony label.gif
I get the error:

Code: Select all

Invalid Parameter - lightblue
In fact, no matter what I enter, as long as there are 2 or more parameters, it always just tells me the second parameter is invalid. I'm doing this in Windows Powershell.

Re: No matter what, second parameter of convert always inval

Posted: 2011-10-20T11:06:13-07:00
by Bonzo
Can you get anything to work? The problem may be that windows is using its convert program and not Imagemagicks.

Re: No matter what, second parameter of convert always inval

Posted: 2011-10-20T11:21:00-07:00
by blindley
Bonzo wrote:Can you get anything to work? The problem may be that windows is using its convert program and not Imagemagicks.
Yes, that was it. Thanks. I moved ImageMagick to the front of my path now.

Re: No matter what, second parameter of convert always inval

Posted: 2011-10-20T11:25:33-07:00
by Bonzo
Yes, that was it. Thanks. I moved ImageMagick to the front of my path now.
Thats interesting as most people seem to rename the Imagemagicks convert program - I have never had this problem on any of my installs - so making Imagemagick the first item on the enviromental path fixes it?

Re: No matter what, second parameter of convert always inval

Posted: 2011-10-20T11:38:40-07:00
by blindley
Bonzo wrote:Thats interesting as most people seem to rename the Imagemagicks convert program
Well, I would do that, but seeing as how I've never ever used or even heard of this Windows convert program, and I have no idea what it does and doubt I'll ever use it, I'm not worried about the name collision. Besides, when I add things to my path, it's only on a per powershell-session basis. I have a script that allows me to simply type

Code: Select all

Add-Path("imagemagick","python3","whateverelse")
and voila. It used to add them to the end, now it adds them to the beginning.
Bonzo wrote:so making Imagemagick the first item on the enviromental path fixes it?
Yep.

Re: No matter what, second parameter of convert always invalid.

Posted: 2017-04-21T04:55:04-07:00
by lekagour
Hi. I am trying to run this command via R. I am using the following command: `system("convert -delay 80 *.png example_1.gif")` and i get the same error. Does anyone know how could i fix it ? (i do not know how to add imagemagick in the path also)

Re: No matter what, second parameter of convert always invalid.

Posted: 2017-04-21T06:34:19-07:00
by snibgo
I don't know R. Perhaps it has documentation that tells you how to change the path. Or perhaps it simply inherits the path from the operating system (Windows, Unix, whatever).

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T09:51:30-07:00
by Rye
Sorry for the gravedigging, but as I installed ImageMagick-7.0.7-28-Q16-x64-static today, the "convert" command appears to show similar behaviour as outlined here.

Is there a simple (cmd ?) fix for this ?

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:01:32-07:00
by snibgo
At your v7 installation, you probably didn't tick the box for "legacy" components, so it didn't install convert.exe, so that command runs the Microsoft program.

I suggest you use "magick" instead of "convert".

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:10:15-07:00
by Rye
Ok. However, which of these "is" the "legacy checkbox" ?

Image

The problem isn't "convert.exe"... I rely on "mogrify" for many scripts (for which I don't want to change it)...

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:10:28-07:00
by fmw42
IM 7 uses magick. When you use convert, it is actually running the legacy IM 6. So if you really want the new features of IM 7, then use magick, not convert.

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:21:48-07:00
by Rye
Ah ok, that makes sense.

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:36:29-07:00
by snibgo
From ImageMagick-7.0.7-28-Q16-HDRI-x64-dll.exe, I get this:
Image
I don't know why you don't have that option.

For "mogrify", "identify" etc use "magick mogrify", "magick identify" etc.

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-28T10:43:10-07:00
by Rye
I know why.
The static built is missing that option.
The others have it.

Re: No matter what, second parameter of convert always invalid.

Posted: 2018-04-29T10:32:55-07:00
by muccigrosso
fmw42 wrote: 2018-04-28T10:10:28-07:00 IM 7 uses magick. When you use convert, it is actually running the legacy IM 6. So if you really want the new features of IM 7, then use magick, not convert.
This is good to know since IM's behavior on this seems a bit misleading. That is, on my High Sierra system, I get the following identical output when getting the version of both commands:

Code: Select all

 > convert -version
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-03-26 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib fontconfig freetype jbig jng jp2 jpeg lcms ltdl lzma png tiff x xml zlib
 > magick -version
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-03-26 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib fontconfig freetype jbig jng jp2 jpeg lcms ltdl lzma png tiff x xml zlib
I have only v. 7 installed (via homebrew).

Yet it does look like `convert` is not the same as `magick`, though it is the same as `magick convert`, based on its inability to use the new fx function, as in

Code: Select all

magick rose: -resize %[fx:w*5]x show:
That is, replacing or supplementing `magick` with `convert` results in an error, whereas `magick` all by itself works as expected.

Is there an easier way to tell/show that convert is actually using version 6?