Open amosyuen opened 8 years ago
Hi @amosyuen and thanks for the issue. I need to research this, and maybe contact with developers of native library that I use.
As an easy workaround you can use uCrop version 1.+ for a while because it uses just Android sdk to work with the bitmap.
When I use options
setCompressionFormat(Bitmap.CompressFormat.JPEG); setCompressionQuality(100);
and select a PNG image, the image I get back can't be loaded by server JPEG library https://github.com/EyalAr/lwip. It gives me an error "Unsupported number of channels"
Looking at https://github.com/EyalAr/lwip/issues/69 sounds like the issue is that the image has 4 channels (CMYK).
Please either change the channels for JPEG compression, or add some behavior to set number of channels in the compression.
Note: Android's Bitmap compress() function sets the number of channels to 3, which can be decoded by the aforementioned library.