I'm working on a new project that requires a few layers of blending
(It's an OpenGL app), and I'm discovering that the PNG loader used by
Bitmap seems to always load the PNG with premultiplied alpha.  I've
spent all evening confirming the values being saved out are correct,
and the PNG spec itself declares that alpha should never be
premultiplied.

I need to mask out background elements with a blend function like
GL_ONE GL_ONE_MINUS_SRC_ALPHA, but the color math can't be done with
premultiplied alpha... a lot of very useful blends go away in this
case actually, and none of the other formats support a full alpha
channel.

I found a thread about this from over a year ago that pretty quickly
reduced to an argument of the merits of premultiplied alpha vs non-
premultiplied alpha.  Is there any way to load a PNG file into an
OpenGL texture without modifying the colors like this?

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