Greets,

This is not a new bug, but it needs to at least be reviewed and has
been open for 5 months without review. It is one that is causing some
consternation here. While updating a 1.1 OpenGL app to the 1.6 API
things failed to work because some PNGs are not loading and "getConfig
()" returns null. The bitmap is constructed and "getWidth()" /
"getHeight()" returns the proper values, but there is no
"Bitmap.Config" attached to the bitmap.

I am using the standard "BitmapFactory.decodeResource()" method and
have detailed things in the bug as an additional comment:
http://code.google.com/p/android/issues/detail?id=2628

My review is posted below as well:
I too see this problem with the 1.6_r1 API/SDK running against 1.5 and
1.6 platforms
and on devices G1 (1.6 firmware) and Ion (1.5 firmware). I was
updating an OpenGL app
circa 1.1 API and it broke when "getConfig()" on all pngs w/
transparency loaded with
"decodeResource" returns null. This causes "GLUtil" to fail in my case
I was using
"GLUtils.getType()" with a message "Unknown internalformat".

I tried various versions of pngs modified with Photoshop using both
the "save as web"
and "save as" to no result. I can copy the "broken pngs" to a known
working fresh
Android 1.6 app and they fail to load. The really weird thing is that
I can create a
new png the same size as one that fails to load and copy (image copy
in Photoshop)
3/4 of the broken png to the new png and it will load and with
ARGB_8888
transparency. If I copy (image copy) the entire broken png simply by
using select all
then saving it as a new png in Photoshop it fails to load with
"decodeResource".

This is not an OpenGL ES bug and is a problem with "decodeResource".
Pngs that don't
have a valid config don't work with 2D Android graphics either.

Google devs please comment on a work around as it now seems loading
pngs is broken
badly with default usage of "BitmapFactory.decodeResource". Granted
the bug can
perhaps even be located in the build tools. This bug should not go
unnoticed/unfixed
and that it has been known to exist since May without review is not
good! Loading pngs should not be
have indeterminate results!

I am working on Windows with the 1.6_r1 API.


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