Merge pull request #4437 from PySimpleGUI/Dev-latest

Change to ppm format from png to get better performance
This commit is contained in:
PySimpleGUI 2021-06-19 18:17:07 -04:00 committed by GitHub
commit ba9c74d52e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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