Sunday, September 2, 2012

Re: [android-developers] Re: PNG loading that doesn't premultiply alpha?

Hi,

I think it would make sense that either Bitmap could be without premultiplied alpha, or GLUtils.texImage2D method could take as parameter whether to load with or without premultiplied alpha. Since you say Bitmaps will never be without premultiplied alpa, I suggest the latter, plus as you suggest a convenience method on the Bitmap, which returns its content in an array without premultiplied alpha.

It makes sense to me to add the option to GLUtils.texImage2D since the very purpose of the GLUtils class is '... to help bridging OpenGL ES and Android APIs.' (javadoc class reference).

Cheers Alex

On Friday, 29 June 2012 21:18:59 UTC+2, Romain Guy (Google) wrote:
Another big issue similar to alpha-premultiply is that 32Bit ARGB Images are changed
to 16Bit after scaling (especially if all alpha values are 255), without some dirty tricks.
This is a big issue to, it's far away from the precission needed for good normal mapping.

There was a bug in the scaling code that I fixed. a 32 bits image will now always be scaled to another 32 bits image.
 

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

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment