toPng

fun BitMatrix.toPng(scale: Int = 8, quietZone: Int = 4, dark: Int = 0, light: Int = 16777215): ByteArray

Renders a BitMatrix to PNG bytes via the dependency-free Png encoder.

Parameters

scale

pixels per module.

quietZone

margin around the code, in modules.

dark

0xRRGGBB colour for set modules.

light

0xRRGGBB background colour.