Create Bitmap with alpha

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Create Bitmap with alpha

Postby marcelloma » Sun Mar 22, 2009 5:25 pm

I currently create a Bitmap image with

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. sprite = BitmapFactory.decodeResource(context.getResources(), resId);
  2.  
  3.                
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

But even though the png image has an alpha value it doesn't get recognized..how can I create a bitmap with an alpha channel?
Thanks :)
marcelloma
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Mar 18, 2009 4:31 pm

Top

Postby marcelloma » Sun Mar 22, 2009 6:02 pm

My bad, the image had an alpha channel but I hadn't set the trasparent color :)
marcelloma
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Mar 18, 2009 4:31 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: gurusiv and 3 guests