1.2K
Rust bindings to libvips, built for picturium.
picturium.cc · picturium · GitHub Repository · libvips API docs
Safe(r) Rust wrappers over raw bindgen-generated libvips FFI. It covers the operations picturium actually needs — loading, resizing, cropping, filters, color, animation, text, and multi-format saving — not the whole libvips surface.
This is not a general-purpose libvips crate. Coverage is driven by picturium's requirements, API shape may change without notice, and anything not listed below just isn't wrapped yet.
Current libvips version: 8.18.6
8.18.6 (headers + shared library) available to the linkersrc/bindings.rs is checked into the repo, so a normal build links against libvips without needing bindgen/libclang; delete it and run cargo build to regenerate against a different libvips installThe picturium Docker images already ship a matching libvips build — see docker/build.yml for the base image this crate builds against.
use picturium_libvips::*;
fn main() -> Result<()> {
let vips = Vips::new("app")?;
vips.cache(Cache::disabled()).concurrency(4);
let image = VipsImage::new_from_file("input.jpg", None)?
.autorotate()?
.thumbnail_image(800, None)?;
image.save_webp("output.webp", None)?;
Ok(())
}
cargo test
Tests exercise the bindings against a real libvips install, so they need the same runtime requirements as above. docker/build.yml builds an image with the full toolchain (Rust, clang, GLib headers) for regenerating bindings or running tests in a clean environment.
Most of the core library code is human-written with minor AI assistance. Documentation and testing handled primarily by AI.
Content type
Image
Digest
sha256:4dc32c45c…
Size
855.5 MB
Last updated
14 days ago
docker pull lamka02sk/picturium-libvips