[android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-23 Thread ted
Hi, you can decode the image bounds and calculate the sample size.code as below: 1.get the image infos: BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; Bitmap bitmap = BitmapFactory.decodeFile(filePath, options);

[android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-17 Thread B.Arunkumar
Hi, We are using 640*480 resolution video frames with frame rate of 10 frames/sec. Another question related to bitmaps is do we really need to recycle bitmaps or can we assume that the Garbage Collector would take care of disposing bitmaps? Thank you, B.Arunkumar On Jul 17, 6:49 am,

Re: [android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-17 Thread Francisco M. Marzoa Alonso
GC does NOT take care of recycling Bitmaps, so the answer is that YOU should do that. On Jul 17, 2012 9:16 AM, B.Arunkumar awsnetworkrecor...@gmail.com wrote: Hi, We are using 640*480 resolution video frames with frame rate of 10 frames/sec. Another question related to bitmaps is do we

Re: [android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-17 Thread Ralph Bergmann | the4thFloor.eu
Am 17.07.12 09:22, schrieb Francisco M. Marzoa Alonso: GC does NOT take care of recycling Bitmaps, so the answer is that YOU should do that. public void recycle () ... This is an advanced call, and normally need not be called, since the normal GC process will free up this memory when there are

[android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-17 Thread RichardC
The GC will take care of disposing bitmaps but it is easy to create bitmaps faster than the GC can recover the memory from old ones you no longer have a reference to. Using Bitmap.recycle() to can force memory to be recovered now. On Tuesday, July 17, 2012 8:15:10 AM UTC+1, B.Arunkumar wrote:

Re: [android-developers] Re: Handling Bitmap Out of Memory Error

2012-07-17 Thread Francisco M. Marzoa Alonso
:-X On Jul 17, 2012 10:29 AM, Ralph Bergmann | the4thFloor.eu ra...@the4thfloor.eu wrote: Am 17.07.12 09:22, schrieb Francisco M. Marzoa Alonso: GC does NOT take care of recycling Bitmaps, so the answer is that YOU should do that. public void recycle () ... This is an advanced call,