Android - ColorMatrixColorFilter vs setpixel?

138 Views Asked by At

I want to implement convert a Bitmap from color to gray.

First I using two for-loop to set each pixel with (R+G+B)/3,

After using ColorMatrixColorFilter with ColorMatrix.setSaturation(),

the performance is better than setpixel.

But why the setpixel method is slower than using ColorMatrixColorFilter? Thanks.

0

There are 0 best solutions below