libvips_ffi_core

Pure Dart FFI bindings for libvips image processing library. No Flutter dependency.

Features

  • Pure Dart implementation (no Flutter required)
  • Image loading/saving (JPEG, PNG, WebP, TIFF, etc.)
  • Image transformations (resize, rotate, crop, flip)
  • Image filters (blur, sharpen, invert)
  • Color space conversions
  • Uses VarArgs for variadic function calls (Dart 3.0+)

Requirements

  • Dart SDK >= 3.5.0
  • libvips library installed on the system

Usage

import 'dart:ffi';
import 'package:libvips_ffi_core/libvips_ffi_core.dart';

void main() {
  // Initialize with system library
  initVipsSystem();
  
  // Or initialize with a pre-loaded library
  // initVipsWithLibrary(DynamicLibrary.open('libvips.dylib'));
  
  // Load and process image with VipsPipeline (from libvips_ffi_api)
  final pipeline = VipsPipeline.fromFile('input.jpg');
  pipeline.resize(0.5);
  pipeline.toFile('output.jpg');
  pipeline.dispose();
  
  // Cleanup
  shutdownVips();
}

Libraries

libvips_ffi_core
Pure Dart FFI bindings for libvips image processing library.