We provide complete mobile and web apps development solutions

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 

Related Posts:

  • Creating Bitmap To Create Bitmap  Bitmap bmp = Bitmap.createBitmap((int) getWindowManager().getDefaultDisplay().getWidth(), (int) getWindowManager().getDefaultD… Read More
  • Graphics !-- google_ad_client = "ca-pub-4378340310740210"; /* mobengineers-textadd */ google_ad_slot = "5441607071"; google_ad_width = 336; google_ad_height = … Read More

0 coment�rios:

Post a Comment

Online Training

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

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts