Created
May 5, 2017 04:53
-
-
Save fy0/7c9d725ab4aaf5eb36c6df54e0dfd5f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
from PIL import Image | |
fp = open('myshot.raw', 'rb') | |
size = struct.unpack('II', fp.read(8)) | |
img = Image.frombytes('RGBA', size, fp.read()) | |
img.save('out.bmp') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment