lib/url/imageurl.js
function(options) {
        options = options || {};

        var params = [
            'position=' + (options.position || 'top-left'),
            'x=' + toInt(options.x || 0),
            'y=' + toInt(options.y || 0)
        ];

        if (options.imageIdentifier) {
            params.push('img=' + options.imageIdentifier);
        }

        if (options.width > 0) {
            params.push('width=' + toInt(options.width));
        }

        if (options.height > 0) {
            params.push('height=' + toInt(options.height));
        }

        return this.append('watermark:' + params.join(','));
    }
function(options) {
        options = options || {};

        var params = [
            'position=' + (options.position || 'top-left'),
            'x=' + toInt(options.x || 0),
            'y=' + toInt(options.y || 0)
        ];

        if (options.imageIdentifier) {
            params.push('img=' + options.imageIdentifier);
        }

        if (options.width > 0) {
            params.push('width=' + toInt(options.width));
        }

        if (options.height > 0) {
            params.push('height=' + toInt(options.height));
        }

        return this.append('watermark:' + params.join(','));
    }
function ( options ) { options = options || { } ; var params = [ 'position=' + ( options . position || 'top-left' ) , 'x=' + toInt ( options . x || 0 ) , 'y=' + toInt ( options . y || 0 ) ] ; if ( options . imageIdentifier ) { params . push ( 'img=' + options . imageIdentifier ) ; } if ( options . width > 0 ) { params . push ( 'width=' + toInt ( options . width ) ) ; } if ( options . height > 0 ) { params . push ( 'height=' + toInt ( options . height ) ) ; } return this . append ( 'watermark:' + params . join ( ',' ) ) ; }
Applies a watermark on top of the original image

@param  {Object} [options]
@param  {Number} [options.img] Image identifier of the image to apply as watermark
@param  {Number} [options.width]  Width of the watermark, in pixels
@param  {Number} [options.height] Height of the watermark, in pixels
@param  {String} [options.position=top-left] Position of the watermark. Values:
"top-left", "top-right", "bottom-left", "bottom-right" and "center"
@param  {Number} [options.x] Number of pixels in the X-axis the watermark image
should be offset from the original position
@param  {Number} [options.y] Number of pixels in the Y-axis the watermark image
should be offset from the original position
@return {Imbo.ImageUrl}
Applies a watermark on top of the original image