Skip to main content

mln_engine/image/
mod.rs

1//! Images: the codecs (`decode_image` for PNG, JPEG and WebP, and
2//! `encode_png`), which fail with an error that carries a message.
3//!
4//! `decoder::decode` is how the map's code decodes images: with
5//! `decode_image` natively, and with the browser's decoders on wasm.
6//!
7//! The style's images, as the renderer's layouts request them, are in
8//! `image_store`, and the sprite parser in [`sprite`].
9
10#[cfg(target_family = "wasm")]
11mod browser_decoder;
12pub(crate) mod decoder;
13#[expect(clippy::module_inception, reason = "`image::image` holds `decode_image`")]
14mod image;
15pub(crate) mod image_store;
16#[cfg(not(target_family = "wasm"))]
17mod jpeg_reader;
18mod png_reader;
19pub(crate) mod png_writer;
20pub(crate) mod premultiply;
21pub mod sprite;
22mod webp_reader;
23
24pub use image::decode_image;
25pub use image_store::{ImageStore, ImageType};
26pub use png_reader::decode_png;
27pub use png_writer::encode_png;