roundcubemail/program/lib/Roundcube/rcube_image.php
public function props()
    {
        // use GD extension
        if (function_exists('getimagesize') && ($imsize = @getimagesize($this->image_file))) {
            $width   = $imsize[0];
            $height  = $imsize[1];
            $gd_type = $imsize[2];
            $type    = image_type_to_extension($gd_type, false);
            $channels = $imsize['channels'];
        }

        // use ImageMagick
        if (!$type && ($data = $this->identify())) {
            list($type, $width, $height) = $data;
            $channels = null;
        }

        if ($type) {
            return array(
                'type'    => $type,
                'gd_type' => $gd_type,
                'width'   => $width,
                'height'  => $height,
                'channels' => $channels,
            );
        }

        return null;
    }
public function props()
    {
        // use GD extension
        if (function_exists('getimagesize') && ($imsize = @getimagesize($this->image_file))) {
            $width   = $imsize[0];
            $height  = $imsize[1];
            $gd_type = $imsize[2];
            $type    = image_type_to_extension($gd_type, false);
            $channels = $imsize['channels'];
        }

        // use ImageMagick
        if (!$type && ($data = $this->identify())) {
            list($type, $width, $height) = $data;
            $channels = null;
        }

        if ($type) {
            return array(
                'type'    => $type,
                'gd_type' => $gd_type,
                'width'   => $width,
                'height'  => $height,
                'channels' => $channels,
            );
        }

        return null;
    }
public function props ( ) { // use GD extension if ( function_exists ( 'getimagesize' ) && ( $ imsize = @ getimagesize ( $ this -> image_file ) ) ) { $ width = $ imsize [ 0 ] ; $ height = $ imsize [ 1 ] ; $ gd_type = $ imsize [ 2 ] ; $ type = image_type_to_extension ( $ gd_type , false ) ; $ channels = $ imsize [ 'channels' ] ; } // use ImageMagick if ( ! $ type && ( $ data = $ this -> identify ( ) ) ) { list ( $ type , $ width , $ height ) = $ data ; $ channels = null ; } if ( $ type ) { return array ( 'type' => $ type , 'gd_type' => $ gd_type , 'width' => $ width , 'height' => $ height , 'channels' => $ channels , ) ; } return null ; }
Get image properties.

@return mixed Hash array with image props like type, width, height
Get image properties .