Skip to main content

Crate qrcode_render

Crate qrcode_render 

Source
Expand description

Rendering pipeline for converting QR codes into visual output.

This module provides the Pixel and Canvas traits that abstract over different output formats, and the Renderer builder that drives the conversion from QR code data to a final image.

§Supported formats

ModuleFeatureOutput type
imageimagePNG/JPEG via the image crate
svgsvgSVG XML string
epsepsEncapsulated PostScript
htmlhtmlHTML table or CSS Grid
picpicPIC (troff) macros
stringPlain text with custom characters
unicodeUnicode block-element rendering

§Custom rendering

Implement Pixel for your own type to render into a custom format. The Pixel trait defines how to create dark/light pixels and how to finalize a canvas into a concrete image.

Modules§

ansi
ANSI terminal color rendering.
colors
Common color types and conversions for rendering.
plugin
Built-in renderer plugins backed by qrcode-render.
string
String rendering support.
unicode
UTF-8 rendering, with various pixel densities.

Structs§

Renderer
A QR code renderer. This is a builder type which converts a bool-vector into an image.

Enums§

Color
The color of a module.
RenderError
Errors returned by fallible render construction or rendering.

Traits§

Canvas
Rendering canvas of a QR code image.
Pixel
Abstraction of an image pixel.
RenderTemplate
Styling data that can be applied to a Renderer with Renderer::template.
StyledPixel
A Pixel constructible from a CSS-style hex color string ("#rrggbb" or "#rgb"), used by Renderer::template to apply a QrTemplate.