Guest User

Untitled

a guest
Jan 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import sqlite3
  2.  
  3. data = open('test.clip', 'rb').read()
  4. sqlite_head = data.index(b'SQLite format 3')
  5. with open('test.sqlite3', 'wb') as dbf:
  6. dbf.write(data[sqlite_head:])
  7. sqlite = sqlite3.connect('test.sqlite3')
  8. image_data = sqlite.execute('select ImageData from CanvasPreview').fetchone()[0]
  9. with open('test.png', 'wb') as imf:
  10. imf.write(image_data)
Add Comment
Please, Sign In to add comment