You could extend the existing Imagick adapter, and add a 'roundCorners' method.
class ImagickExtended extends \Phalcon\Image\Adapter\Imagick
{
public function roundCorners($xRounding, $yRounding, $stokeWidth = 10, $displace = 5, $sizeCorrection = -6)
{
return $this->getInternalImInstance()->roundCorners($xRounding, $yRounding, $stokeWidth, $displace, $sizeCorrection);
}
}
Or, considering the provided Imagick adapter provides a 'getInternalImInstance' method that is publicly accessible, you could just look at getting the instance and calling 'roundCorners' where you need to.
class MyController extends Controller
{
public function roundAction()
{
$image = new Phalcon\Image\Adapter\Imagick("upload/test.jpg");
$image->getInternalImInstance()->roundCorners(24, 24);
if ($image->save()) {
// ...code...
}
}
}
Take a look at the code structure for the Imagick class provided in Phalcon here: https://github.com/phalcon/phalcon-devtools/blob/master/ide/2.0.8/Phalcon/image/adapter/Imagick.php