title: Flipping image / mirror Image
body: <p>I need to write a function that get an image and return a mirror image (the Y coordinate never change), without using any mirror or flip 
  module from PIL.<br>
  I have to write it myself.
  I'm getting an error msg: </p>
  
  <pre><code>IndexError: image index out of range
  </code></pre>
  
  <p>what am I missing here?</p>
  
  <p>thank you.</p>
  
  <pre><code>from os.path import exists
  import tkMessageBox, tkFileDialog
  from PIL import Image, ImageTk, ImageFilter
  
  def flip(im):
      '''Flips a picutre horizontally, and returns a new image that is a mirror view of the original'''
      org=Image.open(im)
      new=Image.new("RGB",org.size)   
      for x in range(org.size[0]):
          a=org.size[0]
          for y in range(org.size[1]):
              pixel=org.getpixel((x,y))
              new.putpixel((a,y),pixel)
              a-=1
      new.save("new.bmp","bmp")
  </code></pre>