Page 1 of 1

-Draw Issue : Works fine on Win32, not Linux

Posted: 2008-08-17T17:31:22-07:00
by StephenP
On my windows XP Home with XAMPP, the following code is fine:
shell_exec('convert tile'.$r.'.gif null: tg1'.$r.'.gif +matte -compose CopyOpacity -layers composite -pointsize 10 -draw "fill black text 0,'.($h-5).' krabbelaars.eu fill white text 1,'.($h-6).' krabbelaars.eu " tg1'.$r.'.gif');
-tile'.$r.'.gif is an animated gif
-$h is the height of said gif.

Any ideas why this would work on the one platform but not the other?

Re: -Draw Issue : Works fine on Win32, not Linux

Posted: 2008-08-17T17:34:13-07:00
by magick
Are you using the same version of ImageMagick under Windows and Linux? If so, we need additional details on how the command is failing under Linux.

Re: -Draw Issue : Works fine on Win32, not Linux

Posted: 2008-08-17T18:07:45-07:00
by StephenP
Here is a bit of a broader scope:
shell_exec("convert -size ".$w."x -fill white -font \"".$_REQUEST['font']."\" -background black -gravity center label:\"".$text."\" tg1".$r.".gif");
shell_exec("convert ".$_REQUEST['glitter']." -virtual-pixel tile -set option:distort:viewport ".$w."x".$h." -distort SRT 0 tile".$r.".gif");
shell_exec('convert tile'.$r.'.gif null: tg1'.$r.'.gif +matte -compose CopyOpacity -layers composite -pointsize 10 -draw "fill black text 0,'.($h-5).' krabbelaars.eu fill white text 1,'.($h-6).' krabbelaars.eu " tg1'.$r.'.gif');
Creates a text item, creates an equally sized animated tile, then overlays the animation (glitter) onto the text.
The weird part is, the first part of the third command (overlaying the animation onto text) works perfectly, but then where I'd expect there to be "krabbelaars.eu" written in the bottom left corner, there's nothing.

Re: -Draw Issue : Works fine on Win32, not Linux

Posted: 2008-08-17T20:27:58-07:00
by anthony
I would look at the inserted variables to see if they contain extra spaces. Such spaces could result in different parsing.

Remember the shell is not quite the same as DOS, with more meta characters and more functionalty.

Re: -Draw Issue : Works fine on Win32, not Linux

Posted: 2008-08-18T13:12:01-07:00
by StephenP
Thanks for the advice, I'll look into it :)
I just noticed, though, it works on 16-bit (the windows installation), but not 8-bit (on Linux)