public function getDimensions()
{
if ($this->_height == 0 && $this->_width == 0) {
try {
$size = $this->_imagick->getImageGeometry();
} catch (ImagickException $e) {
return array('width' => 0, 'height' => 0);
}
$this->_height = $size['height'];
$this->_width = $size['width'];
}
return array('width' => $this->_width, 'height' => $this->_height);
}