fork download
  1. from PIL import Image
  2. import struct
  3. import sys
  4.  
  5. import os
  6. dosya = os.path.join(os.curdir, os.sep, 'LockBackground.cpbitmap')
  7.  
  8. with open(dosya) as f:
  9. contents = f.read()
  10.  
  11.  
  12. unk1, width, height, unk2, unk3, unk4 = struct.unpack('<6i', contents[-24:])
  13. im = Image.fromstring('RGBA', (width,height), contents, 'raw', 'RGBA', 0, 1)
  14. im.save('converted.png')
Runtime error #stdin #stdout #stderr 0.04s 11792KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 8, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/LockBackground.cpbitmap'