Skip to content

Null bytes in binary data #199

Closed
Closed
@eliashoo

Description

@eliashoo

Hi,

I'm generating Aztec symbol with following code:

const { writeFileSync } = require("fs")
const { toBuffer } = require("bwip-js")

const code = Buffer.from("924635a200029246", "hex")

void toBuffer({
	bcid: "azteccode",
	text: code.toString("latin1"),
	backgroundcolor: "ffffff"
}).then(img => {
	writeFileSync("out.png", img)
})

When decoding the generated symbol with https://demo.dynamsoft.com/barcode-reader, i noticed that bytes after 00 have changed to 00 bytes. The same symbol generated with zint is read correctly with above reader.

Should it be possible to encode null bytes with bwip-js?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions