Page 1 of 1

Unable to get -draw to work in portable version

Posted: 2011-01-19T17:01:06-07:00
by haleg
I don't have Admin rights to my work pc so am using the portable IM. I am unable to get the -draw command to work at all.

Even the simple command:
"convert Pic1.tif -fill red -draw 'color 30,20 point' Pic1_red.tif"
does not work

Any ideas?

Thanks

Re: Unable to get -draw to work in portable version

Posted: 2011-01-19T17:18:35-07:00
by fmw42
This seems to work fine for me:


convert -size 100x100 xc:white -fill red -draw 'color 30,20 point' tmp.png


IM 6.6.7.1 Q16 Mac OSX Tiger


What version are you on and what is the error message? Do you have write permission for the directory you are working in?

If you are on a PC, sometime there is confusion between Windows convert and IM convert. Have you renamed the IM convert to avoid confusion?

Re: Unable to get -draw to work in portable version

Posted: 2011-01-19T17:20:03-07:00
by magick
Add -debug configure to your command line (right after 'convert') and post the output to this forum.

Re: Unable to get -draw to work in portable version

Posted: 2011-01-20T12:00:25-07:00
by haleg
Below is the output from the -debug command.
All the commands were run from the IM convert directory and the image is larger than 7100x4800 pixels, also located in the same directory.

I can get IM convert to do other things, if I avoid the "-draw" command, like convert a selected color with the following:
"convert.exe pic1.tif -fill red -opaque "#D9F3F7" Pic1_red.tif"

But my true goal is to use a selected color from the image so I tried the following (from IM v6 Examples web page):
"convert.exe pic1.tif -fill red -draw 'color 0,0 replace' Pic1_red.tif"

Given that I am new to IM, I tried what I thought would be a command with options that are all listed and described on the 'usage' web page.
Thus the -draw and 'point' command.

Here it is:
C:\ProgramsMisc\ImageMagick-6.6.7-1>convert Pic1.tif -debug configure -fill red -draw 'color 30,20 point' Pic1_red.tif
2011-01-20T10:35:31-08:00 0:00.000 0.000u 6.6.7 Configure convert[5112]: utility.c/ExpandFilenames/906/Configure
Command line: convert {Pic1.tif} {-debug} {configure} {-fill} {red} {-draw} {'color} {30,20} {point'} {Pic1_red.tif}
2011-01-20T10:35:31-08:00 0:00.015 0.016u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "magic.xml"
2011-01-20T10:35:31-08:00 0:00.015 0.016u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Documents and Settings\haleg\.magick\magic.xml"
2011-01-20T10:35:31-08:00 0:00.031 0.016u 6.6.7 Configure convert[5112]: magic.c/LoadMagicList/678/Configure
Loading magic configure file "magic.xml" ...
2011-01-20T10:35:31-08:00 0:00.031 0.016u 6.6.7 Configure convert[5112]: magic.c/LoadMagicList/678/Configure
Loading magic configure file "magic.xml" ...
2011-01-20T10:35:32-08:00 0:00.531 0.531u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "colors.xml"
2011-01-20T10:35:32-08:00 0:00.547 0.547u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Documents and Settings\haleg\.magick\colors.xml"
2011-01-20T10:35:32-08:00 0:00.547 0.547u 6.6.7 Configure convert[5112]: color.c/LoadColorList/2060/Configure
Loading color file "colors.xml" ...
2011-01-20T10:35:32-08:00 0:00.547 0.547u 6.6.7 Configure convert[5112]: color.c/LoadColorList/2060/Configure
Loading color file "colors.xml" ...
2011-01-20T10:35:32-08:00 0:00.562 0.578u 6.6.7 Configure convert[5112]: locale.c/LoadLocaleList/769/Configure
Loading locale configure file "locale.xml" ...
2011-01-20T10:35:32-08:00 0:00.562 0.578u 6.6.7 Configure convert[5112]: locale.c/LoadLocaleList/769/Configure
Loading locale configure file "" ...
2011-01-20T10:35:32-08:00 0:00.562 0.578u 6.6.7 Configure convert[5112]: locale.c/LoadLocaleList/769/Configure
Loading locale configure file "english.xml" ...
2011-01-20T10:35:32-08:00 0:00.593 0.625u 6.6.7 Configure convert[5112]: locale.c/LoadLocaleList/769/Configure
Loading locale configure file "" ...
2011-01-20T10:35:32-08:00 0:00.625 0.688u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "delegates.xml"
2011-01-20T10:35:32-08:00 0:00.625 0.688u 6.6.7 Configure convert[5112]: configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Documents and Settings\haleg\.magick\delegates.xml"
2011-01-20T10:35:32-08:00 0:00.625 0.688u 6.6.7 Configure convert[5112]: delegate.c/LoadDelegateList/1223/Configure
Loading delegate configuration file "delegates.xml" ...
2011-01-20T10:35:32-08:00 0:00.640 0.688u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.640 0.688u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.640 0.688u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.640 0.688u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.656 0.703u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.656 0.703u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.656 0.703u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.656 0.703u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.656 0.703u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.672 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.672 0.719u 6.6.7 Configure convert[5112]: delegate.c/LoadDelegateList/1223/Configure
Loading delegate configuration file "delegates.xml" ...
2011-01-20T10:35:32-08:00 0:00.672 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.687 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.687 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.687 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.687 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.687 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.703 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.703 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.703 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
2011-01-20T10:35:32-08:00 0:00.703 0.719u 6.6.7 Configure convert[5112]: nt-base.c/NTLocateGhostscript/953/Configure
Ghostscript ((null)) version 0.00
convert: Non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3146.
convert: unable to open image `30,20': No such file or directory @ error/blob.c/OpenBlob/2584.
convert: no decode delegate for this image format `30,20' @ error/constitute.c/ReadImage/532.
convert: unable to open image `point'': No such file or directory @ error/blob.c/OpenBlob/2584.
convert: no decode delegate for this image format `point'' @ error/constitute.c/ReadImage/532.
convert: Non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3146.

C:\ProgramsMisc\ImageMagick-6.6.7-1>

Also I did not do an 'install' but used the "portable" version from the download page and un-zipped it to the indicated directory on the command line, as I do not have admin rights to the PC.
Running XP SP3, I have Adobe Pro Ver 9.4.0

It is probably obvious but as I said, I am new to the program. any help is appreciated...thanks.
haleg

Re: Unable to get -draw to work in portable version

Posted: 2011-05-19T15:51:40-07:00
by haleg
I have discovered the problem and it is with the Windows command parsing. It seems in Windows that you have to switch the usage of double-quotes and single-quotes. So the correct command would be:
convert.exe pic1.tif -fill red -draw "color 0,0 replace" Pic1_red.tif

Additionally, a command from the help files/web site such as:
-draw 'color 100,100 "Works like magick!" ' [this will not work in Windows] should be replaced with
-draw "color 100,100 'Works like magick!' "
Note the switching of " and '. Finally, there MUST be a space between the single-quote and the double-quotes.

Hope this helps anyone else having difficulties.

Re: Unable to get -draw to work in portable version

Posted: 2011-05-19T16:53:24-07:00
by fmw42