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

  • The macros module contains functions for generating macros.

Macros

Structs

  • Represents a QR code containing data.