How to change colormatrix x,y coordinate of image?

757 views Asked by At

I am developing an app which allows users to color the images. I have the color matrix of the color I want to apply but the problem is instead of changing color of x y coordinates whole image gets colored. I don't know how to apply the colormatix to specified coordinates of the image.

I am using

matrix = 
    new float[] { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, };

imageview.setColorFilter(new ColorMatrixColorFilter(matrix));

I am looking for something like imageview.SetPixelColorMatrix(x,y,matrix)

Can anyone help me?

1

There are 1 answers

0
garima On BEST ANSWER

use createBitmap (Bitmap source, int x, int y, int width, int height, Matrix m, boolean filter) here you can specify the co-ordinates of the source.for further details see this.