Expand description
§A Rust library for generating and manipulating QR code images in various formats
§Overview
The QR Code Library (QRC) is a versatile tool for generating and manipulating QR code images in various formats.
With this library, you can easily convert your data into a QR code, whether it be in the form of a string or a vector of bytes.
Choose from popular image formats like PNG, JPG, GIF and SVG, and even customize the size and color of your QR code.
§Features
QRC features a QRCode struct that can be constructed with a
Vec<u8> of data or a String of data that will be converted to
a Vec<u8>.
The QR code can be generated using the to_qrcode method, and
specific image formats can be generated using the to_png,
to_jpg, and to_gif methods.
Each of these methods takes a width parameter and returns an
ImageBuffer containing the QR code image.
The library uses the qrcode and image crates to generate the QR
code images.
As of the current version, the library supports the following features with the following status:
| Feature | Description |
|---|---|
| Library license | Apache-2.0 OR MIT |
| Library version | 0.0.6 |
| Mode Numeric | not specified |
| Mode Alphanumeric | not specified |
| Mode Byte | not specified |
| Mode Kanji | not specified |
| Mode ECI | not specified |
| Mode FNC1 | not specified |
| Mode Structured Append | not specified |
| Mode Hanzi | not specified |
| Mixing modes | not specified |
| QR Codes version 1 - 40 | not specified |
| Micro QR Codes version M1 - M4 | not specified |
| Find maximal error correction level | not specified |
| Optimize QR Codes | not specified |
| PNG output | supported |
| JPG output | supported |
| GIF output | supported |
| SVG output | supported |
| EPS output | not specified |
| PDF output | not specified |
| BMP output | not specified |
| TIFF output | not specified |
| WebP output | not specified |
| Black and white QR Codes | Yes |
| Colorized QR code | Yes |
| Animated QR Codes (GIF, APNG, WebP) | not specified |
| Changing size of modules (scaling factor) | not specified |
| Command line script | not specified |
| QR code resizing | supported |
| QR code watermarking | supported |
| QR code with logo | supported |
Modules§
- macros
- The
macrosmodule contains functions for generating macros. - payload
- Structured payload builders (vCard, Wi-Fi, MeCard, EMVCo) that turn typed data into the text conventions QR scanners recognise. Structured payload builders.
- wasm
- WASM bindings for the QRC library. WASM bindings for the QRC library.
Macros§
- add_
image_ watermark - Macro to add a watermark image to a QR code.
- batch_
generate_ qr - Generates multiple QR codes in one operation.
- combine_
qr_ codes - Combines multiple QR codes into a single QR code.
- compress_
data_ macro - Compresses data before encoding it into a QR code.
- create_
dynamic_ qr - Generates a dynamic QR code, which can be updated after creation.
- create_
multilanguage_ qr - Generates QR codes with multi-language support.
- overlay_
image - Overlays an image (e.g., a logo) at the center of the QR code.
- qr_code
- Macro to create a new QR code from the given data.
- qr_
code_ to - Macro to create a QR code in a specified format with a given width.
- qr_
code_ with_ ec - Macro to create a QR code with a specific error correction level.
- resize
- Sets the size of the QR code.
- set_
encoding_ format - Sets the encoding format for the data in a QR code.
Structs§
- Blend
Options - Tuning for
QRCode::blend_image. - QRCode
- Represents a QR code containing data.
Enums§
- EcLevel
- The error correction level. It allows the original information be recovered even if parts of the code is damaged.
- Module
Shape - Shape used to render each QR code module.
- QrError
QrErrorencodes the error encountered when generating a QR code.
