Android - setColorFilter on Bitmap Doesn't Work
===

Is there a reason why the code below does not make any changes to the source bitmap mBitmap? mBitmap is a greyscale image that I would like to apply a color filter to. The filter itself is unimportant, but any color filter that I apply to it has no effect. What gets drawn to the screen is the original bitmap as though I applied no filter to it.

I can apply different color filters to it, such as:

    mPaint.setColorFilter(new LightingColorFilter(Color.RED, 100));

But when I create a color filter from a color matrix, I get nothing.

I am using Android 2.3.


My Code:

    float[] mat = new float[] {
            1f, 0f, 0f, 0f, 1f,
            2f, 0f, 2f, 1f, 0f,
            1f, 1f, 0f, 0f, 0f,
            0f, 0f, 0f, 1f, 0f,
            2f, 0f, 0f, 0f, 1f };

    ColorMatrix colorMatrix = new ColorMatrix(mat);
    ColorMatrixColorFilter colorFilter = new ColorMatrixColorFilter(colorMatrix);

    mPaint.setColorFilter(colorFilter);

    mCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    mCanvas.drawBitmap(mBitmap, 0, 0, mPaint);

