the sof asker
the sof asker

Reputation: 59

Setting RGB color of a certain pixel in android?

I have an image, and i want to set color of one and only one specific pixel to an rgb value.

first: How to choose a pixel: pixelname = [5,6] //as the pixel on the fifth column third row

Second: How to set its color: pixelname.setrgb(30,20,60) //30,20,60 are rgb colors

Upvotes: 3

Views: 1832

Answers (1)

Catalina
Catalina

Reputation: 2118

Get the bitmap containing the pixel you want to change and then change color using bitmap.setPixel(X, Y, Color).

Upvotes: 4

Related Questions