diff --git a/main.py b/main.py index 6d38ddf..7b92a33 100644 --- a/main.py +++ b/main.py @@ -57,11 +57,20 @@ def get_track(): #screen.SetPixel(0,1,255,255,255) offset_x = 10 offset_y = 10 - for x in range(31): - for y in range(31): +# for x in range(31): +# for y in range(31): +# r, g, b = image.getpixel((x, y)) +# screen.SetPixel(x+offset_x,y+offset_y,r,g,b) + showImage(image) + print('image set') + +def showImage(image, offset_x = 0, offset_y = 0): + width, height = image.size + for x in range(width): + for y in range(height): r, g, b = image.getpixel((x, y)) screen.SetPixel(x+offset_x,y+offset_y,r,g,b) - print('image set') + #if token: # sp = spotipy.Spotify(auth=token)