Horde_Image_Imagick::getDimensions PHP Method

getDimensions() public method

Returns the height and width of the current image data.
public getDimensions ( ) : array
return array An hash with 'width' containing the width, 'height' containing the height of the image.
    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);
    }