cmd code too long ?

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
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

cmd code too long ?

Post by linjuming »

pls see the two result:
Image

Image

what is the problem? when changing the "hello/page.png" to "hello/hello/page.png" ,the error appear.

Code: Select all

<?php

$path="hello/page.png";
//$path="hello/hello/page.png";

$cmd =	"convert " .
		"-size 1024x1024 xc:#E9A11A " .
		"( gradient:white-black  -alpha set -channel A -evaluate set 15% ) -compose overlay -composite " .
		"-resize 1137x116! " .
		"( -size 1200x1 xc:black -alpha set -channel A -evaluate set 90% -gravity south ) -compose overlay -composite " .
		"( -size 1200x1 xc:black -alpha set -channel A -evaluate set 90% -gravity north ) -compose overlay -composite " .
		$path;

exec($cmd);

echo "<img src='$path'/>";

?>
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmd code too long ?

Post by fmw42 »

what is the error message about? we cannot read it!

do you have a directory created at hello/hello and if so, does it have write permissions?
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: cmd code too long ?

Post by linjuming »

folders are ready ! created!

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmd code too long ?

Post by fmw42 »

sorry I have no further suggestions. perhaps this is not an IM issue, but something elsewhere on your system.

try another directory and check the permissions
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: cmd code too long ?

Post by linjuming »

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmd code too long ?

Post by fmw42 »

sorry Microsofts error data is meaningless to me. and I am not a Windows user, so really know little about it.

Is your temp directory too full?
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: cmd code too long ?

Post by linjuming »

not full , uncorrelated
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmd code too long ?

Post by fmw42 »

sorry, at this point I have no further ideas. perhaps some windows/php expert might have some suggestions.
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: cmd code too long ?

Post by linjuming »

linux code:

convert -size 1024x1024 xc:#E9A11A \( gradient:white-black -alpha set -channel A -evaluate set 15% \) -compose overlay -composite -resize 1137x116\! \( -size 1200x1 xc:white -alpha set -channel A -evaluate set 90% -gravity south \) -compose overlay -composite \( -size 1200x1 xc:black -alpha set -channel A -evaluate set 90% -gravity north \) -compose overlay -composite hello/hello/hello/page.png

can you test in your side ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: cmd code too long ?

Post by anthony »

Perhaps you are overcomplicating things.

The linux command runs fine and generates what looks like a fairs simple vertical gradient with a single pixelish line at the top and a yellowish line at the bottom. However you are missing at least a final -composite command (after your final -compose!).

basically equivalent to...

Code: Select all

convert -size 1137x1 xc:"#dc6703" xc:"#fdf52a" -size 1137x114 gradient:"#edaf1d-#e69316" +swap -append result.png
I can see no differences in the final images generated from the line you gave with all its compositions, and what I generated using above. The color values was extracted directly from the image you code generated on my linux box.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: cmd code too long ?

Post by linjuming »

Thank you ! my purpose is generating the borders with similar color of background,while I only need to set the border color to be black or white,no need to appoint the special color.
if it can be generated in linux, it will be problem of window system. Thank you again for help .
Post Reply