5 unstable releases

0.5.2 Jan 24, 2026
0.5.1 Jan 24, 2026
0.5.0-rc0 Apr 7, 2024
0.4.0 Nov 16, 2023
0.2.0 Apr 30, 2023

#1542 in Images

Download history 702/week @ 2025-10-28 1119/week @ 2025-11-04 594/week @ 2025-11-11 598/week @ 2025-11-18 554/week @ 2025-11-25 568/week @ 2025-12-02 422/week @ 2025-12-09 383/week @ 2025-12-16 400/week @ 2025-12-23 314/week @ 2025-12-30 477/week @ 2026-01-06 808/week @ 2026-01-13 699/week @ 2026-01-20 599/week @ 2026-01-27 916/week @ 2026-02-03 539/week @ 2026-02-10

2,865 downloads per month
Used in zune-image

MIT OR Apache-2.0 OR Zlib

115KB
2K SLoC

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.

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

Dependencies