Hello ! While I'm trying to resize a photo (originally on a sd card), grabbed using :
InputStream openInputStream = contentResolver.openInputStream (photoUri); I got the following stack trace when calling : Bitmap bitmap = BitmapFactory.decodeStream(openInputStream); 04-26 14:57:57.213: ERROR/dalvikvm-heap(349): 6291456-byte external allocation too large for this process. 04-26 14:57:57.224: ERROR/(349): VM won't let us allocate 6291456 bytes 04-26 14:57:57.234: DEBUG/skia(349): xxxxxxxxxxxxxxxxxxxx allocPixelRef failed 04-26 14:58:58.005: WARN/dalvikvm(349): threadid=15: thread exiting with uncaught exception (group=0x4000fe68) 04-26 14:58:58.014: ERROR/AndroidRuntime(349): Uncaught handler: thread Thread-19 exiting due to uncaught exception 04-26 14:58:58.153: ERROR/AndroidRuntime(349): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 04-26 14:58:58.153: ERROR/AndroidRuntime(349): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 04-26 14:58:58.153: ERROR/AndroidRuntime(349): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:304) 04-26 14:58:58.153: ERROR/AndroidRuntime(349): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:149) 04-26 14:58:58.153: ERROR/AndroidRuntime(349): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:174) Do you know an alternative way to resize a picture ? without calling BitmapFactory ? and without getting such an exception ? Thanks in advance for your help Anthony --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---