Crate qrc

Crate qrc 

Source
Expand description

§A Rust library for generating and manipulating QR code images in various formats

Rust

Rust Crates.io Docs.rs Lib.rs GitHub License

§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 theto_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:

FeatureDescription
Library licenseApache-2.0 OR MIT
Library version0.0.1
Mode Numericnot specified
Mode Alphanumericnot specified
Mode Bytenot specified
Mode Kanjinot specified
Mode ECInot specified
Mode FNC1not specified
Mode Structured Appendnot specified
Mode Hanzinot specified
Mixing modesnot specified
QR Codes version 1 - 40not specified
Micro QR Codes version M1 - M4not specified
Find maximal error correction levelnot specified
Optimize QR Codesnot specified
PNG outputsupported
JPG outputsupported
GIF outputsupported
SVG outputsupported
EPS outputnot specified
PDF outputnot specified
BMP outputnot specified
TIFF outputnot specified
WebP outputnot specified
Black and white QR CodesYes
Colorized QR codeYes
Animated QR Codes (GIF, APNG, WebP)not specified
Changing size of modules (scaling factor)not specified
Command line scriptnot specified
QR code resizingsupported
QR code watermarkingsupported
QR code with logosupported

§Usage

  • serde: Enable serialization/deserialization via serde

Modules§

macros
The macros module contains functions for generating macros.

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.
resize
Sets the size of the QR code.
set_encoding_format
Sets the encoding format for the data in a QR code.

Structs§

QRCode
Represents a QR code containing data.