public function border($w, $h = null, $type = Imagick::INNER_BORDER)
{
$h = null === $h ? $w : $h;
if ($type == self::INNER_BORDER) {
$this->setStrokeWidth($h * 2);
$this->drawLine(0, 0, $this->width, 0);
$this->drawLine(0, $this->height, $this->width, $this->height);
$this->setStrokeWidth($w * 2);
$this->drawLine(0, 0, 0, $this->height);
$this->drawLine($this->width, 0, $this->width, $this->height);
} else {
$this->resource->borderImage($this->setColor($this->strokeColor), $w, $h);
}
return $this;
}