The ColorFilter you apply to a BitmapDrawable isn't applied directly to the
Bitmap, it's applied to the Paint used to render the Bitmap. To get an
equivalent Bitmap:
  * Create a new Bitmap of the same width, height and Config
  * Create a Canvas over the new Bitmap
  * Call BitmapDrawable.draw(Canvas)

The new Bitmap should now contain what you want.

Tom

2009/5/26 guruk <[email protected]>

>
> :) Hi Tom,
>
> indeed, look good, but it looks it does not include my manipulations I
> did on the Drawable
>
> Bitmap BitmapOrg = BitmapFactory.decodeResource
> (resources,R.drawable.mydaysminipic_td);        //its a green icon on a
> transparent background
> BitmapDrawable bmd = new BitmapDrawable(BitmapOrg); // to
> BitmapDrawable
> bmd.setColorFilter(0xffff00ff,Mode.SRC_ATOP);  //manipulating the
> Bitmapdrawable to make all nontransparent pixels Blue
> //when i just test the Drawable its fine !!
>
> updateViews.setImageViewBitmap(draws2[i + 10], bmd.getBitmap());
> But bmd.getBitmap() just give me original (maybe underlying Bitmap)..
> but how to get the DrawAble I created?
>
> many Thanks...
>
> Greets
> Chris
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to