You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`cameraScaleType` - <spanclass="pill-new">NEW in v1.0.41</span> How the camera preview is scaled inside its viewport (Android only). Defaults to `CameraScaleType.FILL_CENTER`
877
881
878
-
**Image Compression Examples:**
882
+
**Camera scale type examples:**
879
883
880
884
```kotlin
885
+
// Default — fills the viewport, crops the feed to fit
881
886
CameraCaptureConfig()
882
887
888
+
// Letterbox — full camera feed visible, matches captured image framing
883
889
CameraCaptureConfig(
884
-
compressionLevel=CompressionLevel.MEDIUM
890
+
cameraScaleType=CameraScaleType.FIT_CENTER
885
891
)
886
892
893
+
// Fill from top-left
887
894
CameraCaptureConfig(
888
-
compressionLevel =CompressionLevel.HIGH
889
-
)
890
-
891
-
CameraCaptureConfig(
892
-
compressionLevel =CompressionLevel.LOW
895
+
cameraScaleType =CameraScaleType.FILL_START
893
896
)
894
897
```
895
898
896
899
### PermissionAndConfirmationConfig
897
900
898
-
Configuration for permissions and confirmation.
901
+
Configuration for permissions and post-capture confirmation screen.
-`skipConfirmation: Boolean` - If true, automatically confirms the photo without showing confirmation screen (Android only)
920
+
-`customDeniedDialog: (@Composable (...) -> Unit)?` - Custom composable dialog when permission is denied. Always call `onRetry` or `onDismiss` on user interaction
921
+
-`customSettingsDialog: (@Composable (...) -> Unit)?` - Custom composable dialog for opening system settings. Always call `onOpenSettings` or `onDismiss` on user interaction
922
+
-`skipConfirmation: Boolean` - If `true`, delivers the captured photo directly without showing the confirmation screen (Android)
923
+
-`cancelButtonTextIOS: String?` - Text label for the cancel button in the iOS permission alert. Defaults to `"Cancel"`
924
+
-`onCancelPermissionConfigIOS: (() -> Unit)?` - Callback invoked when the user taps cancel in the iOS permission alert
925
+
-`confirmationImageContentScale: ContentScale` - <spanclass="pill-new">NEW in v1.0.41</span> How the captured photo is scaled in the post-capture confirmation preview. Accepts any Compose `ContentScale` value. Defaults to `ContentScale.Crop`
Copy file name to clipboardExpand all lines: library/src/androidMain/kotlin/io/github/ismoy/imagepickerkmp/presentation/ui/components/CameraCapturePreview.kt
Copy file name to clipboardExpand all lines: library/src/androidMain/kotlin/io/github/ismoy/imagepickerkmp/presentation/ui/components/ImageConfirmationViewWithCustomButtons.kt
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,8 @@ fun ImageConfirmationViewWithCustomButtons(
Copy file name to clipboardExpand all lines: library/src/androidMain/kotlin/io/github/ismoy/imagepickerkmp/presentation/ui/components/LandscapeConfirmationLayout.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,8 @@ internal fun LandscapeConfirmationLayout(
0 commit comments