Translate Imagemagick command to Imagick
Posted: 2018-12-27T22:45:41-07:00
I have the following imagemagick command line options
-gravity center -background none -extent ${wbg}x${hbg}
which I replicated with the following Imagick code piece but not producing the same result.
$tmpA12->setImageGravity(imagick::GRAVITY_CENTER);
$tmpA12->setImageBackgroundColor(new \ImagickPixel("transparent"));
$tmpA12->extentImage($wbg, $hbg, 0,0);
I believe the setImageGravity is not acting upon the image or the offset 0,0 needs the right value. I am bit stuck here please help me on it
-gravity center -background none -extent ${wbg}x${hbg}
which I replicated with the following Imagick code piece but not producing the same result.
$tmpA12->setImageGravity(imagick::GRAVITY_CENTER);
$tmpA12->setImageBackgroundColor(new \ImagickPixel("transparent"));
$tmpA12->extentImage($wbg, $hbg, 0,0);
I believe the setImageGravity is not acting upon the image or the offset 0,0 needs the right value. I am bit stuck here please help me on it