Image noise: Difference between revisions
Content deleted Content added
m →{{header|OCaml}}: fmt |
|||
Line 415: | Line 415: | ||
self.ta = time.time() |
self.ta = time.time() |
||
# 13 FPS boost. half integer idea from C#. |
# 13 FPS boost. half integer idea from C#. |
||
self.img.putdata([(255,255,255) if random.random() > 0.5 else ( for i in range(pixels)]) |
self.img.putdata([(255,255,255) if random.random() > 0.5 else (0,0,0) for i in range(pixels)]) |
||
self.pimg = ImageTk.PhotoImage(self.img) |
self.pimg = ImageTk.PhotoImage(self.img) |
||
self.label["image"] = self.pimg |
self.label["image"] = self.pimg |