title: <read-write buffer ptr 0x00, size 855 at 0x00> python
body: <p>So i have a piece of code that looks like this:  </p>
  
  <p><code>&lt;read-write buffer ptr 0x000000000286AB78, size 855 at 0x000000000286AB40&gt;</code>  </p>
  
  <p>I think it should be an image file :)</p>
  
  <p>I look around and found some links to <code>memoryview</code> but looking at the documentation didn't seem like it would be what im after. Of course im rather new to programming.</p>
  
  <p>I would like to save the file to a folder so that i could see the picture. =)</p>
  
  <p>Anyone has idea how to solve this?</p>
  
  <p>you can get access to it with this code, only replace [USERNAME] with your username:</p>
  
  <pre><code>import shutil
  import os
  
  shutil.copy('C:\Users\[USERNAME]\AppData\Local\Google\Chrome\User Data\Default\Favicons','C:\Users\[USERNAME]\Desktop')
  con = sqlite3.connect('C:\Users\[USERNAME]\Desktop\Favicons')
  cursor = con.cursor()
  icon=''
  for i in  cursor.execute("SELECT * FROM favicons WHERE id&lt;6 limit 5;"): 
      icon= i,'favicons'
  print('\n')
  con.close()
  os.remove('C:\Users\[USERNAME]\Desktop\Favicons')
  </code></pre>
  
  <p>--- ANSWER ----</p>
  
  <pre><code>import StringIO
  from PIL import Image
  file_ = StringIO.StringIO(icon)
  image = Image.open(file_)
  size=(128,128)
  image=image.resize(size,Image.BILINEAR)
  image.save('C:\icon.JPEG', 'JPEG')
  </code></pre>
  
  <p>Thanks for ideas :) </p>