MarkOptions
Defined in: index.ts:1068
Options for marking text and image watermarks with a single call.
Example
Section titled “Example”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,});Properties
Section titled “Properties”backgroundImage
Section titled “backgroundImage”backgroundImage:
ImageOptions
Defined in: index.ts:1072
Background image options.
filename?
Section titled “filename?”
optionalfilename?:string
Defined in: index.ts:1103
save image name
matteColor?
Section titled “matteColor?”
optionalmatteColor?:string
Defined in: index.ts:1113
Matte color used when an output with transparency is encoded as JPEG.
Default Value
Section titled “Default Value”#FFFFFF
maxSize?
Section titled “maxSize?”
optionalmaxSize?: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.
Default Value
Section titled “Default Value”2048quality?
Section titled “quality?”
optionalquality?:number
Defined in: index.ts:1099
Integer image quality from 0 to 100, where 100 is best.
Default Value
Section titled “Default Value”100rotationCanvasMode?
Section titled “rotationCanvasMode?”
optionalrotationCanvasMode?:RotationCanvasMode
Defined in: index.ts:1119
Controls whether background rotation expands the output canvas or crops back to the original canvas dimensions.
Default Value
Section titled “Default Value”RotationCanvasMode.expandsaveFormat?
Section titled “saveFormat?”
optionalsaveFormat?:ImageFormat
Defined in: index.ts:1108
save image format
Default Value
Section titled “Default Value”jpg
watermarkImage?
Section titled “watermarkImage?”
optionalwatermarkImage?:WatermarkImageOptions
Defined in: index.ts:1085
watermarkImages?
Section titled “watermarkImages?”
optionalwatermarkImages?:WatermarkImageOptions[]
Defined in: index.ts:1094
Image watermark options. Kept for compatibility; use watermarks instead for ordered mixed layers.
watermarkPositions?
Section titled “watermarkPositions?”
optionalwatermarkPositions?:PositionOptions
Defined in: index.ts:1090
watermarks?
Section titled “watermarks?”
optionalwatermarks?:WatermarkLayer[]
Defined in: index.ts:1076
Ordered watermark layers. Layers are rendered in array order, so later layers draw over earlier layers.
watermarkTexts?
Section titled “watermarkTexts?”
optionalwatermarkTexts?:TextOptions[]
Defined in: index.ts:1080
Text watermark options. Kept for compatibility; use watermarks instead for ordered mixed layers.