just_image 2.0.0
just_image: ^2.0.0 copied to clipboard
High-performance image processing engine powered by Rust FFI. Supports WebP, JPEG, PNG, TIFF and BMP with automatic native binaries, parallel processing and professional metadata preservation.
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. OutputFormatenum: NewOutputFormatenum (jpeg,png,webp,tiff,bmp) replaces the need forOutputConfigsubclasses in most cases. Usepipeline.encode(OutputFormat.webp, quality: 85).- AVIF removed: AVIF input and output are not supported in 2.0.0.
OutputFormat.avif,ImageFormat.avifandAvifOutputhave been removed together with the native codec dependencies. ImageResult.format: Changed fromStringto the newImageFormatenum.- Removed
ImagePipeline.runSync(): Userun()exclusively — it already runs in a backgroundIsolate. JustImage.processBatchnow returnsBatchResultinstead ofList<ImageResult>.BatchResultcaptures both successes and failures, allowing partial success handling.- Removed private pipeline subclasses (
_BytesImagePipeline,_FileImagePipeline,_XFileImagePipeline). Use named constructorsImagePipeline.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: trueinhooks.user_definesfor faster dev builds (usescargo build --profile devinstead of--release). BatchResult: New result type for batch processing withsuccessCount,failureCount,allSucceeded, andsuccessfulgetters.OutputConfig.from(OutputFormat, quality?): Factory to createOutputConfigfrom enum.- Generated
@Nativebindings with an explicit ABI version check.
Bug fixes #
- iOS device linking: Fixed
___chkstk_darwinsymbol not found by ensuring deployment target is respected. - ICC profile injection:
preserve_iccnow works independently ofpreserve_metadatafor 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.
processBatcherror 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 excessrelease()calls.utf8.decode: ReplacedString.fromCharCodeswithutf8.decodefor 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 respectsCARGO_TARGET_DIRenvironment variable.- Android NDK: Only configures the current target's toolchain instead of all targets.
rust_free_result: Marked#[allow(dead_code)].- xcrun errors:
xcrunfailures 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 genericclangbinary. The versioned script has the correct--targetbaked in and routes to the NDK's ownld.lld, avoiding both theld64.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
clangnow useslld(ELF linker) instead ofld64.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 foraarch64-linux-androidand other Android targets. - Removed unused
loggingdependency frompubspec.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
cccrate environment variables (CC_aarch64_linux_android, etc.). - Prefer the
CCompilerConfigprovided 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
*-clangsymlink, then to the highest available API-level compiler. - Removed discontinued
just_image_cliandjust_image_flutterpackages 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-simtarget triple selection. - iOS architecture now respects
targetArchitectureinstead of defaulting toarm64. - 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_cliandjust_image_flutterare discontinued — depend onjust_imagedirectly.
1.0.2 #
- Android: auto-install missing Rust targets via
rustup target addduring 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, andx86_64-linux-androidautomatically. - Android: API level is configurable via
ANDROID_MIN_SDK_VERSIONenv var (default:21). - Android: fallback from
darwin-arm64todarwin-x86_64prebuilt 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()andImagePipeline.thumbnail()chainable methods.JustImageEngine.blurHashEncode(),blurHashDecode(), andavailableFilters.
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.