From 4fed55b4278f9d9d623c836a561b1801c0eb18be Mon Sep 17 00:00:00 2001 From: ClF3 Date: Mon, 22 Jan 2024 16:01:09 +0800 Subject: [PATCH] edit --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index b4f661a..666c071 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ from datetime import datetime recent=[] history=[] width=720 -height=100 +height=50 red=(0x00,0x00,0xff) orange=(0x00,0x66,0xff) yellow=(0x00,0xcc,0xff) @@ -21,7 +21,7 @@ def update_history(): history.append(average) def fill(img,pos,color): for i in range(5): - for j in range(100): + for j in range(height): img[j,i+5*pos,:]=[color[0]%256,color[1]%256,color[2]%256] def update_graph(): img=np.ones([height,width,3],dtype=np.uint8) @@ -36,7 +36,7 @@ def update_graph(): fill(img,i,light_green) else: fill(img,i,green) - cv2.imwrite("image.bmp", img) + cv2.imwrite("image.png", img)