onseok / peekaboo

🌄 Kotlin Multiplatform library for Compose Multiplatform, designed for seamless integration of an image picker feature in iOS and Android applications.
Apache License 2.0
241 stars 20 forks source link

How to compress file image array byte using camera #99

Open hafiz013 opened 3 months ago

hafiz013 commented 3 months ago

By the way this library has compression file when take singleImage like this:

singleImagePicker =
            rememberImagePickerLauncher(
                selectionMode = SelectionMode.Single,
                scope = coroutineScope,
                resizeOptions = ResizeOptions(compressionQuality = 0.5),
                onResult = { byteArrays ->
                    byteArrays.firstOrNull()?.let {
                        imageByteArray.value = it
                        image.value = it.toImageBitmap()
                    }
                },
            )

then how to compress image take picture?

hafiz013 commented 3 months ago

@shtolik