android-multipicker-library
android-multipicker-library copied to clipboard
java.lang.OutOfMemoryError
Using a Motorola E2, O.S. v5.0.2, downloading a big file (i.e. a nasa file), then selecting it with the picker, and setting the options
imagePicker.ensureMaxSize(1090, 1090);
It however crashes on line 587 of FileProcessorThread on the method: protected ChosenImage ensureMaxWidthAndHeight(int maxWidth, int maxHeight, ChosenImage image) line: bitmap = BitmapFactory.decodeStream(scaledInputStream, (Rect)null, e); with an outOfMemoryException, is this the expected behaviour?
Whats is the size of the image? Will have to check this.
39.13MB, 19332x20076 http://effigis.com/wp-content/uploads/2015/02/Airbus_Pleiades_50cm_8bit_RGB_Yogyakarta.jpg
Wow.. That's a huge image. Will check this out.
It works on my phone. Probably, 1090x1090 is a bit large image for your device to render. Could you try with a smaller dimension and check?
@coomar2841 Why don't use inSampleSize
to handle it?
I could, but the OP wants the image size to be at-least 1090, so inSampleSize won't work here. I haven't yet thought of how to handle such images yet. Planning this for a later release.
@coomar2841 I see you removed it from v1.1.0. So when do you plan to enhance it? I found OOM in many devices when render the image which size is same with device's size.
Thanks, Alvin
I am also getting this crash in huge amount. What should be done to avoid this crash?