heic2png 0.0.11
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
RemoveWindowSubclasson a potentially-destroyed HWND, andPostResultToMainThreadcouldPostMessageto a dead window during shutdown. AddedWM_NCDESTROYhandler to track window destruction, guarded the destructor andPostResultToMainThreadagainst shutdown races.
0.0.9 #
- Fixed Windows runtime crash caused by DLL naming mismatch —
heif.dllimportslibde265.dllbut the bundled file was namedde265.dll. Renamed tolibde265.dlland updated all build scripts. - Added null guard for
GetView()in WindowsRegisterWithRegistrar— 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++_staticto match 0.0.8 STL change.
0.0.8 #
- Fixed Android
libc++_shared.soconflict with other native plugins (e.g. ffmpeg_kit) by switching fromc++_sharedtoc++_staticSTL.
0.0.7 #
- Rewrote Android implementation to use libheif + libpng via NDK, replacing BitmapFactory/Bitmap.compress.
- Android
compressionLevelparameter 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.exifinterfacedependency. - 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-devvia 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
kCGImagePropertyTIFFImageWidthconstants.
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
convertToBytesreturn type fromUint8List?toUint8List— now throwsPlatformExceptionon failure instead of returning null. - Fixed
convertsilently returningfalsewhen the platform returns null — now throwsPlatformException. - 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
ArgumentErrorimmediately. - 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.