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
211 stars 19 forks source link

How to compress file image array byte using camera #99

Open hafiz013 opened 1 month ago

hafiz013 commented 1 month 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 1 month ago

@shtolik