*FIXED* multi-line draw command not working

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
charper_99

*FIXED* multi-line draw command not working

Post by charper_99 »

I'm not sure why the following code does not work...
the ==directory== is a real directory, removed for security purposes, and yes, it's 777

This gets dumped via a system() command in php. It seems like it's not even trying - normally if the script touches IM at all, it takes at least 30 seconds to execute, this script is executing in less than 0.1 seconds.

Going off of this example: http://www.imagemagick.org/Usage/draw/#settings

Version: ImageMagick 6.2.0 04/04/05 Q16

Code: Select all

 /usr/local/bin/convert ==directory==/background.png -fill yellow \
-draw "circle 100,100 105,105 \
circle 202,406 207,411 \
circle 556,255 561,260 \
circle 665,455 670,460 \
circle 757,42 762,47 \
circle 375,567 380,572 \
circle 437,57 442,62 \
circle 368,283 373,288 \
circle 368,283 373,288 \
circle 368,283 373,288 \
circle 1307,2916 1312,2921 \
circle 497,649 502,654 \
circle 5283,3188 5288,3193 \
circle 4822,3477 4827,3482 \
circle 4796,4625 4801,4630 \
circle 520,4356 525,4361 \
circle 1913,1546 1918,1551 \
circle 1189,3063 1194,3068 \
circle 2225,1721 2230,1726 \
circle 2321,2882 2326,2887 \
circle 5244,5570 5249,5575 \
circle 2316,4860 2321,4865 \
circle 6000,842 6005,847 \
circle 439,4925 444,4930 \
circle 3334,5094 3339,5099 \
circle 4710,1226 4715,1231 \
circle 5249,5546 5254,5551 \
circle 441,865 446,870 \
circle 754,5705 759,5710 \
circle 2235,4215 2240,4220 \
circle 5833,2757 5838,2762 \
circle 4300,4331 4305,4336 \
circle 4101,4496 4106,4501 \
circle 3867,621 3872,626 \
circle 107,4953 112,4958 \
circle 3963,4652 3968,4657 \
circle 3938,5307 3943,5312 \
circle 4440,530 4445,535 \
circle 1722,2015 1727,2020 \
circle 2618,1253 2623,1258 \
circle 2183,3935 2188,3940 \
circle 5159,2170 5164,2175 \
circle 5267,658 5272,663 \
circle 5777,3256 5782,3261 \
circle 68,5852 73,5857 \
circle 3654,1833 3659,1838 \
circle 5229,4277 5234,4282 \
circle 3147,235 3152,240 \
circle 5491,3740 5496,3745 \
circle 1736,2497 1741,2502 \
circle 5262,5708 5267,5713 \
circle 2361,4837 2366,4842 \
circle 1885,445 1890,450 \
circle 2637,4981 2642,4986 \
circle 3799,3561 3804,3566 \
circle 4228,5589 4233,5594 \
circle 5250,191 5255,196 \
circle 3764,5991 3769,5996 \
circle 710,1295 715,1300 \
circle 5425,3214 5430,3219 \
circle 5122,904 5127,909 \
circle 3248,4759 3253,4764 \
circle 2874,731 2879,736 \
circle 164,5233 169,5238 \
circle 1899,4306 1904,4311 \
circle 1575,5351 1580,5356 \
circle 2718,3324 2723,3329 \
circle 4642,4610 4647,4615 \
circle 4477,3785 4482,3790 \
circle 3595,3883 3600,3888 \
circle 425,2270 430,2275 \
circle 3335,4279 3340,4284 \
circle 2225,171 2230,176 \
circle 855,3878 860,3883 \
circle 5158,5558 5163,5563 \
circle 3262,5165 3267,5170 \
circle 3676,2005 3681,2010 \
circle 2105,2931 2110,2936 \
circle 2719,2519 2724,2524 \
circle 3893,3775 3898,3780 \
circle 1700,1130 1705,1135 \
circle 4717,2323 4722,2328 \
circle 1902,3230 1907,3235 \
circle 181,3228 186,3233 \
circle 312,539 317,544 \
circle 1818,2949 1823,2954 \
circle 5319,5351 5324,5356 \
circle 5501,3400 5506,3405 \
circle 841,5202 846,5207 \
circle 1212,5975 1217,5980 \
circle 3336,4211 3341,4216 \
circle 5973,2509 5978,2514 \
circle 5651,3198 5656,3203 \
circle 117,1972 122,1977 \
circle 3290,911 3295,916 \
circle 2778,1542 2783,1547 \
circle 770,992 775,997 \
circle 3109,5965 3114,5970 \
circle 5080,1722 5085,1727 \
circle 1515,983 1520,988 \
circle 4731,2751 4736,2756 \
circle 4003,3260 4008,3265 \
circle 1004,3393 1009,3398 \
circle 1109,2373 1114,2378 \
circle 5388,1931 5393,1936 \
circle 3167,1069 3172,1074 \
circle 4236,5734 4241,5739 \
circle 5335,3365 5340,3370 \
circle 3583,2251 3588,2256 \
circle 224,4277 229,4282 \
" ==directory==/MilkyWay.png
Last edited by charper_99 on 2007-07-08T19:03:39-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: multi-line draw command not working

Post by magick »

If you try your command directly from the command line you will see an exception returned: token length exceeds limit. The drawing option is limited to 2500 characters from the command line. You can break up your drawing into two or more drawing options to fix the problem.
charper_99

Re: *FIXED* multi-line draw command not working

Post by charper_99 »

That seems to have fixed it - thanks!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: *FIXED* multi-line draw command not working

Post by anthony »

You can also read draw (also known as MVG commands) from a file, or from a pipeline (say via a piped open). You will have no limits, not even posible command line limits.
See http://www.imagemagick.org/Usage/draw/#mvg_file
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply