Expand description
Images: the codecs (decode_image for PNG, JPEG and WebP, and
encode_png), which fail with an error that carries a message.
decoder::decode is how the map’s code decodes images: with
decode_image natively, and with the browser’s decoders on wasm.
The style’s images, as the renderer’s layouts request them, are in
image_store, and the sprite parser in sprite.
Modules§
- sprite
- Sprites: the sprite parser, whose
load_spriteandparse_spritetake and return owned values, as a job does. The map’s style loader fetches a sprite’s index and image and runsload_spriteon its thread pool.
Structs§
Enums§
- Image
Type - What a layout uses an image as.
Functions§
- decode_
image - Decodes
data, choosing the format by its magic bytes. Data of no type it recognizes fails withErrorKind::Unsupported, and an image that doesn’t decode withErrorKind::InvalidArgument. - decode_
png - encode_
png