Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import ctypes
- import os
- import time
- from PIL import Image
- #from libsoul import stem
- soFile = ctypes.CDLL('/home/scratch/mp3/get_screen.so')
- def getScreen(disp,ox,oy,lx,ly):
- size = lx * ly
- objlength = size * 3
- soFile.get_screen.argtypes = []
- result = (ctypes.c_ubyte*objlength)()
- soFile.get_screen(disp, ox, oy, lx, ly, result)
- return Image.frombuffer('RGB', (lx, ly), result, 'raw', 'RGB', 0, 1)
Add Comment
Please, Sign In to add comment