hope everyone is doing fine.
i am building a program in jython. I have a picture that has random pixel change.
def setPixelToBlack(picture):
pixels = getPixels(picture)
for index in range(0,len(pixels)):
pixel = pixels[index]
color = makeColor(0,0,0)
setColor(pixel,color)
This will set the entire picture black. However, what I want to do is, there is a toss. If its heads, the pixel will change to black. If it is tails, the pixel color will remain same. This is to be done using import statement.
Aucun commentaire:
Enregistrer un commentaire