Skip to main content

just_image 3.0.0 copy "just_image: ^3.0.0" to clipboard
just_image: ^3.0.0 copied to clipboard

High-performance image processing engine powered by Rust FFI. Supports AVIF, SVG, WebP, JPEG, PNG, TIFF and BMP with automatic native binaries, parallel processing and professional metadata preservation.

3.0.0 #

Breaking changes #

  • Requires Dart 3.13 and Flutter 3.47 or newer.
  • Native ABI version increased to 3 for the core, standard and extended pipelines.
  • Auto-orientation, metadata preservation and ICC preservation now default to disabled so basic pipelines can remain in the core native feature group.
  • Arbitrary rotations now expand their canvas by default; pass canvas: RotationCanvas.clip for the previous behavior.
  • OutputFormat is now a sealed set of constant values rather than a Dart enum. Existing OutputFormat.png, .webp, values, name and defaultQuality usage is preserved; this lets AOT retain only the selected codec implementation.
  • Native release assets now include both dynamic libraries for JIT/debug and static libraries for AOT linking.

New features #

  • Generated FFI bindings now use @RecordUse and include an automatically generated Dart-to-native symbol mapping.
  • Added a Native Assets link hook that removes unreachable Rust symbols and omits the native library entirely when no FFI APIs are used.
  • Added ImagePipeline.runCore() and JustImage.processCore() for JPEG, PNG, BMP, transformations, thumbnails and built-in effects without retaining WebP, TIFF, LCMS, metadata, watermarks or artistic filters.
  • Native feature selection is now transparent through run(); runCore() and processCore() are deprecated compatibility helpers.
  • Added AVIF input/output and SVG rasterization through an isolated extended ABI entry point.
  • Added MetadataPolicy.none, .safe and .preserveAll; EXIF reinjection now covers JPEG, PNG, WebP, TIFF and AVIF, and safe mode strips sensitive tags.
  • Added expanded/clipped rotation canvas selection and ARGB background colour.
  • Added explicit PNG compression/filter/optimization, lossless WebP and AVIF speed/thread configurations.
  • Pipeline inputs use TransferableTypedData to avoid a second Dart-heap copy when work moves to the background isolate.
  • Added reproducible AOT fixtures and CI verification for exported symbols, complete library omission and core-versus-full binary size.

Build and release #

  • Android builds explicitly align LOAD and GNU_RELRO segments for 16 KB pages, in both Cargo builds and the final AOT link hook. Release CI verifies Android ELF alignment and builds the Flutter APK/AAB from published static archives.

  • Android prebuilt binaries use NDK r28c.

  • iOS x64 simulator AVIF assembly uses Mach-O objects and the simulator SDK.

  • LCMS is always built into native artifacts so release consumers do not depend on a system-installed color management library.

  • AVIF builds explicitly select the Android ABI; Windows local builds use a shorter Cargo output path to avoid MSBuild file tracking limits.

  • Release automation now publishes 24 SHA-256-verified artifacts: a dynamic and a static library for every supported target.

  • JIT and debug builds preserve the full dynamic-library behavior; release/AOT builds consume static archives through hook/link.dart.

  • Apple builds isolate Cargo output per target and use the host architecture for build scripts, allowing universal macOS and iOS release builds.

  • Enabled strict casts, inference and raw-type analysis for the package.

2.0.0 #

Breaking changes #

  • Native Assets ABI: FFI bindings are generated from a versioned C header and resolved using @Native; runtime loading no longer depends on the working directory.
  • OutputFormat enum: New OutputFormat enum (jpeg, png, webp, tiff, bmp) replaces the need for OutputConfig subclasses in most cases. Use pipeline.encode(OutputFormat.webp, quality: 85).
  • AVIF removed: AVIF input and output are not supported in 2.0.0. OutputFormat.avif, ImageFormat.avif and AvifOutput have been removed together with the native codec dependencies.
  • ImageResult.format: Changed from String to the new ImageFormat enum.
  • Removed ImagePipeline.runSync(): Use run() exclusively — it already runs in a background Isolate.
  • JustImage.processBatch now returns BatchResult instead of List<ImageResult>. BatchResult captures both successes and failures, allowing partial success handling.
  • Removed private pipeline subclasses (_BytesImagePipeline, _FileImagePipeline, _XFileImagePipeline). Use named constructors ImagePipeline.bytes(), .file(), .xfile() directly.
  • Requires Dart 3.10.8 and Flutter 3.38 or newer.
  • Bumped package version to 2.0.0.

New features #

  • Zero-configuration native delivery: released packages always download the correct SHA-256-verified binary, regardless of whether Cargo is installed.
  • Versioned binary cache with atomic downloads, timeouts and retries.
  • Independent examples for Dart CLI and Flutter desktop/mobile projects.
  • Debug build profile: Set debug_build: true in hooks.user_defines for faster dev builds (uses cargo build --profile dev instead of --release).
  • BatchResult: New result type for batch processing with successCount, failureCount, allSucceeded, and successful getters.
  • OutputConfig.from(OutputFormat, quality?): Factory to create OutputConfig from enum.
  • Generated @Native bindings with an explicit ABI version check.

Bug fixes #

  • iOS device linking: Fixed ___chkstk_darwin symbol not found by ensuring deployment target is respected.
  • ICC profile injection: preserve_icc now works independently of preserve_metadata for JPEG output.
  • PNG signature check: Full 8-byte PNG magic number check instead of partial 4-byte.
  • WebP encoding: Added empty-output check to detect silent encoding failures.
  • processBatch error handling: Individual pipeline failures no longer abort the entire batch.
  • Public argument validation: dimensions, quality, effects, BlurHash and concurrency fail before crossing FFI.
  • Panic containment: Rust panics are converted to native errors instead of unwinding through extern "C".
  • _Semaphore: Prevented count from going negative on excess release() calls.
  • utf8.decode: Replaced String.fromCharCodes with utf8.decode for BlurHash and image info JSON parsing.
  • Sobel edge detection: Uses a flat source buffer and safely handles images smaller than its 3×3 kernel.
  • CARGO_TARGET_DIR: Build hook now respects CARGO_TARGET_DIR environment variable.
  • Android NDK: Only configures the current target's toolchain instead of all targets.
  • rust_free_result: Marked #[allow(dead_code)].
  • xcrun errors: xcrun failures now log stderr instead of silently swallowing.

Testing and CI #

  • Added real Dart-to-Rust integration tests for every output format, transforms, watermark, BlurHash and partial batch failures.
  • Added Rust unit tests for formats and native validation.
  • Added a 12-target native release workflow with one-day temporary artifact retention and automatic cleanup for GitHub Free.
  • Creating a version tag now builds and publishes every native binary, generates and validates SHA-256 hashes, tests the zero-configuration package and publishes to pub.dev without a manual preparation step.

1.0.8 #

  • Fixed Android cross-compilation on macOS: use the versioned NDK clang script (e.g. aarch64-linux-android29-clang) as the Cargo linker instead of the generic clang binary. The versioned script has the correct --target baked in and routes to the NDK's own ld.lld, avoiding both the ld64.lld (Mach-O) and the untargeted-clang macOS-flags issues that caused linker failures in v1.0.7.

1.0.7 #

  • Fixed Android cross-compilation on macOS: NDK clang now uses lld (ELF linker) instead of ld64.lld (Mach-O linker) via a wrapper script that passes -fuse-ld=lld. This resolves linker errors (unknown argument '--version-script', --as-needed, -Bstatic, etc.) when building for aarch64-linux-android and other Android targets.
  • Removed unused logging dependency from pubspec.yaml.

1.0.6 #

  • Flattened repository: removed the Dart workspace and moved the package to the repository root.
  • Fixed Android build on macOS: use lowercase target names for cc crate environment variables (CC_aarch64_linux_android, etc.).
  • Prefer the CCompilerConfig provided by Native Assets for Android; fall back to manual NDK detection only when absent.

1.0.5 #

  • Fixed Android NDK compiler detection: fall back from the requested API level to the unversioned *-clang symlink, then to the highest available API-level compiler.
  • Removed discontinued just_image_cli and just_image_flutter packages from the repository.

1.0.4 #

  • Migrated Native Assets build hook to package:hooks + package:code_assets.
  • Fixed iOS simulator compilation: correct aarch64-apple-ios-sim / x86_64-apple-ios-sim target triple selection.
  • iOS architecture now respects targetArchitecture instead of defaulting to arm64.
  • Linker wrapper now uses the compiler driver (clang) so Apple SDK flags are parsed correctly.

1.0.3 #

  • Core package is now the single entry point for both Dart and Flutter apps.
  • Documented direct Flutter usage; no wrapper plugin is required anymore.
  • just_image_cli and just_image_flutter are discontinued — depend on just_image directly.

1.0.2 #

  • Android: auto-install missing Rust targets via rustup target add during build.
  • Android: auto-detect Android NDK location from ANDROID_NDK_HOME, ANDROID_NDK_ROOT, ANDROID_HOME/ndk/, or platform defaults — no manual configuration required.
  • Android: configure Cargo linkers for aarch64-linux-android, armv7-linux-androideabi, and x86_64-linux-android automatically.
  • Android: API level is configurable via ANDROID_MIN_SDK_VERSION env var (default: 21).
  • Android: fallback from darwin-arm64 to darwin-x86_64 prebuilt toolchain for NDK < 23 on Apple Silicon.

1.0.1 #

  • 15 artistic filters: vintage, sepia, cool, warm, marine, dramatic, lomo, retro, noir, bloom, polaroid, golden_hour, arctic, cinematic, fade.
  • Thumbnail generation preserving aspect ratio.
  • BlurHash encode and decode support.
  • ImagePipeline.filter() and ImagePipeline.thumbnail() chainable methods.
  • JustImageEngine.blurHashEncode(), blurHashDecode(), and availableFilters.

1.0.0 #

  • Initial release as standalone package in monorepo.
  • High-performance Rust FFI engine with Native Assets build hook.
  • Fluent pipeline API for transforms, effects, and format conversions.
  • Batch processing queue with priority support.
  • Custom exception hierarchy.
2
likes
140
points
386
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

High-performance image processing engine powered by Rust FFI. Supports AVIF, SVG, WebP, JPEG, PNG, TIFF and BMP with automatic native binaries, parallel processing and professional metadata preservation.

Repository (GitHub)
View/report issues

Topics

#image #image-processing #ffi #rust #flutter

License

MIT (license)

Dependencies

code_assets, cross_file, crypto, ffi, hooks, meta, native_toolchain_c, record_use

More

Packages that depend on just_image