src/ImboClient/Http/ImageUrl.php
public function smartSize($width, $height, $crop = null, $poi = null) {
        if (!$width || !$height) {
            throw new InvalidArgumentException('width and height must be specified');
        }

        $params = array(
            'width=' . (int) $width,
            'height=' . (int) $height,
        );

        if ($crop) {
            $params[] = 'crop=' . $crop;
        }

        if ($poi) {
            $params[] = 'poi=' . $poi;
        }

        return $this->addTransformation(sprintf('smartSize:%s', implode(',', $params)));
    }
public function smartSize($width, $height, $crop = null, $poi = null) {
        if (!$width || !$height) {
            throw new InvalidArgumentException('width and height must be specified');
        }

        $params = array(
            'width=' . (int) $width,
            'height=' . (int) $height,
        );

        if ($crop) {
            $params[] = 'crop=' . $crop;
        }

        if ($poi) {
            $params[] = 'poi=' . $poi;
        }

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

@param int $width Width of the resized image
@param int $height Height of the resized image
@param string $crop Closeness of crop (`close`, `medium` or `wide`). Optional.
@param string $poi POI-coordinate to crop around (as `x,y`).
Optional if POI-metadata exists for the image.
@return self
Add a smartSize transformation