1
For each pixel in pic:
r= random()
if r < 0.25:
set the red level to randrange(0,256),
set the green level to randrange(0,256)
set the blue level to randrange(0,256)
看不見的代碼的其餘部分是正確的,我只是無法弄清楚如何將該功能短語足夠好以使其可以工作。設置像素的RGB級別(Python,Jython)
「像素」的格式是什麼? – ezod 2010-01-28 21:56:33
您可以通過正確縮進來開始。標籤和空格的混合並不是一個好主意... – Thomas 2010-01-28 21:56:51
px在getPixels(圖片) – roger34 2010-01-28 22:03:21