Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

shell_exec / ImageMagick not creating image

Hello,

I would like to create a .mvg file use shell_exec() and ImageMagick.

This function produces an empty .mvg file.

But file but if I use print() then copy/paste it through a command line, the correct .mvg file is created!

Thanks!


////////////////////

function make_button_mvg      ($text, $fontSize, $fontColor, $bgcolor, $borderColor)

{
      print      ("convert -background transparent -fill transparent -pointsize " . escapeshellarg($fontSize + 2) . " label:" . escapeshellarg($text) . " -format " . escapeshellarg('viewbox 0 0 %[fx:w+7] %[fx:h+7] fill red roundRectangle 1,1 %[fx:w+5] %[fx:h+5] 5,5') . " info: > rounded_corner.mvg");
      shell_exec ("convert -background transparent -fill transparent -pointsize " . escapeshellarg($fontSize + 2) . " label:" . escapeshellarg($text) . " -format " . escapeshellarg('viewbox 0 0 %[fx:w+7] %[fx:h+7] fill red roundRectangle 1,1 %[fx:w+5] %[fx:h+5] 5,5') . " info: > rounded_corner.mvg");
}

ASKER CERTIFIED SOLUTION
Avatar of jentulman
jentulman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hankknight

ASKER

That does not help.