Thanks Justin, for the response.

Yes 4MB was the file size. The resolution of the file was around
1600x1200.

I tried using Bitmap factory functions, I have given a code snippet in
the other thread
http://groups.google.com/group/android-developers/browse_thread/thread/cc499cf6e7ed9eb1/d52329bcfdd23923?lnk=gst&q=Gif+Image#d52329bcfdd23923

         WindowManager wm = (WindowManager) getContext
().getSystemService( Context.WINDOW_SERVICE);
            d = wm.getDefaultDisplay();
            int h = d.getHeight();
            int w = d.getWidth();
            BitmapFactory.Options opt = new BitmapFactory.Options();
            opt.inSampleSize = 1 ;
            while ( (opt.outWidth/opt.inSampleSize) > w ||
                                opt.outHeight/opt.inSampleSize) > h)
{
                opt.inSampleSize <<= 1 ;
            }
            opt.inJustDecodeBounds = false;
            bm = BitmapFactory.decodeStream(is, null, opt);


In the above the either I will get OutOfMemoryError or decoded bitmap
dimension is same as the original image.


There is bug reported on it, I found it later
http://code.google.com/p/android/issues/detail?id=2793

Thanks,
With Regards
Muniraju



On Jul 22, 8:28 pm, "Justin (Google Employee)" <[email protected]>
wrote:
> What do you mean by 4MB? My guess is that this is the file size. The
> file size is not relevant for displaying an image, what matters are
> its dimensions, what are the dimensions?
>
> Each process in Android has a limit of 16MB of memory. Due to process
> overhead this really means you have up to 14MB of usable memory. Each
> pixel of an image displayed takes a certain amount of memory, so there
> is an absolute size you can display. Now, Android phones to date have
> a maximum screen resolution of 320x480. If your source image file is
> larger than this, you should use BitmapFactory's options to scale it
> down as its turned into a Bitmap.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Jul 17, 5:45 am, Muniraju <[email protected]> wrote:
>
>
>
> > This is with reference 
> > tohttp://groups.google.com/group/android-developers/browse_thread/threa....
>
> >Largegifimages of size more than 4MB can not displayed in android.
>
> > Is this is a known issue in android?
>
> > Thanks,
> > With Regards
> > Muniraju
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to