I need to convert this command line: command='convert -delay 20 $original' command="$command -background lightblue -bordercolor lightblue -border 5x2" for i in `seq 100 -4 0;`; do command="$command \\( -clone 0 -splice ${i}x0+0+0 " command="$command -wave 10x100 -chop ${i}x0+0+0 \\)" done # remove page offsets and delet the original image command="$command +repage -delete 0 -loop 0 $finished" eval $command Code (markup): Into a PHP exec command.. for examplefrom a different command line) system("exec 2>&1; /usr/local/bin/convert -dispose previous -delay 30 \ bla bla bla bla $finished"); Code (markup): First person to do this for me, working can get $15 paypal
I haven't tested the script but what is the problem exactly? Getting the output? $oput = system("exec 2>&1; /usr/local/bin/convert -dispose previous -delay 30 \ bla bla bla bla $finished"); print $oput; PHP: That what you're looking to do? Regards, Dennis M.
There is no problem. I just need to implement that first quote into PHP. So the user uploads an image and the output is spat out. I already have all this from previous image effects. I just need it in PHP format so to stpeak for example (from a diff effect)
I don't think you can pass multiple commands in one call to system(). What do you need the "exec 2>&1;" for? Why not just tack 2>&1 on the end of your convert command?
Is it supposed to create 20+ images ? <? $original = '/paht/to/original.jpg'; $finished = 'path/to/finished.jpg'; $command = "convert -delay 20 $original -background lightblue -bordercolor lightblue -border 5x2"; for($i = 100; $i >= 0; $i -= 4) { $command .= " \\( -clone 0 -splice {$i}x0+0+0 "; $command .= " -wave 10x100 -chop {$i}x0+0+0 \\)"; } // remove page offsets and delet the original image $command .= " +repage -delete 0 -loop 0 $finished"; exec($command); ?> Code (markup):
How would you do this for statement?? for i in `seq 10 -2 -8; seq -10 2 8`; do command="$command \\( -clone 0 -wave ${i}x150 \\)" done
Whoops, missed that second seq call. <? $command = ''; foreach(explode("\n", `seq 10 -2 -8; seq -10 2 8`) as $i) { $command .= " \\( -clone 0 -wave {$i}x150 \\)"; } echo $command; ?> Code (markup):