aapt will optimize PNGs already, no need to do it in Photoshop. That
also means, for instance, that if your PNG does not have any
transparent pixel, aapt will detect that and turn your PNG into an
opaque PNG, hence giving you a 565 image. There are other
optimizations too (for instance, if you have < 256 colors, a paletted
image is generated.)

On Fri, May 14, 2010 at 2:36 PM, Robert Green <rbgrn....@gmail.com> wrote:
> I've been dealing with this issue for some time but it's really
> causing me problems today.
>
> Here's what I'm doing:
>
>
> BitmapFactory.Options opts = new BitmapFactory.Options();
> opts.inScaled = false;
> return BitmapFactory.decodeResource(context.getResources(),
> resourceId, opts);
>
> And on many PNGs exported from Photoshop using "save for web and
> devices" which is the optimized way to do it, I get a Bitmap that
> should be ARGB_8888 but ends up as RGB_565.  Not only that but
> Bitmap.getConfig() returns null on those, as if it didn't know what
> format it put it in.
>
> Gosh that seems buggy!
>
> Anyone have a good workaround for this which allows for loading
> unscaled bitmaps in their correct format (with transparency?)
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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

Reply via email to