Skip to main content

Crate letratag_render

Crate letratag_render 

Source
Expand description

Deterministic image rendering. The canvas is feed columns by 32 head rows.

Active rows are a design choice, not a physical printhead calibration. Images keep their aspect ratio (rounded down to whole pixels, with a one-pixel minimum), including any existing white margins, and are centered on the full canvas. An odd spare pixel goes on the right or bottom. Scaling uses nearest neighbors sampled at pixel centers. No text, font, or PDF rendering is done.

Structs§

RenderOptions

Enums§

Error

Constants§

MAX_DECODE_BYTES
MAX_PNG_BYTES
MAX_SOURCE_DIMENSION
MAX_SOURCE_PIXELS

Functions§

preview_png
Encode the actual full-height raster, without rescaling or trimming.
render_gray
Render row-major 8-bit grayscale: zero is black and 255 is white.
render_png
Decode only PNG. Header dimensions are checked before decoder construction; Limits bounds its buffers and decoded storage is checked before allocation. Alpha is composited on white before integer Rec. 709 luminance conversion. For APNG, only the default PNG image is rendered, not animation frames.