google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
497 stars 296 forks source link

Optimizing Image Compression #2222

Open Itskiprotich opened 1 year ago

Itskiprotich commented 1 year ago

Is your feature request related to a problem? Please describe. Devices capture images larger than 5MB, resulting in processing errors within the SDC library. Users encounter obstacles as the current library lacks a dedicated attachment feature to efficiently handle and compress images that surpass this size threshold. The absence of a tailored solution restricts users from seamlessly proceeding with larger image files. I've attached a sample screenshot below.

Describe the solution you'd like I'd like to create a function that will compress the image to a disired size.

Describe alternatives you've considered N/A

Additional context

Would you like to work on the issue? Yes

jingtang10 commented 1 year ago

@Itskiprotich thanks for raising this! what exact APIs are you proposing here? does it need to live in the sdk?

Itskiprotich commented 1 year ago

@jingtang10 I intend to incorporate the Android built-in Bitmap compression capabilities. Leveraging the native Bitmap.compress() function.