Image Format and Safety

Choose a PNG or ZIP input and understand the format, resource limits, and integrity checks for Lispex Images.

Choose the input file

The image guide creates refund-window.lspx.png from an 89-byte source. Inspection reports page_count: 1, and decoding restores the source.

ImageFile to supply to inspection, decoding, or execution
One pageThe original .lspx.png file
Two to 32 pagesThe complete .lspx-images.zip file

A two-page ZIP contains page-01of02.lspx.png followed by page-02of02.lspx.png. Keep both pages in the original ZIP. The decoder checks the whole set, including its page order. The encoder determines page count from both source size and source structure.

What the format fixes

The format specifies one exact byte representation for an image. This is what canonical means in the inspection result. Matching the visible picture alone is not enough.

PartFixed representation
Image formatcsk.lispex-image/v2
Inspection JSONcsk.lispex-image-inspection/v1
Image profile, which defines the drawing rulescsk.lispex-image-profile/v2
Codebook, which maps source elements to visual symbolscsk.lispex-image-codebook/v2
Page layoutWidth of 1304 pixels, Sunlit Amber palette, and prescribed positions for the image data
PNG compressionFixed-Huffman encoding, which uses a fixed compression code table
ZIP structureUncompressed ZIP entries with prescribed page names, order, and directory bytes

Use the encoder's original output for transfer. Screenshots, resizing, color conversion, added metadata, recompression, missing pages, and reordered pages are rejected. OCR and camera recognition are outside the decoder's input path.

Input limits

The reader is the part that turns source text into structured elements. Its nodes represent those elements; depth measures their nesting.

Input or structureMaximum
Source1 MiB, or 1,048,576 bytes
Reader nodes16,384
Nesting depth256
Image pages32

The decoder validates lengths and offsets before allocating memory. These limits apply together. Staying below the source byte limit alone is not enough.

How the source is checked

Decoding checks the file structure, integrity hashes, source structure, and Reed–Solomon parity. Parity is extra data used to detect damaged encoded content. The decoder then rebuilds the image and compares it with the complete supplied PNG or ZIP.

The two format rules are:

decode(encode(source)) = source
encode(decode(image)) = image

The first rule preserves every source byte, including comments and line endings. The second accepts an image only when rebuilding it produces the same file bytes. image inspect performs the same full checks before reporting identifiers and hashes. image decode writes the restored source after the checks succeed.

Keep integrity, signatures, and access separate

Product or operationWhat it does
Lispex ImageCarries readable source bytes in a PNG or complete page set
image inspectReports format, profile, page count, source identity, and integrity hashes
image decodeRestores the source after all image checks
Lispex VouchConnects the restored source identity to producer authentication, request binding, re-execution, and a local acceptance decision
Application sharing the imageControls display size, distribution privacy, and access to the file

Keep the original file for decoding when an application resizes its displayed preview. For signatures and recipient trust policy, continue with the Lispex Vouch overview.