#image-encoding #codec #image #jpeg #png #decoding #graphics

plumers

Multi-format image library with first-class support for paletted images

3 stable releases

1.0.2 Jun 20, 2024
1.0.1 Jun 19, 2024

#572 in Images

Download history 2/week @ 2024-06-24 17/week @ 2024-08-26 4/week @ 2024-09-09 48/week @ 2024-09-16 42/week @ 2024-09-23 23/week @ 2024-09-30 8/week @ 2024-10-07

121 downloads per month

MPL-2.0 license

585KB
10K SLoC

C 8K SLoC // 0.0% comments Rust 2K SLoC // 0.1% comments

plumers

Rust wrapper (plumers) and bindings (libplum-sys) for libplum, an image (de)coding library.

Please report any issues on the ticket tracker, and contribute code to the repo!

Comparison to image?

The good:

  • Small (few dependencies)
  • Upstream is fuzz-tested
  • Supports the full JPEG standard, “including fractional subsampling, which nobody does!”
  • Embedded colour palettes are a first-class feature

The bad:

  • Not pure Rust, so some tooling doesn't work. For example, Miri
  • Requires libclang to build
  • Only supports GIF, BMP, PNG, APNG, JPEG, and PNM; and not any of the more fringe formats

Maintenance

builds.sr.ht status

Updating libplum

To avoid the crate's build requiring Git, Make, and Bash (something something Windows), the entirety of libplum's “distributable” (libplum.c and libplum.h) is included under libplum-sys/src. To update it, run cargo xtask update_libplum; the version to which it is updated is what's specified the crate's version (the build metadata, to be precise).

Dependencies

~0–2MB
~41K SLoC