library/barcode
v0.1.0 SignedDecode barcodes (QR, Aztec, PDF417, DataMatrix, EAN/UPC) and generate QR codes as PNG
Install
act pull actpkg.dev/library/barcode Capabilities
Moderate host access
Requests: Filesystem read-only.
- wasi:filesystem Filesystem read-only
** (ro)
Tools · 2
act:tools interface — expand a tool for its input schema.
decode Decode every barcode in an image. Recognizes QR, Aztec, PDF417, DataMatrix and the 1D families (EAN-8/13, UPC-A/E, Code 39/93/128, ITF, Codabar). Supply exactly one of `data` or `path`. An optional `crop` region ([[x1,y1],[x2,y2]] pixel bounds) decodes just that part of the image, upscaling it first if it is small — useful for a small code in a large photo. Retail 1D results also carry a normalized 14-digit `gtin` and `check_digit_valid`.
Decode every barcode in an image. Recognizes QR, Aztec, PDF417, DataMatrix and the 1D families (EAN-8/13, UPC-A/E, Code 39/93/128, ITF, Codabar). Supply exactly one of `data` or `path`. An optional `crop` region ([[x1,y1],[x2,y2]] pixel bounds) decodes just that part of the image, upscaling it first if it is small — useful for a small code in a large photo. Retail 1D results also carry a normalized 14-digit `gtin` and `check_digit_valid`.
Parameter Type Description crop array | null Region to decode, as `[[x1, y1], [x2, y2]]` pixel coordinates (top-left and bottom-right corners) in the source image. Optional; omitting it decodes the whole image, exactly as before. A vision-capable agent that can see roughly where a code sits in a photo can pass its bounds here instead of sending the whole frame — useful when a small code in a large photo fails to decode at full resolution (see SKILL.md). data object | null Inline image bytes, as a CBOR byte string — or the canonical `{"$bytes": "<base64>"}` envelope over JSON transports. path string | null Path to an image file on the host. Requires a `wasi:filesystem` read grant covering this path. Returns content.
generate_qr Generate a QR code from text and return it as a PNG image. The QR version is chosen automatically to fit the payload.
Generate a QR code from text and return it as a PNG image. The QR version is chosen automatically to fit the payload.
Parameter Type Description ecc variant Error-correction level: l, m (default), q, h dark string | null Foreground color as #rrggbb (default #000000) text* string Text to encode light string | null Background color as #rrggbb (default #ffffff) scale integer | null Module size in pixels (default 8, clamped to 1..=64) quiet_zone boolean | null Include the surrounding quiet zone (default true; scanners need it) Returns content.
Readme
No README provided.