actpkg.dev
Components

library/barcode

v0.1.0 Signed

Decode barcodes (QR, Aztec, PDF417, DataMatrix, EAN/UPC) and generate QR codes as PNG

by @library updated 2026-09-17 2.9 MB 8

Install

$ act pull actpkg.dev/library/barcode

Capabilities

Moderate host access

Requests: Filesystem read-only.

  • wasi:filesystem Filesystem read-only

    ** (ro)

Risk Low Medium High

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`.

    ParameterTypeDescription
    croparray | nullRegion 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).
    dataobject | nullInline image bytes, as a CBOR byte string — or the canonical `{"$bytes": "<base64>"}` envelope over JSON transports.
    pathstring | nullPath 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.

    ParameterTypeDescription
    eccvariantError-correction level: l, m (default), q, h
    darkstring | nullForeground color as #rrggbb (default #000000)
    text*stringText to encode
    lightstring | nullBackground color as #rrggbb (default #ffffff)
    scaleinteger | nullModule size in pixels (default 8, clamped to 1..=64)
    quiet_zoneboolean | nullInclude the surrounding quiet zone (default true; scanners need it)

    Returns content.

Readme

No README provided.