Skip to content

API reference / Common / WatermarkImage

Interface: WatermarkImage ​

A raster image, already decoded. Its box is width / scale by height / scale points.

Properties ​

PropertyDescription
pixels
| Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>
The samples: four bytes a pixel in R, G, B, A order, alpha not premultiplied, as a canvas's getImageData gives them, top row first, with nothing between rows. width * height * 4 bytes.
width
number
How many pixels wide pixels is.
height
number
How many pixels tall pixels is.
scale
number
Pixels per point: 1 draws a pixel a point across, 2 draws a logo made for a high-density screen at half its pixel size. Greater than zero.