2 unstable releases

0.4.0 Nov 16, 2023
0.2.0 Apr 30, 2023

#790 in Images

Download history 1/week @ 2023-10-21 3/week @ 2023-11-04 35/week @ 2023-11-11 18/week @ 2023-11-18 18/week @ 2023-11-25 20/week @ 2023-12-02 19/week @ 2023-12-09 12/week @ 2023-12-16 10/week @ 2023-12-23 5/week @ 2023-12-30 8/week @ 2024-01-06 22/week @ 2024-01-13 7/week @ 2024-01-20 23/week @ 2024-01-27 13/week @ 2024-02-03

66 downloads per month
Used in zune-image

MIT OR Apache-2.0 OR Zlib

95KB
1.5K SLoC

Zune-farbfeld

Farbfeld decoding and encoding support

Usage

Add zune-farbfeld to your Cargo.toml

zune-farbfeld = "[LATEST]"

You can then use FarbfeldDecoder to decode images and FarbfeldEncoder to encode images

Endianness

Where endianness matters, the library either takes or uses native endian


lib.rs:

farbfeld is a lossless image format which is easy to parse, pipe and compress. It has the following format:

╔════════╤═════════════════════════════════════════════════════════╗
║ Bytes  │ Description                                             ║
╠════════╪═════════════════════════════════════════════════════════╣
║ 8      │ "farbfeld" magic value                                  ║
╟────────┼─────────────────────────────────────────────────────────╢
║ 4      │ 32-Bit BE unsigned integer (width)                      ║
╟────────┼─────────────────────────────────────────────────────────╢
║ 4      │ 32-Bit BE unsigned integer (height)                     ║
╟────────┼─────────────────────────────────────────────────────────╢
║ [2222] │ 4x16-Bit BE unsigned integers [RGBA] / pixel, row-major ║
╚════════╧═════════════════════════════════════════════════════════╝
The RGB-data should be sRGB for best interoperability and not alpha-premultiplied.

Dependencies