zune_farbfeld/
lib.rs

1/*
2 * Copyright (c) 2023.
3 *
4 * This software is free software;
5 *
6 * You can redistribute it or modify it under terms of the MIT, Apache License or Zlib license
7 */
8
9//! farbfeld is a lossless image format which is easy to parse, pipe and compress. It has the following format:
10//! ```text
11//! ╔════════╤═════════════════════════════════════════════════════════╗
12//! ║ Bytes  │ Description                                             ║
13//! ╠════════╪═════════════════════════════════════════════════════════╣
14//! ║ 8      │ "farbfeld" magic value                                  ║
15//! ╟────────┼─────────────────────────────────────────────────────────╢
16//! ║ 4      │ 32-Bit BE unsigned integer (width)                      ║
17//! ╟────────┼─────────────────────────────────────────────────────────╢
18//! ║ 4      │ 32-Bit BE unsigned integer (height)                     ║
19//! ╟────────┼─────────────────────────────────────────────────────────╢
20//! ║ [2222] │ 4x16-Bit BE unsigned integers [RGBA] / pixel, row-major ║
21//! ╚════════╧═════════════════════════════════════════════════════════╝
22//! The RGB-data should be sRGB for best interoperability and not alpha-premultiplied.
23//!```
24//!
25//!
26#![no_std]
27#![macro_use]
28extern crate alloc;
29
30pub use decoder::*;
31pub use encoder::*;
32
33mod decoder;
34mod encoder;