Use /tmp for temp jpeg

This commit is contained in:
iabdalkader 2014-06-28 19:55:56 +02:00
parent 94c46ab309
commit 3bed5f4b6f

View File

@ -107,8 +107,8 @@ def fb_dump():
if (size[2] > 2):
try:
#img = Image.frombytes("RGB", (size[0], size[1]), buff, "jpeg", "RGB", "")
__write_img(buff, "swap.jpeg")
img = Image.open("swap.jpeg")
__write_img(buff, "/tmp/swap.jpeg")
img = Image.open("/tmp/swap.jpeg")
buff = np.fromstring(img.tobytes(), dtype=np.uint8)
except Exception, e:
print "JPEG decode error (%s)"%e