Repository navigation
A patch release that fixes the UI freezing when confirming a rotated or flipped crop.
crop() and cropToImage() no longer block the calling thread
Only the decode used to leave the caller's dispatcher, so the rotate and flip pass, the shape mask and the encode ran on the main thread and froze the UI for seconds on iOS (#1). The crop now runs on Dispatchers.Default. The frame is read once when the call is made, so a gesture that lands while the crop runs no longer changes it. In the browser the work still shares the single thread.
A cancelled caller gets a CancellationException
If the caller's scope is cancelled during a crop, the call now throws CancellationException like any suspend function, rather than returning CropResult.Cancelled or CropImage.Cancelled. Code after the call no longer runs in a scope that has gone. Cancelled now means the user dismissed the cropper.
Faster rotated and flipped crops
The rotate and flip pass no longer allocates per pixel. A 2000x2000 quarter turn went from 356 ms to 137 ms in a macOS release build, with identical output.
Full changelog: 0.1.0...0.1.1