python 动态壁纸

本文介绍了如何利用Python创建一款炫酷的动态壁纸。作者参考了CSDN上的相关教程和知乎上的讨论,通过精心构思和实现,展示了Python在桌面个性化方面的应用。
摘要由CSDN通过智能技术生成

文章参考,代码引用

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(
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值