Update for PIL use tostring

This commit is contained in:
iabdalkader 2014-09-25 02:29:05 +02:00
parent d1c6f6451e
commit ec6630ca28

View File

@ -111,7 +111,7 @@ def fb_dump():
#print(size[0], size[1], size[2])
#__write_img(buff, "/tmp/swap.jpeg")
img = Image.frombuffer("RGB", (size[0], size[1]), buff, "jpeg", "RGB", "")
buff = np.fromstring(img.tobytes(), dtype=np.uint8)
buff = np.fromstring(img.tostring(), dtype=np.uint8)
except Exception, e:
print "JPEG decode error (%s)"%e
sys.exit(0)