Skip to content

v4.1.0

Latest

Choose a tag to compare

@rroohit rroohit released this 31 May 08:01
· 2 commits to master since this release

Full Changelog: v4.0.0...v4.1.0

ImageCropView 4.1.0

✨ New Features

  • Pinch & double-tap zoom — set enableZoom = true on ImageCropView to zoom and pan the source image while cropping. The crop overlay stays fixed while the image moves beneath it.
  • Rotation-safe crop state — crop rectangle, zoom, and pan now survive device rotation and other configuration changes via the new rememberSaveableImageCrop(bitmap) composable.
    (#18)

⚠️ API Changes (breaking)

  • ImageCropView is now a top-level @Composable — call ImageCropView(imageCrop = …, …) and pass in the state holder, instead of imageCrop.ImageCropView(…).
  • Create the ImageCrop state holder via factory composables rather than constructing it directly:
    • rememberSaveableImageCrop(bitmap) — rotation-safe (recommended)
    • rememberImageCrop(bitmap) — in-process only
  • onCrop(cropSourceImage: Boolean = false) — pass true to crop the original bitmap at full resolution.

📖 Docs

  • README rewritten for the new API: state holders, full ImageCropView parameter reference, zoom, onCrop/resetView, edge types, and requirements.