All notable changes to WICompress will be documented in this file.
The format is based on Keep a Changelog, and this project follows Semantic Versioning.
Adds explicit output control for callers that need a specific upload format or pixel cap while keeping the v1 data-first API intact.
- Explicit output format policies:
.format(.jpeg(background:)).format(.png).format(.heic)
WIJPEGBackgroundwith.disallow,.white, and.blackfor intentional transparent-source handling when encoding JPEG..maxPixel(Int)resize policy for caller-supplied longest-side caps without upscaling smaller images.WICompressError.transparentSourceRequiresBackgroundfor transparent sources encoded as JPEG without an explicit background.
- Explicit format conversion always rewrites output instead of returning the original data through the size guard.
- JPEG encoding rejects transparent sources by default. Callers must choose
.jpeg(background: .white)or.jpeg(background: .black)to flatten alpha. - Format conversion with
.metadata(.preserve)re-attaches ordinary metadata dictionaries where ImageIO supports them. - Format conversion still bakes orientation into pixels and resets the
orientation tag to
1on the redraw path.
- GPS-only metadata stripping is not included.
- Target-byte-size compression is not included.
- Automatic format selection is not included.
- HDR gain-map preservation is not guaranteed.
Initial public release of the ImageIO-backed core.
- Data-first compression APIs for
Dataand fileURLinput. - UIKit/AppKit-free ImageIO compression pipeline for iOS 14+ and macOS 11+.
- JPEG, PNG, and HEIC/HEIF container detection.
- Luban resize policy based on EXIF-oriented display dimensions.
- Metadata policies for stripping or preserving ordinary image metadata.
- Lossy quality policy for JPEG and HEIC destinations.
- Typed
WICompressErrorfailure model. - Swift Testing coverage with real-image fixtures for metadata, orientation, alpha, color profile, format detection, and size-guard behavior.
- SwiftUI example app demonstrating PhotosPicker/PHPicker data loading and compression preview.
- Replaced the old
UIImage-oriented API from 0.x with aData/URLcore API. - Preserved the source container format by default instead of implicitly falling back to JPEG.
- Reported failures through
throws(WICompressError)instead of optional results.
- Removed
WICompress.resizeImage(_:). - Removed
WICompress.compressImage(_:quality:formatData:).
- Animated images are rejected.
- Live Photo compression is not supported.
- Async APIs are not included.
- Explicit format conversion policies such as PNG to JPEG are not included.
- Target-byte-size compression is not included.
- HDR gain-map preservation is not guaranteed.
- WebP and JPEG XL writing are not included.
Last public 0.x release before the ImageIO-backed API redesign.