Page 1 of 1

Convert: unrecognized option -sparse-color

Posted: 2011-04-05T14:00:31-07:00
by rzulfekar
Hi All.
I'm very new to IM, and I just installed version 6.6.9 on a cygwin environment. However, I am trying to run a convert function which utilizes a sparse color option, but I'm getting the following error: convert: unrecognized option '-sparse-color'. From what I understand, the sparse color option should have been added a few versions ago. Can someone please help me and point me in the right direction as to what it is that I'm missing or doing wrong? The below convert function is what I'm trying to invoke (as per a sample I found).

convert -size 100x100 xc: -sparse-color Barycentric \
'30,10 red 10,80 blue 90,90 lime' \
-fill white -stroke black \
-draw 'circle 30,10 30,12 circle 10,80 10,82 circle 90,90 90,92' \
sparse_barycentric.png

Re: Convert: unrecognized option -sparse-color

Posted: 2011-04-05T14:28:28-07:00
by Bonzo
To see if -sparse-color is supported run:

Code: Select all

convert -list command
Your code works OK for me on Vista via the command prompt. cd\ back to c:\> and try this:

Code: Select all

convert -size 100x100 xc: -sparse-color Barycentric "30,10 red 10,80 blue 90,90 lime" -fill white -stroke black -draw "circle 30,10 30,12 circle 10,80 10,82 circle 90,90 90,92" sparse_barycentric.png

Re: Convert: unrecognized option -sparse-color

Posted: 2011-04-05T14:35:19-07:00
by rzulfekar
Okay, here's something I just found. I found this command to identify the version: identify -version. And it's telling me that I have Image Magick 6.4.0. I find this odd, since I just installed this yesterday using this link: http://imagemagick.org/script/binary-releases.php (I selected the cygwin installation ImageMagick-i686-pc-cygwin.tar.gz). It unpacked into a folder titled "ImageMagick-6.6.9". So, why would the identify command say I have 6.4.0?

Also, to answer the other questions, when I entered convert -list command, the sparse command didn't show up. So, I now think that I do in fact have 6.4 installed, but the only version I found on the site was the one I mentioned earlier, is it possible that the cygwin link was never updated? Does anyone know how I can get the latest version for cygwin and how I can upgrade?

I appreciate everyone's help so far. Thank you!

Re: Convert: unrecognized option -sparse-color

Posted: 2011-04-05T14:42:05-07:00
by Bonzo
Either you have two versions installed - probable or as you say there is something wrong with the install file.

I just use command line and batch files on windows or a XAMPP localhost.

What happens if you use the path to the new version in your code something like c:\Program Files\ImageMagick-6.6.9\convert

Code: Select all

c:\Program Files\ImageMagick-6.6.9\convert -size 100x100 xc: -sparse-color Barycentric \
'30,10 red 10,80 blue 90,90 lime' \
-fill white -stroke black \
-draw 'circle 30,10 30,12 circle 10,80 10,82 circle 90,90 90,92' \
sparse_barycentric.png

Re: Convert: unrecognized option -sparse-color

Posted: 2011-04-05T15:29:47-07:00
by rzulfekar
Well, I tried to execute the convert command from within the ImageMagick-6.6.9 folder, and that still doesn't work. I also just tried re-installing from the unix source and when I ran the identify -version command, it still shows 6.4. Something is weird... I appreciate your help, I'm not sure at this poin what to try. Should I just remove everything and start all over again from the beginning with a fresh install?

Re: Convert: unrecognized option -sparse-color

Posted: 2011-04-05T19:26:57-07:00
by anthony
I would look to found out which versions of convert are installed and where. Also watch out of the 'Windows' 'convert" program whcih is for disk work not images.

It may be that teh older convert was installed as part of another package, maybe a video editor??

Next I would probably try to remove all versions of convert.
Or directly run the run convert command with a full PATH.
EG: C:\...\...\...\convert