What is Bitmap.Config

Problems with Canvas, OpenGL, etc...

What is Bitmap.Config

Postby CrazyJay09 » Sun Aug 15, 2010 9:24 pm

Hello,

In the graphics section of the android developers guide here:
http://developer.android.com/guide/topics/graphics/index.html

There is a section on creating a bit map. The line of code is this:
Code: Select all
Bitmap b = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b)


What on earth is Bitmap.Config.ARGB_8888? The Android documentation mentions nothing of this.
CrazyJay09
Junior Developer
Junior Developer
 
Posts: 16
Joined: Wed Aug 04, 2010 3:23 am

Top

Re: What is Bitmap.Config

Postby pskink » Sun Aug 15, 2010 10:12 pm

ARGB means AlphaRedGreenBlue 8888 means 8 bits for Alpha 8 bits for Red etc etc
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Re: What is Bitmap.Config

Postby CrazyJay09 » Sun Aug 15, 2010 10:35 pm

Oh, that makes sense.

I don't understand why the Android documentation doesn't have this explanation. Not like it's complicated.
CrazyJay09
Junior Developer
Junior Developer
 
Posts: 16
Joined: Wed Aug 04, 2010 3:23 am

Re: What is Bitmap.Config

Postby jonbonazza » Sun Aug 15, 2010 10:58 pm

It does.

http://developer.android.com/reference/ ... onfig.html

at the top under the Enums section.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

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

Who is online

Users browsing this forum: No registered users and 3 guests