Skip to main content

Module images

Module images 

Source
Expand description

Bounded portable image decoding, with optional isolated region/native decoding. Byte decoding does not access files, fonts, networking or OS codec services.

Modules§

worker
Blocking image worker client. Applications own queues, snapshots and caches.

Structs§

Frame
Info
Limits
Limits for in-process PNG/JPEG thumbnails. For large files or hard deadlines, use the image worker instead. Larger configured values cannot exceed the hard ceilings: 32 MiB encoded, 16 megapixels, 128 MiB decoded and 4 megapixels output.
Pixels
Region
A rectangle in the scaled image, measured in physical output pixels.

Enums§

Error
Format

Constants§

CANCELLED
MAX_BATCH_PIXELS
MAX_FILE_BYTES
MAX_REGIONS
MAX_SOURCE_PIXELS
OVERVIEW_EDGE
SCALE_UNIT
TILE_EDGE

Functions§

decode
Decode a fitted, orientation-corrected still image to straight RGBA. No upscaling. Run off the UI thread. Cancellation is checked around codec calls, not inside them; allocation and source limits are enforced before full decoding.
frame_delay
Match browser behavior for absent/very short delays; never busy-loop a zero-delay GIF.
validate_regions