@mbtech-nl/bitmap / iterRows
Function: iterRows()
ts
function iterRows(bitmap: LabelBitmap): Generator<Uint8Array>;Defined in: encode.ts:44
Iterate packed rows of a bitmap top-to-bottom.
Yields zero-copy Uint8Array views over the bitmap's underlying buffer (subarrays, not copies). Mutating a yielded row mutates the bitmap. Use for streaming a bitmap to a printer or encoder line-by-line without allocating per row.
Parameters
| Parameter | Type | Description |
|---|---|---|
bitmap | LabelBitmap | Source bitmap. |
Returns
Generator<Uint8Array>
Example
ts
for (const row of iterRows(bitmap)) {
await transport.write(row);
}