Java – Set the RGB color of a pixel in android?

Set the RGB color of a pixel in android?… here is a solution to the problem.

Set the RGB color of a pixel in android?

I

have a picture and I want to set the color of one and only one specific pixel to the RGB value.

First: How to select a pixel: pixelname = [5,6]// as the pixel in the third row of the fifth column

Second: how to set its color: pixelname.setrgb(30,20,60)//30,20,60 is the rgb color

Solution

Get the bitmap

that contains the pixel you want to change, and then use bitmap.setPixel(X, Y, Color) to change the color.

Related Problems and Solutions