• 周四. 4 月 23rd, 2026

物嫩软件资讯网

软件资讯来物嫩

python 动态壁纸

admin@wunen

5 月 28, 2025



文章参考,代码引用

ref1: 流弊了!竟然用Python做一个炫酷的小姐姐动态壁纸_cainiao_python的博客-CSDN博客 https://blog.csdn.net/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(

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注