i have run into an issue with bending text using the imagick api. our server hosting team decided to block all shell commands which were being used earlier to execute commands in imagmagick. so i had to move on to the imagick api that is available for php. while i was able to find functions for almost every other command in imagemagick, this one, the one related to bending of texts eludes me.
i was using the distort arc method to accomplish text bending earlier
Code: Select all
-distort Arc 90
Code: Select all
$image = new Imagick();
$draw = new ImagickDraw();
$pixel = new ImagickPixel('gray');
$image->newImage(1225, 1225, $pixel);
$image->setGravity(imagick::GRAVITY_CENTER);
$draw->setFont('arial');
$draw->setFillColor("#CCCCCC");
$draw->setFontSize(48);
$image->annotateImage($draw, 0, 48, 0, "HELLO WORLD");
$image->paintTransparentImage('gray', 0.0, 10);
$image->distortImage( Imagick::DISTORTION_ARC, array(90), true );
$image->trimImage(0);
$image->setImageFormat('png');
ob_start();
header("Content-type: image/png");
echo $image;
regards