interactive python wallpaper

31 views Asked by At

so I want to make an interactive wallpaper with python but I can't use the gif object directly and instead have to save it which makes it stutter or crash anyone know way to fix this?

from PIL import Image, ImageGrab
import ctypes
from time import sleep
from mouse import get_position as pos
gif = Image.open('giphy.gif')

while 1:
  for image in range(gif.n_frames):

    #gif=Image.new('RGBA',(1920,1080))
    #gif.paste(Image.open('3.png'),pos())
    gif.seek(image)
    gif.save(r'gif','PNG',quality=50)
    ctypes.windll.user32.SystemParametersInfoW(20, 0, r'C:\Users\Me_\Documents\pyprojects\wallpaper\gif', 3)

I've tried importing it into bytes but I'm pretty new so I'm sure a lot of you could do better

0

There are 0 answers