heic2png 0.0.11 copy "heic2png: ^0.0.11" to clipboard
heic2png: ^0.0.11 copied to clipboard

A Flutter plugin that converts HEIC/HEIF images to PNG using native platform APIs (iOS, Android, macOS, Windows, Linux).

0.0.11 #

  • Fixed Windows process exit crash — added explicit heif_init()/heif_deinit() lifecycle management and forced single-threaded decoding to prevent libheif internal threads from crashing during DLL unload.

0.0.10 #

  • Fixed Windows plugin teardown crash — process no longer exits with non-zero after all tests pass. The destructor was calling RemoveWindowSubclass on a potentially-destroyed HWND, and PostResultToMainThread could PostMessage to a dead window during shutdown. Added WM_NCDESTROY handler to track window destruction, guarded the destructor and PostResultToMainThread against shutdown races.

0.0.9 #

  • Fixed Windows runtime crash caused by DLL naming mismatch — heif.dll imports libde265.dll but the bundled file was named de265.dll. Renamed to libde265.dll and updated all build scripts.
  • Added null guard for GetView() in Windows RegisterWithRegistrar — prevents crash in headless or viewless test runners.
  • Added metadata preservation integration test — verifies ICC/EXIF chunks are present in output PNG.
  • Rebuilt Android native libraries (libheif, libde265) with c++_static to match 0.0.8 STL change.

0.0.8 #

  • Fixed Android libc++_shared.so conflict with other native plugins (e.g. ffmpeg_kit) by switching from c++_shared to c++_static STL.

0.0.7 #

  • Rewrote Android implementation to use libheif + libpng via NDK, replacing BitmapFactory/Bitmap.compress.
  • Android compressionLevel parameter now works — full zlib level 0-9 control (previously silently ignored).
  • Android now preserves ICC color profiles (previously dropped entirely).
  • Android now preserves the full EXIF blob (previously only 21 hardcoded tags).
  • Bundled prebuilt Android native libraries (libheif, libde265, libpng) for all 4 ABIs (arm64-v8a, armeabi-v7a, x86_64, x86).
  • Removed androidx.exifinterface dependency.
  • Added Android cross-compilation job to build-native-deps CI workflow.

0.0.6 #

  • Bundled prebuilt Windows native libraries (libheif, libde265, libpng, zlib) — Windows builds now work out of the box from pub.dev without vcpkg or manual setup.
  • Bundled prebuilt Linux native libraries (libheif, libde265) — optional fallback; system libheif-dev via pkg-config is still preferred.
  • Fixed build-native-deps workflow using a dead GitHub fork — switched to official strukturag/libheif.
  • Added comprehensive integration tests (20 tests) covering all conversion modes, compression levels, metadata, error handling.
  • Added CI integration tests on all 5 platforms (iOS simulator, Android emulator, macOS, Linux via Xvfb, Windows).
  • Fixed macOS/iOS build error from non-existent kCGImagePropertyTIFFImageWidth constants.

0.0.5 #

  • Fixed Linux plugin shutdown race — pending results no longer crash if the engine tears down during conversion.
  • Fixed Windows temp file using a predictable name — now uses a random hex suffix to prevent symlink attacks.
  • Fixed convertToBytes return type from Uint8List? to Uint8List — now throws PlatformException on failure instead of returning null.
  • Fixed convert silently returning false when the platform returns null — now throws PlatformException.
  • Fixed iOS/macOS metadata copy potentially overwriting PNG compression settings from source image properties.
  • Fixed Windows/Linux always outputting RGBA PNGs — now detects alpha channel and uses RGB when possible (~25% smaller for opaque images).
  • Added Dart-layer input validation — empty paths now throw ArgumentError immediately.
  • Fixed README incorrectly stating Windows uses WIC — it uses libheif + libpng.
  • Fixed README metadata table — Windows supports EXIF (libpng >= 1.6.32), not just ICC.
  • Fixed macOS Package.swift minimum version (10.13) not matching podspec (10.14).
  • Synced podspec versions to 0.0.5.

0.0.4 #

  • Fixed Linux compile error — replaced reinterpret_cast with const_cast for png_set_iCCP const-correctness.

0.0.3 #

  • Fixed Windows NOMINMAX macro placement — moved to header to prevent min/max conflicts with windows.h.
  • Fixed Linux libheif include path — changed from heif/heif.h to libheif/heif.h for Ubuntu compatibility.
  • Fixed Linux CMakeLists — removed stale PkgConfig::GTK reference, use IMPORTED_TARGET for reliable header propagation.

0.0.2 #

  • Fixed EXIF orientation handling on all platforms — output PNGs are now always pixel-rotated to the correct visual orientation.
  • Fixed Windows COM resource leaks and potential nullptr crash in color context handling.
  • Fixed iOS/macOS FlutterResult being called off the main thread.
  • Improved error messages for PNG filter option failures on Windows.
  • Added overflow and path-length safety checks on Windows and Linux.
  • Switched to atomic file replacement on iOS/macOS.
  • Lowered Dart SDK constraint from 3.11.0 to 3.5.0.
  • Documented Android ICC profile and eXIf chunk limitations.

0.0.1 #

  • Initial release with HEIC/HEIF to PNG conversion.
  • iOS: CoreGraphics/ImageIO (lossless, iOS 12.0+).
  • Android: BitmapFactory + ExifInterface (lossless, API 28+).
  • macOS: CoreGraphics/ImageIO (lossless, macOS 10.13+).
  • Windows: libheif + libpng (lossless, Windows 10 1809+).
  • Linux: libheif + libpng (lossless, requires libheif-dev and libpng-dev).
  • Configurable PNG compression level (0-9).
  • Metadata preservation (ICC color profiles, EXIF data) enabled by default.
1
likes
150
points
491
downloads

Documentation

API reference

Publisher

verified publisherhugocornellier.com

Weekly Downloads

A Flutter plugin that converts HEIC/HEIF images to PNG using native platform APIs (iOS, Android, macOS, Windows, Linux).

Repository (GitHub)
View/report issues

Topics

#heic #heif #png #image-conversion

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on heic2png

Packages that implement heic2png