public static function dimensions($input, $type, $size) {
        if (static::file($input)) {
            $input = $input['tmp_name'];
        }

        if (!file_exists($input)) {
            return false;
        }

        if ($file = getimagesize($input)) {
            $width = $file[0];
            $height = $file[1];

            switch ($type) {
                case 'width':       return ($width == $size);
                case 'height':      return ($height == $size);
                case 'maxWidth':    return ($width <= $size);
                case 'maxHeight':   return ($height <= $size);
                case 'minWidth':    return ($width >= $size);
                case 'minHeight':   return ($height >= $size);
            }
        }

        return false;
    }
public static function dimensions($input, $type, $size) {
        if (static::file($input)) {
            $input = $input['tmp_name'];
        }

        if (!file_exists($input)) {
            return false;
        }

        if ($file = getimagesize($input)) {
            $width = $file[0];
            $height = $file[1];

            switch ($type) {
                case 'width':       return ($width == $size);
                case 'height':      return ($height == $size);
                case 'maxWidth':    return ($width <= $size);
                case 'maxHeight':   return ($height <= $size);
                case 'minWidth':    return ($width >= $size);
                case 'minHeight':   return ($height >= $size);
            }
        }

        return false;
    }
public static function dimensions ( $ input , $ type , $ size ) { if ( static :: file ( $ input ) ) { $ input = $ input [ 'tmp_name' ] ; } if ( ! file_exists ( $ input ) ) { return false ; } if ( $ file = getimagesize ( $ input ) ) { $ width = $ file [ 0 ] ; $ height = $ file [ 1 ] ; switch ( $ type ) { case 'width' : return ( $ width == $ size ) ; case 'height' : return ( $ height == $ size ) ; case 'maxWidth' : return ( $ width <= $ size ) ; case 'maxHeight' : return ( $ height <= $ size ) ; case 'minWidth' : return ( $ width >= $ size ) ; case 'minHeight' : return ( $ height >= $ size ) ; } } return false ; }
Validate an images dimensions.

@param array $input
@param string $type
@param int $size
@return bool
Validate an images dimensions .