Thanks Streets of Boston. Your comment pointed me in the right
direction.

The documentation of Drawable is heavily lacking about this.

On Dec 29, 3:46 pm, Streets Of Boston <[email protected]> wrote:
> I had something similar. But Android wasn't resizing the bitmap.
>
> DoingbitmapDrawable.getBitmap().getWidth() 
> andbitmapDrawable.getBitmap().getHeight() returned the expected values
> (in your case those would be 480 and 320). However, i loaded the
> bitmap seperately and then wrapped it within a BitmapDrawable. Still,
> the bitmapDrawable.getIntrinsicWidth/Height returned these scaled
> values (320 x 213 in your case).
>
> On Dec 29, 2:49 am, Hermes Pique <[email protected]> wrote:
>
> > I want to display a 480x320 JPEG file stored in the SD card in Android
> > 2.0.1 with WVGA854 skin and 240 lcd density (Motorola Droid).
>
> > However, when I create a BitmapDrawable through Drawable.createFromPath
> > (), the resulting BitmapDrawable has the following values:
>
> > mBitmapWidth = 320
> > mBitmapHeight = 213
> > mTargetDensity = 160
>
> > The manifest includes the following configuration:
>
> >     <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /
>
> >     <supports-screens
> >         android:largeScreens="true"
> >         android:normalScreens="true"
> >         android:smallScreens="true"
> >         anyDensity="true"
> >     />
>
> > Apparently Android is resizing the bitmap. What could be the cause of
> > this behavior? How can I avoid it?
>
> > Thank you in advance.
>
>

-- 
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