Skip to main content
2 of 3
Routine clean-up
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

How to use manipulate to draw an image pixel by pixel

I want to draw an image pixel by pixel using Manipulate. My code almost works but it erases the old points each time.

image0 = Image[Table[0, {x, 1, 512}, {y, 1, 680}]]

Manipulate[
  ReplacePixelValue[image0, coordList[[i]] -> 1], 
  {i, 1, Length @ coordList}]

coordList is the list of the pixels that get changed from 0 to 1 in the image.