hankknight
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");
}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER