src/ImboClient/Http/ImageUrl.php
public function watermark($img = null, $width = null, $height = null, $position = 'top-left', $x = 0, $y = 0) {
        $params = array(
            'position=' . $position,
            'x=' . (int) $x,
            'y=' . (int) $y,
        );

        if ($img !== null) {
            $params[] = 'img=' . $img;
        }

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

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

        return $this->addTransformation(sprintf('watermark:%s', implode(',', $params)));
    }
public function watermark($img = null, $width = null, $height = null, $position = 'top-left', $x = 0, $y = 0) {
        $params = array(
            'position=' . $position,
            'x=' . (int) $x,
            'y=' . (int) $y,
        );

        if ($img !== null) {
            $params[] = 'img=' . $img;
        }

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

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

        return $this->addTransformation(sprintf('watermark:%s', implode(',', $params)));
    }
public function watermark ( $ img = null , $ width = null , $ height = null , $ position = 'top-left' , $ x = 0 , $ y = 0 ) { $ params = array ( 'position=' . $ position , 'x=' . ( int ) $ x , 'y=' . ( int ) $ y , ) ; if ( $ img !== null ) { $ params [ ] = 'img=' . $ img ; } if ( $ width !== null ) { $ params [ ] = 'width=' . ( int ) $ width ; } if ( $ height !== null ) { $ params [ ] = 'height=' . ( int ) $ height ; } return $ this -> addTransformation ( sprintf ( 'watermark:%s' , implode ( ',' , $ params ) ) ) ; }
Add a watermark transformation

@param string $img The identifier of the image to be used as a watermark. Can be omitted if
the server is configured with a default watermark.
@param int $width The width of the watermark
@param int $height The height of the watermark
@param string $position The position of the watermark on the original image, 'top-left',
'top-right', 'bottom-left', 'bottom-right' or 'center'. Defaults to
'top-left'.
@param int $x Offset in the X-axis relative to the $position parameter. Defaults to 0
@param int $y Offset in the Y-axis relative to the $position parameter. Defaults to 0
@return self
Add a watermark transformation