Skip to content
Menu
Auto
English
v1 is in long-term maintenance and continues to receive compatibility, security, and critical bug fixes. See the v2.

WatermarkImageOptions

Defined in: index.ts:851

Options for one image watermark layer.

src: require('./images/logo.png'),
scale: 0.5,
rotate: 45,
alpha: 0.5
position: {
X: 10,
Y: 10,
// or
// position: Position.center
}

optional alpha?: number

Defined in: index.ts:834

Image opacity from 0 (transparent) to 1 (opaque).

1
alpha: 0.5

ImageOptions.alpha


optional blendMode?: BlendMode

Defined in: index.ts:857

How this watermark image is composited with the pixels already on the canvas. Background images intentionally do not expose this option.

'normal'

optional layout?: WatermarkLayout

Defined in: index.ts:864

Render this watermark once or repeat it across the image. Tiled layouts cannot be combined with position.

{ type: 'single' }


optional position?: PositionOptions

Defined in: index.ts:858


optional rotate?: number

Defined in: index.ts:827

rotate image rotate 0-360

0
rotate: 45

ImageOptions.rotate


optional scale?: number

Defined in: index.ts:820

image scale >0

1
scale: 1

ImageOptions.scale


src: any

Defined in: index.ts:813

Image source. Supports React Native image sources and base64 data URLs.

src: require('./images/logo.png')

ImageOptions.src


optional trimTransparentPadding?: boolean

Defined in: index.ts:870

Remove fully transparent outer rows and columns before scaling, rotating, and positioning the watermark.

false