libvips-rust-bindings

Rust bindings for libvips. Generated from version 8.17.0.
This is a safe wrapper for libvips C library. It is made on top of the C API and based on the introspection API results.
This crate itself is not documented, but it has no logic or special behavior in comparison to libvips itself. All calls and types described in the official libvips docs are just translated to rust types. All defaults also respected.
About this crate
This is a fork of libvips-rust-bindings.
This crate is different from it in that
VipsImageimplements vips operations- this uses
VOptionfor optional arguments of some vips operations instead of structs to prevent unnecessary default values - this supports operator overloads
- this supports some operations to VipsImage like
get_int()andset_int().
How to use it
Vips needs to be initialized. You have to call Vips::init() at least once before any operations.
Shutdown is optional. You can shut down by Vips::shutdown(). Once Vips is shut down, all operations including Vips::init() are no longer available.
Many vips operations have optional arguments. The ones that have have been implemented with too variants by this crate. Basically there'll be a regular call with only the required parameters and an additional with the suffix with_opts which takes VOption containing optional arguments.
let option = new.set.set;
The error messages in the libvips error buffer are appended to the errors themselves.
Most (if not all) vips operations don't mutate the VipsImage object, so they'll return a new object for this. The implementation of VipsImage in this crate takes care of freeing the internal pointer after it is dropped. Be aware that the VipsImage object is not thread safe in the moment..
Example
use ;
Platform-specific notes
Windows
Download dll (libvips-42.dll) and lib (libvips.lib) files from libvips releases (e.g., vips-dev-w64-web-8.17.0-static.zip).
Place them in a folder and add the folder path to the library search path in your build script.