Skip to content

Commit

Permalink
fix cropping
Browse files Browse the repository at this point in the history
  • Loading branch information
MoyuruAizawa committed Jul 15, 2023
1 parent f822c91 commit 9c5fc36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cropify/src/main/java/io/moyuru/cropify/Cropify.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@ fun Cropify(
LaunchedEffect(state.shouldCrop) {
if (state.shouldCrop) {
val loadedUri = state.loadedUri
if (loadedUri != null) {
val cropped = if (loadedUri != null) {
cropSampledImage(context, bitmap, loadedUri, state.frameRect, state.imageRect, state.inSampleSize)
} else {
cropImage(bitmap, state.frameRect, state.imageRect)
}
val cropped = cropImage(bitmap, state.frameRect, state.imageRect)
state.shouldCrop = false
onImageCropped(cropped)
}
Expand Down

0 comments on commit 9c5fc36

Please sign in to comment.