koni_jxl_flutter 0.1.4 copy "koni_jxl_flutter: ^0.1.4" to clipboard
koni_jxl_flutter: ^0.1.4 copied to clipboard

Flutter bindings for koni_jxl: display and encode JPEG XL (.jxl) images with a pure Dart codec — no native dependencies, all platforms.

Changelog #

0.1.4 #

  • JxlImageProvider gained cacheWidth/cacheHeight for a reduced-resolution decode straight from the idiomatic provider (wrapping a JXL-backed ImageProvider in ResizeImage has no effect, since JXL bytes never reach the engine's decode callback). Pairs with koni_jxl 0.1.4's faster downscale paths (VarDCT DC-only, progressive-DC, and Modular/Squeeze responsive).
  • Picks up all of koni_jxl 0.1.4: a much stronger lossless encoder (now beats PNG and is within ~2% of cjxl -e7), ICC output-colour transforms and spot-colour compositing on the decode path, a VarDCT quant-weight fidelity fix, and a SIMD EPF pass-0 (large progressive photos ~2.4× faster to decode).

0.1.3 #

  • decodeJxlToUiImage/decodeJxlToUiCodec/jxlAwareDecode gained cacheWidth/cacheHeight parameters, threading through to koni_jxl 0.1.3's reduced-resolution JxlDecoder.decode. This closes a real gap: wrapping a JXL-backed ImageProvider in ResizeImage has no effect on JXL bytes, since they never reach the engine's decode callback (and its getTargetSize) that ResizeImage relies on — jxlAwareDecode now needs the target size passed explicitly instead.
  • Float (HDR) sample images now decode and render through JxlImageProvider/decodeJxlToUiImage (inherited from koni_jxl 0.1.3); they previously threw JxlUnsupportedException.

0.1.2 #

  • JxlPagePrefetcher — decodes upcoming pages of a sequential reader (manga chapters, documents, etc.) on background isolates ahead of when they're displayed. setCurrentIndex keeps a [index - behindCount, index + aheadCount] window decoded or decoding, cancelling in-flight decodes and evicting cached results outside the window as the reader navigates; imageFor returns the decoded image whether or not it was prefetched. .fromBytesList / .fromFiles / .fromAssets constructors. Cancellation interrupts an in-flight decode within 1-2ms. Falls back to on-demand decode on the web, which has no isolates.
  • Picked up koni_jxl 0.1.2's decoder correctness fixes and ~18-24% faster real-manga decode (see that package's changelog).

0.1.1 #

  • decodeJxlToUiCodec — decode to a ui.Codec, the shape custom ImageProviders feed to MultiFrameImageStreamCompleter. Stills yield a single-frame codec; animated files carry their frame durations and loop count. Handles the engine's raw-descriptor lifetime rules internally (frames are extracted before the backing buffers are released, then handed out as clones).
  • jxlAwareDecode(bytes, decode) — the drop-in seam for apps whose providers render mixed formats from one byte source: sniffs JPEG XL by content (looksLikeJxl, re-exported from koni_jxl 0.1.1) and decodes it here; anything else goes to the engine callback unchanged.
  • JxlImageProvider now uses decodeJxlToUiCodec, so animated JPEG XL plays through plain Image widgets with correct timing and loop count (it previously showed only the first frame).
  • The whole koni_jxl API is re-exported, so one dependency suffices.
  • Fixed web builds: every decode/encode helper used Isolate.run, which throws UnsupportedError under dart2js/dart2wasm, so the package did not actually work on the web. All heavy work now goes through Flutter's compute — still a background isolate (with transferred, not copied, result buffers) on native platforms, a plain call on the web, where the decode runs on the UI thread.

0.1.0 #

First release. Flutter bindings for the pure-Dart koni_jxl codec.

  • JxlImageProvider (.asset / .file / .memory) and decodeJxlToUiImage — decode .jxl in a background isolate, integrated with Flutter's image cache.
  • decodeJxlAnimation and the JxlAnimationView widget — play animated JPEG XL with correct frame timing and loop count.
  • decodeJxlProgressive and the JxlProgressiveImage widget — show a blurry 1:8 preview while bytes stream in, then the sharp final image.
  • encodeJxlFromRgba / encodeJxlFromUiImage — lossless JPEG XL encoding in a background isolate.
0
likes
160
points
33
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter bindings for koni_jxl: display and encode JPEG XL (.jxl) images with a pure Dart codec — no native dependencies, all platforms.

Repository (GitHub)
View/report issues

Topics

#jpeg-xl #jxl #image #codec

License

MIT (license)

Dependencies

flutter, koni_jxl

More

Packages that depend on koni_jxl_flutter