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