title: Upload resized image to S3
body: <p>I'm trying to upload resized image to S3:</p>
  
  <pre><code>fp = urllib.urlopen('http:/example.com/test.png')
  img = cStringIO.StringIO(fp.read())
  
  im = Image.open(img)
  im2 = im.resize((500, 100), Image.NEAREST)  
  AK = 'xx' # Access Key ID 
  SK = 'xx' # Secret Access Key
  
  conn = S3Connection(AK,SK) 
  b = conn.get_bucket('example')
  k = Key(b)
  k.key = 'example.png'
  k.set_contents_from_filename(im2)
  </code></pre>
  
  <p>but I get an error:</p>
  
  <pre><code> in set_contents_from_filename
      fp = open(filename, 'rb')
  TypeError: coercing to Unicode: need string or buffer, instance found
  </code></pre>