Create a bitmap with custom config

All your problems with Audio, Video and Images.

Create a bitmap with custom config

Postby marcelloma » Thu May 07, 2009 10:02 pm

Is there a function to create a "Bitmap" from a R.drawable.x object and setting the Bitmap.Config too?
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Bitmap.Config   ALPHA_8          
  2.  
  3. Bitmap.Config   ARGB_4444        
  4.  
  5. Bitmap.Config   ARGB_8888        
  6.  
  7. Bitmap.Config   RGB_565        
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


There are many combinations of Bitmap.createBitmap and BitmapFactory.decodeResource but none of them includes both resource id and Bitmap.Config :/ and I think a double step is very expensive in this case.
marcelloma
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Mar 18, 2009 4:31 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 13 guests