src/ImboClient/Http/ImageUrl.php
public function maxSize($maxWidth = null, $maxHeight = null) {
        $params = array();

        if ($maxWidth) {
            $params[] = 'width=' . (int) $maxWidth;
        }

        if ($maxHeight) {
            $params[] = 'height=' . (int) $maxHeight;
        }

        if (!$params) {
            throw new InvalidArgumentException('width and/or height must be specified');
        }

        return $this->addTransformation(sprintf('maxSize:%s', implode(',', $params)));
    }
public function maxSize($maxWidth = null, $maxHeight = null) {
        $params = array();

        if ($maxWidth) {
            $params[] = 'width=' . (int) $maxWidth;
        }

        if ($maxHeight) {
            $params[] = 'height=' . (int) $maxHeight;
        }

        if (!$params) {
            throw new InvalidArgumentException('width and/or height must be specified');
        }

        return $this->addTransformation(sprintf('maxSize:%s', implode(',', $params)));
    }
public function maxSize ( $ maxWidth = null , $ maxHeight = null ) { $ params = array ( ) ; if ( $ maxWidth ) { $ params [ ] = 'width=' . ( int ) $ maxWidth ; } if ( $ maxHeight ) { $ params [ ] = 'height=' . ( int ) $ maxHeight ; } if ( ! $ params ) { throw new InvalidArgumentException ( 'width and/or height must be specified' ) ; } return $ this -> addTransformation ( sprintf ( 'maxSize:%s' , implode ( ',' , $ params ) ) ) ; }
Add a maxSize transformation

@param int $maxWidth Max width of the resized image
@param int $maxHeight Max height of the resized image
@return self
@throws InvalidArgumentException
Add a maxSize transformation