Manager.php
private function convertFormat($format)
    {
        if (is_array($format)) {
            // sounds like the format is already done, let's keep it as it is
            return $format;
        }
        if (array_key_exists($format, $this->formats)) {
            // it's a format defined in config, let's use all defined parameters
            return $this->formats[$format];
        } elseif (preg_match("/^([0-9]*)x([0-9]*)/", $format)) {
            // it's a custom [width]x[height] format, let's make a thumb
            return array('thumbnail' => $format);
        } else {
            throw new InvalidArgumentException(sprintf("Unknown IM format: %s", $format));
        }
    }
private function convertFormat($format)
    {
        if (is_array($format)) {
            // sounds like the format is already done, let's keep it as it is
            return $format;
        }
        if (array_key_exists($format, $this->formats)) {
            // it's a format defined in config, let's use all defined parameters
            return $this->formats[$format];
        } elseif (preg_match("/^([0-9]*)x([0-9]*)/", $format)) {
            // it's a custom [width]x[height] format, let's make a thumb
            return array('thumbnail' => $format);
        } else {
            throw new InvalidArgumentException(sprintf("Unknown IM format: %s", $format));
        }
    }
private function convertFormat ( $ format ) { if ( is_array ( $ format ) ) { // sounds like the format is already done, let's keep it as it is return $ format ; } if ( array_key_exists ( $ format , $ this -> formats ) ) { // it's a format defined in config, let's use all defined parameters return $ this -> formats [ $ format ] ; } elseif ( preg_match ( "/^([0-9]*)x([0-9]*)/" , $ format ) ) { // it's a custom [width]x[height] format, let's make a thumb return array ( 'thumbnail' => $ format ) ; } else { throw new InvalidArgumentException ( sprintf ( "Unknown IM format: %s" , $ format ) ) ; } }
Returns the attributes for converting the image regarding a specific format

@param string $format

@return array
@throws InvalidArgumentException
Returns the attributes for converting the image regarding a specific format