ImageMarkOptions
此内容尚不支持你的语言。
Defined in: src/index.ts:1001
Options for rendering image-only watermark layers.
Example
Section titled “Example”backgroundImage: { src: require('./images/bg.png'), scale: 0.5, rotate: 45, alpha: 0.5 }, watermarkImages: [ { src: require('./images/logo.png'), scale: 0.5, rotate: 45, alpha: 0.5, position: { X: 10, Y: 10, }, }, { src: require('./images/logo1.png'), scale: 0.5, rotate: 45, alpha: 0.5, position: { position: Position.center, }, }, ], quality: 100, filename: 'test', saveFormat: ImageFormat.jpg,Properties
Section titled “Properties”backgroundImage
Section titled “backgroundImage”backgroundImage:
ImageOptions
Defined in: src/index.ts:1012
background image options
Example
Section titled “Example”backgroundImage: { src: require('./images/bg.png'), scale: 0.5, rotate: 45, alpha: 0.5 }filename?
Section titled “filename?”
optionalfilename?:string
Defined in: src/index.ts:1025
save image name
Example
Section titled “Example”filename: 'test'matteColor?
Section titled “matteColor?”
optionalmatteColor?:string
Defined in: src/index.ts:1037
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: src/index.ts:1051
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”2048Example
Section titled “Example”maxSize: 2048quality?
Section titled “quality?”
optionalquality?:number
Defined in: src/index.ts:1019
Integer image quality from 0 to 100, where 100 is best.
Default Value
Section titled “Default Value”100Example
Section titled “Example”quality: 100rotationCanvasMode?
Section titled “rotationCanvasMode?”
optionalrotationCanvasMode?:RotationCanvasMode
Defined in: src/index.ts:1043
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: src/index.ts:1032
save image format
Default Value
Section titled “Default Value”jpg
Example
Section titled “Example”saveFormat: ImageFormat.jpgwatermarkImages?
Section titled “watermarkImages?”
optionalwatermarkImages?:WatermarkImageOptions[]
Defined in: src/index.ts:1069
watermark images
Example
Section titled “Example”watermarkImages: [{ src: require('./images/logo.png'), scale: 0.5, rotate: 45, alpha: 0.5, position: { X: 10, Y: 10, // or position: Position.center }}]