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)));
    }