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.

MarkOptions

Defined in: index.ts:1068

Options for marking text and image watermarks with a single call.

await Marker.mark({
backgroundImage: {
src: require('./images/bg.png'),
},
watermarks: [
{
type: 'text',
text: 'hello world',
position: {
position: Position.bottomCenter,
Y: 24,
},
style: {
color: '#FFFFFF',
fontSize: 32,
},
},
{
type: 'image',
src: require('./images/logo.png'),
position: {
position: Position.topRight,
X: 24,
Y: 24,
},
scale: 0.5,
},
],
saveFormat: ImageFormat.png,
});

backgroundImage: ImageOptions

Defined in: index.ts:1072

Background image options.


optional filename?: string

Defined in: index.ts:1103

save image name


optional matteColor?: string

Defined in: index.ts:1113

Matte color used when an output with transparency is encoded as JPEG.

#FFFFFF


optional maxSize?: number

Defined in: index.ts:1125

Maximum width or height used while decoding or rendering source images. Larger images keep their aspect ratio on iOS, Android, and Web.

2048

optional quality?: number

Defined in: index.ts:1099

Integer image quality from 0 to 100, where 100 is best.

100

optional rotationCanvasMode?: RotationCanvasMode

Defined in: index.ts:1119

Controls whether background rotation expands the output canvas or crops back to the original canvas dimensions.

RotationCanvasMode.expand

optional saveFormat?: ImageFormat

Defined in: index.ts:1108

save image format

jpg


optional watermarkImage?: WatermarkImageOptions

Defined in: index.ts:1085


optional watermarkImages?: WatermarkImageOptions[]

Defined in: index.ts:1094

Image watermark options. Kept for compatibility; use watermarks instead for ordered mixed layers.


optional watermarkPositions?: PositionOptions

Defined in: index.ts:1090


optional watermarks?: WatermarkLayer[]

Defined in: index.ts:1076

Ordered watermark layers. Layers are rendered in array order, so later layers draw over earlier layers.


optional watermarkTexts?: TextOptions[]

Defined in: index.ts:1080

Text watermark options. Kept for compatibility; use watermarks instead for ordered mixed layers.