Skip to main content

image_ffmpeg 1.1.3 copy "image_ffmpeg: ^1.1.3" to clipboard
image_ffmpeg: ^1.1.3 copied to clipboard

Image decoding and encoding with a pinned FFmpeg build, the same on every platform. Native through FFI, web through WebAssembly.

1.1.3 #

  • Update FFmpeg from 9.0.2 to 9.1. It adds bounds and overflow checks to AVIF and HEIF parsing, fixes an overflow in the TIFF/DNG tile count, and reports out-of-order APNG chunks. The native libraries are rebuilt for every platform and the web.

1.1.2 #

  • Flutter 3.50 compatability

1.1.1 #

  • A full-size decode of an odd-width image with subsampled chroma, such as a 4:2:0 JPEG, WebP or AVIF, wrote no last column: it held leftover memory, so random colors and alpha. FFmpeg's fast unscaled YUV-to-RGB path converts pixel pairs; decoding now uses SWS_ACCURATE_RND, which avoids that path, and the output buffer starts cleared. Other pixels of these formats can differ slightly from 1.1.0 and are closer to the reference decoders. A full-size decode of such an image takes up to about twice as long; a decode that scales the image is unchanged.

1.1.0 #

  • ImageFfmpeg.scaleImage crops RGBA pixels and scales them to an exact size, with a ScaleFilter: area, bilinear, bicubic or lanczos (the default). Use it for pixels that are already in Dart, such as a dart:ui snapshot. The new C export is image_ffmpeg_scale_rgba; the ABI version stays 5, since no existing function changed.

1.0.0 #

  • First stable release. Requires kiln 1.0.0, whose source key leaves out the pubspec's version and description, so a release that changes only those needs no new native build.

0.1.5 #

  • LICENSE has only the package's MIT license. The notices of the bundled native code are in NOTICES, which Flutter reads in place of LICENSE, so an app's license page still shows all of them.

0.1.4 #

  • Requires code_assets 2.2, hooks 2.2 and kiln 0.2. With code_assets 1.x, the package could not be installed with current objective_c and shared_preferences_foundation.
  • The build uses the complete iOS and macOS deployment version, such as 12.3, not only the major version.

0.1.3 #

  • 0.1.2's prebuilt native libraries did not match its sources, so the build hook built FFmpeg from source instead of downloading them. 0.1.3 ships the matching prebuilt libraries; the code is the same as 0.1.2.

0.1.2 #

  • zlib 1.4 (from 1.3.2): security fixes in the code that decompresses PNG and other deflate data in untrusted images.

0.1.1 #

  • FFmpeg 9.0.2 (from 9.0), libaom 3.15.3 (from 3.12.1) and zlib 1.3.2 (from 1.3.1): security and bug fixes in the code that decodes untrusted images. The Web module grows by about 92 KB.

0.1.0 #

  • First release on pub.dev. FFmpeg is built LGPL (no GPL or nonfree components); LICENSE has its license.

0.0.1 #

  • Download the native libraries from a GitHub release with package:native_prebuilt, or build them from source in the hook when the package sources differ from the release (native_build user define). The libraries are no longer in git. A GitHub workflow builds all 12 targets with the hook: Linux in the Debian 11 container (glibc 2.31), Windows with MinGW-w64 and llvm-mingw in Debian containers.
  • Add a pinned Windows arm64 artifact cross-built with llvm-mingw UCRT and verified with the 6,144-case ABI boundary suite and the package and native corpus Dart suites on Windows 11 arm64.
  • Remove unreleased JPEG-only Dart/C compatibility aliases and replace the _ex encoder with one canonical ABI 5 JPEG operation.
  • Give all boundary-crossing Dart enums explicit checked wire values rather than relying on declaration-order .index coupling.
  • Extend the production manifest to lock all 12 native artifacts plus the Worker, loader, Emscripten module, Wasm, source pins, and profile.
  • Add a direct C ownership/security corpus with 6,144 deterministic malformed calls and run it under AddressSanitizer and UndefinedBehaviorSanitizer.
  • Runtime-test exact committed artifacts on macOS arm64/x64, iOS Simulator, Android, Linux arm64/x64, and Windows/Wine.
  • Add 21 versioned synthetic operation recipes covering prime dimensions, poisoned row padding, hidden RGB, exact crop/fill edges, box averaging, passthrough, scaling rounding, JPEG composition, and precise malformed statuses, with a case-ID renderer for actual/expected/diff images.
  • Make production Web builds fail when pinned reduced FFmpeg/libaom inputs are absent; scaffold Wasm can no longer be emitted accidentally.
  • Add fused ImageFfmpeg.fillRectangle decode/fill/encode for hot screenshot masking paths without round-tripping full RGBA buffers through Dart.
  • Replace the resource-handle-shaped load()/dispose() API with lazy static operations. Browser Worker/Wasm resources are package-managed and live for the page lifetime instead of being repeatedly initialized and destroyed.
  • Add deterministic integer-only box-average decode with configurable alpha handling. POSIX native targets fold completed RGBA rows immediately and discard their scratch pages, avoiding a resident full-resolution RGBA image.
  • Add a versioned, fixed-width C shim ABI.
  • Bundle SHA-256-verified reduced FFmpeg native code assets for Android armv7/arm64/x64, iOS arm64 device and arm64/x64 simulator, Linux arm64/x64, macOS arm64/x64, and Windows x64 without a system FFmpeg dependency.
  • Add reproducible immutable-commit builds for the official FFmpeg 9.0 release, decoder-only libaom 3.12.1, and zlib 1.3.1, with constrained exports and dependency checks.
  • Decode static and animated WebP, returning the first animation frame.
  • Normalize deprecated full-range YUVJ* frames before scaling and explicitly preserve JPEG color range, eliminating libswscale's deprecated-pixel-format warning without suppressing diagnostics.
  • Add native FFI and browser WebAssembly backends behind one async API.
  • Connect the browser backend to a module Worker with request IDs, mapped errors, and transferable input/output buffers.
  • Bundle the Worker, Emscripten adapter, generated JavaScript module, and Wasm binary automatically in Flutter web applications; expose ImageFfmpegWeb.workerUri for plain-Dart/custom hosting.
  • Cover the browser backend in real Chrome under dart2js and Dart2Wasm.
  • Add unattended real-Safari dart2js coverage with a package:test launcher that bypasses Safari's local-file confirmation dialog.
  • Mirror the complete 439-test native conformance matrix through Chrome dart2js, Chrome Dart2Wasm, and Safari dart2js, including 340 source fixtures, malformed inputs, metadata/scaling checks, and pixel references.
  • Add FFmpeg vendoring and Wasm build scripts.
  • Implement byte-based image probing, first-frame decode, fit-within area scaling, and RGBA output through libavformat, libavcodec, and libswscale.
  • Include JPEG, PNG/APNG, WebP, GIF, BMP, TIFF, AVIF, PSD, and ICO in the reduced Wasm build.
  • Decode AVIF through pinned, decoder-only libaom and compose auxiliary alpha images into RGBA.
  • Decode flattened PSD composites and select the largest ICO image, including classic BMP-backed ICO transparency masks.
  • Encode RGBA8888 pixels as JPEG with configurable quality, 4:2:0/4:4:4 chroma, and alpha-compositing background, or PNG with configurable compression and preserved alpha on native and Wasm.
  • Add metadata-only image probing for format, coded/display dimensions, EXIF orientation, frame-count, and alpha hints.
  • Add fused first-frame decode, EXIF orientation, crop, fit-within resize, and JPEG/PNG transcode with optional unchanged passthrough.
  • Add native and Wasm benchmarks for the 4000×5000 progressive-JPEG fixture.
1
likes
160
points
1.77k
downloads

Documentation

API reference

Publisher

verified publishertelosnex.com

Weekly Downloads

Image decoding and encoding with a pinned FFmpeg build, the same on every platform. Native through FFI, web through WebAssembly.

Repository (GitHub)
View/report issues

Topics

#ffmpeg #ffi #webassembly #native-assets

License

MIT (license)

Dependencies

code_assets, crypto, ffi, hooks, kiln

More

Packages that depend on image_ffmpeg