Skip to content

Add HEIC output format for iOS images - #16

Merged
alexey1312 merged 5 commits into
mainfrom
alexey1312/add-ios-heic-images
Dec 20, 2025
Merged

Add HEIC output format for iOS images#16
alexey1312 merged 5 commits into
mainfrom
alexey1312/add-ios-heic-images

Conversation

@alexey1312

Copy link
Copy Markdown
Collaborator

Description

Adds HEIC as an optional output format for iOS image exports, providing ~40-50% smaller file sizes compared to PNG while maintaining transparency support. Uses native ImageIO framework on macOS with automatic PNG fallback on Linux.

  • Add NativeHeicEncoder using Apple ImageIO for HEIC encoding
  • Add SvgToHeicConverter for SVG source with HEIC output (best quality)
  • Add HeicConverter for PNG to HEIC batch conversion
  • Add outputFormat: heic and heicOptions configuration in Params
  • Support both lossy (default, quality 0-100) and lossless encoding modes
  • Handle odd dimensions by padding to even (HEIC requirement)
  • Add platform detection with automatic PNG fallback on Linux
  • Update WebP default quality from 80 to 90 for consistency
  • Add comprehensive unit tests for HEIC encoder
  • Update CONFIG.md, CLAUDE.md, and DocC documentation

claude and others added 5 commits December 20, 2025 13:34
Research findings for iOS HEIC image export:
- Xcode asset catalogs support HEIC since Xcode 10.1
- Apple ImageIO provides native encoding on macOS (not Linux)
- libheif is cross-platform but has GPL licensing (x265)
- Recommended: Phase 1 with macOS-only ImageIO approach
Add HEIC encoding support for iOS image exports using native ImageIO.
HEIC provides ~40-50% smaller file sizes than PNG while maintaining
full transparency support.

- Add NativeHeicEncoder for RGBA → HEIC encoding (macOS only)
- Add SvgToHeicConverter for SVG → HEIC pipeline via resvg
- Add HeicConverter for batch PNG → HEIC conversion
- Support both lossy and lossless encoding modes with quality control
- Gracefully fall back to PNG on Linux with warning
- Update Xcode asset catalog export to reference .heic files
- Add outputFormat and heicOptions config parameters for iOS images
@alexey1312
alexey1312 merged commit 0b23430 into main Dec 20, 2025
3 checks passed
@alexey1312
alexey1312 deleted the alexey1312/add-ios-heic-images branch December 20, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants