Learn Android for Free,issues for developers, mobengineers website provide complete solutions for developers issues posts.It also provides online training for android development

Tuesday, January 22, 2013

Creating Bitmap

To Create Bitmap 
Bitmap bmp = Bitmap.createBitmap((int)
getWindowManager().getDefaultDisplay().getWidth(), (int)
getWindowManager().getDefaultDisplay().getHeight(), Bitmap.Config.ARGB_8888);

To create Bitmap from resources

Bitmap image=BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher); 

Bitmap Configurations:
ALPHA_8  : 8 bits on Alpha channel, and no other colours.
ARGB_4444: 4 bits per color channel includes alpha,

ARGB_8888: 8 bits per color channel includes alpha,
RGB_565  : 5 bits for Red,6 bits for Green,5 bits for Blue 

0 coment�rios:

Post a Comment

20% off

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

NDTV Gadgets360

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts