文章参考,代码引用
ref1: 流弊了!竟然用Python做一个炫酷的小姐姐动态壁纸_cainiao_python的博客-优快云博客 https://blog.youkuaiyun.com/cainiao_python/article/details/106561410?ivk_sa=1024320u
ref2: (5 条消息) Python怎样实现Wallpaper Engine? - 知乎 https://www.zhihu.com/question/381460573
原文章,作者 构思精巧,实现也诱人, 遂逐之
代码
import pyglet
from PIL import ImageSequence,Image
import win32gui, win32ui, win32con
class AnimationSrn:
def __init__(self):
parenthwnd = self.getScreenHandle()
print(parenthwnd )
left, top, right, bottom = win32gui.GetWindowRect(parenthwnd)
self.size = (right - left, bottom -top)
self.gifpath = self.resizeGif()
def frameIterator(self, frames):
for frame in frames:
framecopy = frame.copy(