Symbology, sizing, colours and caption; see DrawBarcodeOptions for defaults.
Returns Uint8Array
The PNG file bytes.
Throws
If moduleSize is not a positive safe integer, quietZone is not a non-negative safe integer, fitWidth or fitHeight is not a positive finite number, or pdf417EcLevel or pdf417Columns is not a finite number, or a foreground or background channel is not an integer 0-255.
Throws
If type is unknown, or the encoder rejects value (see the encode* functions).
Encodes
valueand renders it as a PNG, as configured byoptions(size, colours, text, fit).