Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
scaled image to fit display area
  • Loading branch information
argus1 authored Dec 21, 2024
1 parent 1be2078 commit 16af4f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def update_frame():
frame_index = (frame_index + 1) % len(shear_right)
set_leds(direction)

# Resize the frame to fit the canvas
frame = frame.resize((root.winfo_screenwidth(), root.winfo_screenheight()), Image.ANTIALIAS)

# Convert PIL image to Tkinter PhotoImage
tk_image = ImageTk.PhotoImage(frame)

Expand Down

0 comments on commit 16af4f3

Please sign in to comment.