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 zto_qrcodemethod, 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.1 |
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 |
Usage
serde
: Enable serialization/deserialization via serde
Modules
- The
macros
module contains functions for generating macros.
Macros
- Macro to add a watermark image to a QR code.
- Generates multiple QR codes in one operation.
- Combines multiple QR codes into a single QR code.
- Compresses data before encoding it into a QR code.
- Generates a dynamic QR code, which can be updated after creation.
- Generates QR codes with multi-language support.
- Overlays an image (e.g., a logo) at the center of the QR code.
- Macro to create a new QR code from the given data.
- Macro to create a QR code in a specified format with a given width.
- Sets the size of the QR code.
- Sets the encoding format for the data in a QR code.
Structs
- Represents a QR code containing data.