openjpeg_ffi 0.3.1 copy "openjpeg_ffi: ^0.3.1" to clipboard
openjpeg_ffi: ^0.3.1 copied to clipboard

Dart bindings to OpenJPEG for encoding and decoding raw JPEG2000 codestreams — native-assets FFI on native platforms, WebAssembly on web. No manual setup required either way.

0.3.1 #

  • Fix: flutter build web/dart pub get with native-assets enabled crashed every consumer of this package on the web with Bad state: HookConfig.code should only be accessed when building code assetshook/build.dart read input.config.code.targetOS unconditionally, but input.config.code only exists when input.config.buildCodeAssets is true, which it never is for a web target (the web build uses the WASM module from 0.3.0 instead of a native library, so no code asset is built at all). Present since 0.3.0's web support was added; now guarded with an early if (!input.config.buildCodeAssets) return;.

0.3.0 #

  • Add web support: decodeJ2k/encodeJ2k now also work on dart2js and dart2wasm web builds, backed by OpenJPEG compiled to a standalone WebAssembly module (embedded in the package — no separate asset to serve). Call await initOpenJpegWasm() once before using either function on web (a no-op on native platforms, safe to call unconditionally). See the README's "Web support" section for the setup and its limitations (larger app bundle, no background-isolate offloading, no web-worker streaming yet).
  • Fix Android: every call to decodeJ2k/encodeJ2k crashed with dlopen failed: cannot locate symbol "pow", since hook/build.dart never linked libm (needed by Android's Bionic, unlike the other platforms). Present since 0.1.0 — verified fixed on a real Android emulator; CI still can't catch this class of bug since it only runs dart test on the host, never an actual Android/iOS runtime.

0.2.0 #

  • Add encodeJ2k for encoding a raw raster to a JPEG2000 codestream (lossless by default, or lossy via compressionRatio), plus Jp2kEncodeException.

0.1.1 #

  • Bump ffigen dev dependency to ^21.0.0.

0.1.0 #

  • Initial release: decodeJ2k for decoding raw JPEG2000 codestreams via a vendored OpenJPEG 2.5.4, built through hook/build.dart (native-assets). Verified via CI on macOS, iOS, Android, Windows, and Linux — no per-platform code needed.
0
likes
150
points
503
downloads

Documentation

API reference

Publisher

verified publishermonlycute.id.vn

Weekly Downloads

Dart bindings to OpenJPEG for encoding and decoding raw JPEG2000 codestreams — native-assets FFI on native platforms, WebAssembly on web. No manual setup required either way.

Repository (GitHub)
View/report issues

Topics

#ffi #jpeg2000 #image #codec

License

Apache-2.0 (license)

Dependencies

code_assets, ffi, hooks, logging, native_toolchain_c

More

Packages that depend on openjpeg_ffi