title: Changing random pixels in a picture, python
body: <p>I want to write a function that will create a random number (between m and n, inclusive) of stars in the sky of this picture (<a href="http://tinypic.com/r/34il9hu/6" rel="nofollow">http://tinypic.com/r/34il9hu/6</a>). I want the stars should be randomly composed of either a single white pixel, or a square of 4 adjacent white pixels.I also do not want to place a 'star' (of 1 pixel) over the tree branches, the moon or the bird though</p>
  
  <p>How would I do this in python? Can anyone help? Thanks!</p>
  
  <p>I have this so far:</p>
  
  <p>I have started and have come out with this so far, I don't know if any of it is right or even if I am on the right track though:</p>
  
  <pre><code>def randomStars(small, large):
     import random
     file = pickAFile()
     pic = makePicture(myPic)
     #x = random.randrange(getWidth(pic))
     #y = random.randrange(getHeight(pic))
     for pixel in pic.getAllPixels():
        if random.random() &lt; 0.25:
           pixel.red = random.randint(256)
           pixel.green = random.randint(256)
           pixel.blue = random.randint(256) 
     show(pic)
  </code></pre>
  
  <p>I have no clue what I am doing :(</p>