Page 1 of 1

cmd code too long ?

Posted: 2011-02-21T21:01:45-07:00
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'/>";

?>

Re: cmd code too long ?

Posted: 2011-02-21T21:06:13-07:00
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?

Re: cmd code too long ?

Posted: 2011-02-21T21:15:34-07:00
by linjuming
folders are ready ! created!

Image

Re: cmd code too long ?

Posted: 2011-02-21T21:18:42-07:00
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

Re: cmd code too long ?

Posted: 2011-02-21T21:22:12-07:00
by linjuming
Image

Re: cmd code too long ?

Posted: 2011-02-21T21:23:54-07:00
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?

Re: cmd code too long ?

Posted: 2011-02-21T21:28:33-07:00
by linjuming
not full , uncorrelated

Re: cmd code too long ?

Posted: 2011-02-21T21:30:27-07:00
by fmw42
sorry, at this point I have no further ideas. perhaps some windows/php expert might have some suggestions.

Re: cmd code too long ?

Posted: 2011-02-21T21:32:08-07:00
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 ?

Re: cmd code too long ?

Posted: 2011-02-21T22:51:54-07:00
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.

Re: cmd code too long ?

Posted: 2011-02-21T23:12:04-07:00
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 .