I don't think there's a bug there, but maybe it wasn't the right
filter for me.

I tried SRC_OVER. Here's the result:
http://tourizo.org/src_over.PNG
2 buttons. One is with the SRC_OVER applied with the color you
suggested.


This worked for me much better:
        iv.setColorFilter(_darkenColor, PorterDuff.Mode.MULTIPLY);
Where _darkenColor is defined like this:
        private final static int _darkenColor = Color.parseColor
("#FF808080");

Here's the result:
http://tourizo.org/multiply.PNG



On Feb 9, 8:22 am, Mike Reed <r...@google.com> wrote:
> Sounds like a bug: DARKEN should not alter a fully transparent pixel.
> I will try to reproduce. Does SRC_OVER + some shade of gray work for
> you, like 0x88888888)?
>
> On Sat, Feb 7, 2009 at 2:01 AM,Obormot<atru...@gmail.com> wrote:
>
> > Hi, guys.
>
> > I'm trying to make an image darker, but the image has some pixels
> > transparent. I want to keep those pixels intact. I tried DARKEN and
> > couple other filters, but they seem to alter transparent pixels as
> > well.
>
> > Do you know if there is a way to keep transparent pixels intact while
> > applying a color filter?
>
> > Sincerely,
> >  A.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to