-Draw Issue : Works fine on Win32, not Linux

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
StephenP

-Draw Issue : Works fine on Win32, not Linux

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
StephenP

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
StephenP

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

Post 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)
Post Reply