@mbtech-nl/bitmap / createBitmap
Function: createBitmap()
ts
function createBitmap(widthPx: number, heightPx: number): LabelBitmap;Defined in: encode.ts:81
Allocate an empty (all-white) bitmap.
Parameters
| Parameter | Type | Description |
|---|---|---|
widthPx | number | Width in pixels (positive integer). |
heightPx | number | Height in pixels (positive integer). |
Returns
A bitmap with data zero-filled.
Throws
If either dimension is not a positive integer.
Example
ts
const blank = createBitmap(384, 64);