libvips Common API
Latest stable Based on Image release 0.3.0
bluetape4k-images-vips-api separates image-processing contracts from the Java 21 JVips and Java 25 FFM bindings. Compile application code against VipsImage and VipsRuntime, then select one implementation at runtime.
Core contracts
Section titled “Core contracts”VipsRuntime initializes the native library and loads images. VipsImage exposes dimensions, resize, thumbnail, crop, encode, and close. Format and writer option types keep binding classes out of the public application boundary. Okio support writes encoded output to sinks.
Every image is closeable. Operations that return a VipsImage transfer ownership of a new native object to the caller. See native resource lifecycle.
Binding-neutral application design
Section titled “Binding-neutral application design”Keep backend selection in composition code:
- business code accepts the common runtime or a smaller application adapter;
- startup initializes exactly one backend;
- processing code closes source and derived images;
- shutdown runs after requests and workers stop.
Do not expose JVips or FFM binding types from public services unless the application intentionally depends on one backend.
Security boundary
Section titled “Security boundary”Validate path roots, encoded input size, output options, and allowed formats before calling the native implementation. Native code does not remove the need for application limits. Error messages returned to clients should not expose filesystem paths or native loader details.