Skip to content

v0.6.0 — HDR-aware resolution + iOS 17 picker async + Live Photos depth

Choose a tag to compare

@SteliyanH SteliyanH released this 28 May 06:26
· 7 commits to main since this release

Reopened cycle — three resolution-side surfaces driven by downstream consumers. Pure additive; every v0.5 call site compiles unchanged. Kadr floor stays at ≥ 0.9.2.

Added

  • PhotosClipResolver.videoHDRMetadata(of:) — async; reads transfer function + color primaries + color matrix and detects Dolby Vision via codec FourCC, without pulling the full media. VideoHDRMetadata value type carries the result. Pairs with kadr-pro for the export side; the resolution side stays free so consumers can detect-and-route ("this is HDR" without "this exports HDR").
  • PhotoPicker(configuration:iOS17AsyncResults:) — iOS 17 / macOS 14 / visionOS 1 initializer that delivers picked items as an AsyncStream<PhotoPickerResult>; caller iterates with for await. The iOS 16 closure / binding path stays for the deployment floor. PhotoPicker now stores a Delivery enum (binding vs. asyncStream) and dispatches through PhotoPicker.deliver(_:via:).
  • PhotosClipResolver.depthMap(from:) — async; returns CVPixelBuffer? for iPhone 12+ Live Photos carrying disparity / depth / portrait-effects-matte auxiliary data. Detection-only; aux-type preference disparity → depth → matte. Vision-side cutout / segmentation stays in kadr-pro.

Tests

24 new tests across VideoHDRMetadataTests (12), PhotoPickerAsyncResultsTests (4), DepthExtractionTests (8). Suite total: 80.

Notes

  • The "iOS 17 PHPicker.results AsyncSequence" framing in the planning doc was aspirational — PHPickerViewController still uses its delegate. The new overload wraps the delegate in an AsyncStream so callers get for await ergonomics; behavior matches a single batched delivery on dismiss.
  • Depth extraction is best-effort: any failure path (auth, iCloud, decode) collapses to nil. Callers branch on presence; no thrown errors. Free-vs-premium line stays clean — we expose the depth buffer, kadr-pro uses it.
  • HDR detection covers HDR10 / HLG transfer functions plus Dolby Vision profiles via codec FourCC. Color-space conversion is explicitly out of scope (kadr-pro).

Full changelog: CHANGELOG.md.