Change to ppm format from png to get better performance

This commit is contained in:
PySimpleGUI 2021-06-19 18:16:51 -04:00
parent 738f2658e4
commit 8823936fc2
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def main():
break
ret, frame = cap.read()
imgbytes=cv2.imencode('.png', frame)[1].tobytes()
imgbytes=cv2.imencode('.ppm', frame)[1].tobytes()
if a_id:
graph_elem.delete_figure(a_id) # delete previous image
a_id = graph_elem.draw_image(data=imgbytes, location=(0,0)) # draw new image