中等难度——python实现电子宠物和截图工具

import io  # 文件处理
import nt  # windows nt 库直接获取对应的磁盘空间
import time  # 时间
import zlib  # 加解密
import ctypes  # 调用
import struct  # 处理字节二进制
import base64  # 编解码
import threading  # 线程
import tkinter as tk  # tk
from datetime import datetime  # 时间
from tkinter import PhotoImage, filedialog

"""公用参数"""
gdi32 = ctypes.windll.gdi32
user32 = ctypes.windll.user32

# 定义常量
SM_CXSCREEN = 0
SM_CYSCREEN = 1

# 缩放比例
zoom = 1
screenWidth = int(user32.GetSystemMetrics(SM_CXSCREEN) * zoom)
screenHeight = int(user32.GetSystemMetrics(SM_CYSCREEN) * zoom)

SRCCOPY = 0x00CC0020

"""全局变量"""

# 全屏截图
hdc_dest, old_bmp, hwnd, hdc_src, bmp = None, None, None, None, None
# 剪切图片
hdc_copy, old_bitmap, hbitmap = None, None, None
# 图片数据
image_data = None
# 像素数据
b_stream = None
# 绘画层
canvas = None
# 交互层
popup = None
# 全部层
root = None
# 判断跳出
times = None


# 清理全部
def CleanScreen():
    global hdc_dest, old_bmp, hwnd, hdc_src, bmp, hdc_copy, old_bitmap, hbitmap
    # 恢复设备上下文
    gdi32.SelectObject(hdc_dest, old_bmp)
    gdi32.SelectObject(hdc_copy, old_bitmap)
    # 删除内存设备上下文
    gdi32.DeleteDC(hdc_dest)
    gdi32.DeleteDC(hdc_copy)
    # 释放桌面窗口的设备上下文
    user32.ReleaseDC(hwnd, hdc_src)
    # 处理位图
    gdi32.DeleteObject(bmp)
    gdi32.DeleteObject(hbitmap)
    hdc_dest, old_bmp, hwnd, hdc_src, bmp, hdc_copy, old_bitmap, hbitmap = None, None, None, None, None, None, None, None


## gif动态
class GifPlayer:
    def __init__(self, root, label_widget):
        self.root = root
        self.label_widget = label_widget
        self.frames = []
        self.frame_index = 0
        self.update_delay = 300  # 毫秒

        p1 = "iVBORw0KGgoAAAANSUhEUgAAAHMAAAAyCAYAAABvR+QvAAAKBUlEQVR4nO1b7VMT2xn/nU02CQSQGBDFNwRRu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fhwrdbDgcLopD2WwWd+7cAVBwZ8lkkqyFejKZNH+vV8xcWFgwz8NOTU3Z5r116xaAQhZsbSNyVO16mVY4zrEWcPpOsALYjGl9g0vdaHNzc02VCaKDYIBzK9CK1Xye0BAIIp1O4+efJ8njXV3zwjAyULIqFhPVfYBrM2Y6ncbU1BTt3/+VfuS5ShARvXr1qmI+JcsQm1+Ax0MwsDpnlFdy0FQPenqcDzeXC0dmTdOIx8RvfXszl8vB5/NhenoanZ2dv6gXuI466qijjorwP+AbSqBrhV82AAAAAElFTkSuQmCC"

        ## 遍历图片
        list_name = ["p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10"]
        list_str = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]
        list_all = []
        for i in range(10):
            photo = tk.PhotoImage(name=list_name[i], data=base64.b64decode(list_str[i]))
            list_all.append(photo)

        # 获取所有帧
        self.frames = list_all

        # 初始化显示第一帧
        self.label_widget.config(image=self.frames[0])
        self.label_widget.image = self.frames[0]

        # 绑定拖动事件
        self.label_widget.bind("<ButtonPress-1>", self.on_press)
        self.label_widget.bind("<ButtonRelease-1>", self.on_button_release)

        # 开始动画
        self.play_gif()

    def play_gif(self):
        if self.frame_index < len(self.frames):
            self.label_widget.config(image=self.frames[self.frame_index])
            self.frame_index += 1
            self.root.after(self.update_delay, self.play_gif)
        else:
            self.frame_index = 0
            self.root.after(self.update_delay, self.play_gif)

    def on_press(self, event):
        # 记录鼠标按下时的位置
        self.start_x = event.x
        self.start_y = event.y
        self.initial_x = self.root.winfo_x()
        self.initial_y = self.root.winfo_y()

    def on_button_release(self, event):
        # 计算鼠标移动的距离
        delta_x = event.x - self.start_x
        delta_y = event.y - self.start_y

        # 更新窗口位置
        self.root.geometry(f'+{self.initial_x + delta_x}+{self.initial_y + delta_y}')


## 获取cpu和内存的使用率
class FILETIME(ctypes.Structure):
    _fields_ = [("dwLowDateTime", ctypes.c_ulong),
                ("dwHighDateTime", ctypes.c_ulong)]


class SYSTEMTIME(ctypes.Structure):
    _fields_ = [("wYear", ctypes.c_ushort),
                ("wMonth", ctypes.c_ushort),
                ("wDayOfWeek", ctypes.c_ushort),
                ("wDay", ctypes.c_ushort),
                ("wHour", ctypes.c_ushort),
                ("wMinute", ctypes.c_ushort),
                ("wSecond", ctypes.c_ushort),
                ("wMilliseconds", ctypes.c_ushort)]


class MEMORYSTATUSEX(ctypes.Structure):
    _fields_ = [("dwLength", ctypes.c_ulong),
                ("dwMemoryLoad", ctypes.c_ulong),
                ("ullTotalPhys", ctypes.c_ulonglong),
                ("ullAvailPhys", ctypes.c_ulonglong),
                ("ullTotalPageFile", ctypes.c_ulonglong),
                ("ullAvailPageFile", ctypes.c_ulonglong),
                ("ullTotalVirtual", ctypes.c_ulonglong),
                ("ullAvailVirtual", ctypes.c_ulonglong),
                ("ullAvailExtendedVirtual", ctypes.c_ulonglong)]


## 调用dll
kernel32 = ctypes.windll.kernel32


## 获取cpu使用率
def get_cpu_usage():
    def get_cpu_times():
        idle_time = FILETIME()
        kernel_time = FILETIME()
        user_time = FILETIME()
        kernel32.GetSystemTimes(ctypes.byref(idle_time), ctypes.byref(kernel_time), ctypes.byref(user_time))
        return (idle_time, kernel_time, user_time)

    def filetime_to_seconds(ft):
        return (ft.dwHighDateTime * 0x100000000 + ft.dwLowDateTime) / 1e7

    (idle1, kernel1, user1) = get_cpu_times()
    time.sleep(1)
    (idle2, kernel2, user2) = get_cpu_times()

    idle_diff = filetime_to_seconds(idle2) - filetime_to_seconds(idle1)
    system_diff = (filetime_to_seconds(kernel2) - filetime_to_seconds(kernel1)) + \
                  (filetime_to_seconds(user2) - filetime_to_seconds(user1))

    return float("{:.1f}".format((1.0 - idle_diff / system_diff) * 100.0))


## 获取内存使用率
def get_memory_usage():
    mem_info = MEMORYSTATUSEX()
    mem_info.dwLength = ctypes.sizeof(MEMORYSTATUSEX)
    kernel32.GlobalMemoryStatusEx(ctypes.byref(mem_info))
    return float(mem_info.dwMemoryLoad)


## 启动tk的gui
def main():
    top = tk.Tk()
    top.title("GIF 动画播放器")
    top.overrideredirect(True)  # 无边框
    bg_color = '#FFFFF1'
    top.config(bg=bg_color)  # 背景色
    top.wm_attributes('-transparentcolor', bg_color)
    top.wm_attributes("-topmost", True)  # 窗口置顶
    top.attributes('-alpha', 1)  # 设置透明度,0.0 完全透明,1.0 完全不透明

    # 获取屏幕宽度和高度
    screen_width = top.winfo_screenwidth()
    screen_height = top.winfo_screenheight()

    # 窗口大小为300x200
    window_width = 300
    window_height = 200

    # 计算窗口位置,使其出现在右下角
    x_position = screen_width - window_width
    y_position = screen_height - window_height

    # 设置窗口的初始位置和大小
    top.geometry(f'{window_width}x{window_height}+{int(x_position)}+{int(y_position)}')

    # 创建Label来显示GIF
    label = tk.Label(top, bg=bg_color)
    label.pack(expand=True, fill='both')  # 确保Label填充整个窗口

    # 初始化GifPlayer
    GifPlayer(top, label)

    # 显示时间的Label
    time_label = tk.Label(top, bg=bg_color, fg='white', font=('Arial', 12))
    time_label.place(x=window_width // 2 - 50, y=50)

    ## 更新时间
    def update_time():
        # 获取当前时间并格式化为 时:分:秒
        current_time = datetime.now().strftime('%H:%M:%S')
        # 更新时间标签的文本
        time_label.config(text=current_time)
        # 每秒调用一次自己以更新时间
        top.after(1000, update_time)

    update_time()

    ## 状态显示
    status_show = tk.Label(top, bg=bg_color, fg='white', font=('Arial', 10))
    status_show.place(x=window_width // 2 + 60, y=55)

    ## 更新状态
    def update_status_show():
        def update_status():
            ## 状态更新
            cpu_status = get_cpu_usage()
            memory_status = get_memory_usage()
            total, free = nt._getdiskusage('C:/')
            disk_status = free / (2 ** 30)
            ## 颜表情表现
            list_emote = ["(^▽^)", "(⊙_⊙)", "(一_一)", "(一_一)!", "(╥_╥)"]
            if 0 <= cpu_status < 20:
                string_status = list_emote[0]
            elif 20 <= cpu_status < 40:
                string_status = list_emote[1]
            elif 40 <= cpu_status < 60:
                string_status = list_emote[2]
            elif 60 <= cpu_status < 80:
                string_status = list_emote[3]
            elif 80 <= cpu_status <= 100:
                string_status = list_emote[4]
            status_text = "CPU:{0:.1f}%\n内存:{1:.1f}%\n磁盘C:{2:.1f}G\n{3}\n".format(cpu_status, memory_status,
                                                                                      disk_status, string_status)
            # 更新文本
            status_show.config(text=status_text)

        status_thread = threading.Thread(target=update_status)
        # 启动线程
        status_thread.start()
        # 自调用更新
        top.after(2000, update_status_show)

    ## 状态更新
    update_status_show()

    ## 点击处理
    def on_button_click():
        def screenshot():
            """常用函数"""

            # 销毁共用组件
            def destroy():
                global canvas, popup, root
                if canvas:
                    canvas.destroy()
                if popup:
                    popup.destroy()
                if root:
                    root.destroy()

            """实现函数"""

            # 全屏截图
            def Full_screen_capture(x, y, width, height):
                global hdc_dest, old_bmp, hwnd, hdc_src, bmp
                # 获取桌面窗口句柄
                hwnd = user32.GetDesktopWindow()
                # 获取桌面窗口的设备上下文
                hdc_src = user32.GetDC(hwnd)
                if len(str(hdc_src)) > 16:
                    user32.ReleaseDC(hwnd, hdc_src)
                    print("获取失败")
                    return
                print(hwnd)
                print(hdc_src)
                # 创建一个与屏幕兼容的内存设备上下文
                hdc_dest = gdi32.CreateCompatibleDC(hdc_src)

                # 创建一个位图
                bmp = gdi32.CreateCompatibleBitmap(hdc_src, width, height)

                # 将位图选入内存设备上下文
                old_bmp = gdi32.SelectObject(hdc_dest, bmp)

                """
                    gdi32.BitBlt(hdc_src,  # 目标设备上下文  
                             x_dest,   # 目标矩形左上角的x坐标  
                             y_dest,   # 目标矩形左上角的y坐标  
                             width,    # 宽度  
                             height,   # 高度  
                             hdc_dest, # 源设备上下文  
                             x_src,    # 源矩形左上角的x坐标(通常是0)  
                             y_src,    # 源矩形左上角的y坐标(通常是0)  
                             SRCCOPY)  # 复制选项
                """
                # 捕获屏幕
                gdi32.BitBlt(hdc_dest, 0, 0, width, height, hdc_src, x, y, SRCCOPY)

            # 制作图片
            def png_image(width, height):
                global image_data, hdc_src, bmp, b_stream
                if len(str(hdc_src)) > 16:
                    user32.ReleaseDC(hwnd, hdc_src)
                    print("获取失败")
                    return

                # 定义 RGBQUAD 结构体
                class RGBQUAD(ctypes.Structure):
                    _fields_ = [("rgbBlue", ctypes.c_ubyte),
                                ("rgbGreen", ctypes.c_ubyte),
                                ("rgbRed", ctypes.c_ubyte),
                                ("rgbReserved", ctypes.c_ubyte)]

                # 定义 BITMAPINFOHEADER 结构体
                class BITMAPINFOHEADER(ctypes.Structure):
                    _fields_ = [("biSize", ctypes.c_uint),
                                ("biWidth", ctypes.c_int),
                                ("biHeight", ctypes.c_int),
                                ("biPlanes", ctypes.c_ushort),
                                ("biBitCount", ctypes.c_ushort),
                                ("biCompression", ctypes.c_uint),
                                ("biSizeImage", ctypes.c_uint),
                                ("biXPelsPerMeter", ctypes.c_int),
                                ("biYPelsPerMeter", ctypes.c_int),
                                ("biClrUsed", ctypes.c_uint),
                                ("biClrImportant", ctypes.c_uint)]

                # 定义 BITMAPINFO 结构体
                class BITMAPINFO(ctypes.Structure):
                    _fields_ = [("bmiHeader", BITMAPINFOHEADER),
                                ("bmiColors", RGBQUAD * 3)]  # 只分配了3个RGBQUAD的空间

                BI_RGB = 0
                DIB_RGB_COLORS = 0

                # 分配像素数据缓冲区(这里以24位位图为例,每个像素3字节)
                pixel_data = (ctypes.c_ubyte * (width * height * 3))()  # 4
                # 转换bytes
                # pixel_data = memoryview(pixel_data).tobytes()

                # 填充 BITMAPINFO 结构体
                bmi = BITMAPINFO()
                bmi.bmiHeader.biSize = ctypes.sizeof(BITMAPINFOHEADER)
                bmi.bmiHeader.biWidth = width
                bmi.bmiHeader.biHeight = -height  # 注意:负高度表示自底向上的位图
                bmi.bmiHeader.biPlanes = 1
                bmi.bmiHeader.biBitCount = 24  # 24即3*8   32
                bmi.bmiHeader.biCompression = BI_RGB  # 无压缩

                # 调用 GetDIBits 获取像素数据
                ret = gdi32.GetDIBits(hdc_src, bmp, 0, height, pixel_data, ctypes.byref(bmi), DIB_RGB_COLORS)
                if ret == 0:
                    print("GetDIBits failed:", ctypes.WinError())

                # 像素色彩换位置
                mv = (memoryview(pixel_data).cast('B'))
                # b_stream = bytearray(width * (height+1) * 3)
                print(len(mv))

                b_stream = bytearray()
                k = 0
                # for i in range(0, len(mv), 3):
                #     if i % (width*3) == 0:
                #         # b_stream[k] = 0
                #         k += 1
                #     b_stream[k] = mv[i + 2]
                #     b_stream[k + 1] = mv[i + 1]
                #     b_stream[k + 2] = mv[i]
                #     k+=3

                for i in range(0, len(mv), 3):  # 4
                    if i % (width * 3) == 0:
                        b_stream.append(0)
                        k += 1
                    b_stream.append(mv[i + 2])
                    b_stream.append(mv[i + 1])
                    b_stream.append(mv[i])
                    # b_stream.extend([mv[i + 2],mv[i + 1],mv[i]])
                    k += 3
                    # b_stream.append(mv[i+2])
                    # b_stream.append(mv[i+1])
                    # b_stream.append(mv[i+0])
                    # b_stream.append(mv[i+3])
                    # k+=4

                # print(b_stream)

                def crc32(data):  # 字节流
                    crc = zlib.crc32(data)
                    return crc

                def crc32_b(data):
                    crc = zlib.crc32(data).to_bytes(4, byteorder='big')
                    return crc

                # png图片标识符
                png_signature = b"\x89PNG\r\n\x1a\n"
                # IHDR块
                ihdr = struct.pack("!IIBBBBB", width, height, 8, 2, 0, 0, 0)  # 8 6 0 0 0
                # IHDR的CRC验证
                mid = crc32_b(b"IHDR" + ihdr)
                # 压缩图片数据
                bd = zlib.compress(bytes(b_stream))
                # IDAT的CRC验证
                crc_bytes = crc32_b(b"IDAT" + bd)
                idat_chunk = b"IDAT" + bd + crc_bytes
                # IEND块
                iend = b"\x00\x00\x00\x00IEND"
                # IEND的CRC验证
                crc_end = crc32_b(b"IEND")
                iend += crc_end

                # 写入图片操作,使用BytesIO来构建PNG
                png_io = io.BytesIO()
                png_io.write(png_signature + b"\x00\x00\x00\rIHDR" + ihdr + mid)
                idat_header = struct.pack("!I", len(bd))
                png_io.write(idat_header + idat_chunk)
                png_io.write(iend)

                image_data = png_io.getvalue()

            # 剪切图片
            def Cut_png_image(x1, x2, y1, y2):
                global b_stream, image_data
                print(screenWidth, screenHeight)
                x = abs(x1 - x2)
                y = abs(y1 - y2)
                min_x = min(x1, x2)
                min_y = min(y1, y2)
                one_line_pixel = screenWidth * 3 + 1
                cut_stream = bytearray()
                for i in range(1, screenHeight + 1):
                    if i >= min_y and i < min_y + y:
                        cut_stream.append(0)
                        cut_stream.extend(
                            b_stream[one_line_pixel * (i - 1) + (min_x - 1) * 3 + 1:one_line_pixel * (i - 1) + (
                                    min_x + x) * 3 - 2])

                def crc32(data):  # 字节流
                    crc = zlib.crc32(data)
                    return crc

                def crc32_b(data):
                    crc = zlib.crc32(data).to_bytes(4, byteorder='big')
                    return crc

                    # png图片标识符

                png_signature = b"\x89PNG\r\n\x1a\n"
                # IHDR块
                ihdr = struct.pack("!IIBBBBB", x, y, 8, 2, 0, 0, 0)  # 8 6 0 0 0
                # IHDR的CRC验证
                mid = crc32_b(b"IHDR" + ihdr)
                # 压缩图片数据
                bd = zlib.compress(bytes(cut_stream))
                # IDAT的CRC验证
                crc_bytes = crc32_b(b"IDAT" + bd)
                idat_chunk = b"IDAT" + bd + crc_bytes
                # IEND块
                iend = b"\x00\x00\x00\x00IEND"
                # IEND的CRC验证
                crc_end = crc32_b(b"IEND")
                iend += crc_end

                # 写入图片操作,使用BytesIO来构建PNG
                png_io = io.BytesIO()
                png_io.write(png_signature + b"\x00\x00\x00\rIHDR" + ihdr + mid)
                idat_header = struct.pack("!I", len(bd))
                png_io.write(idat_header + idat_chunk)
                png_io.write(iend)

                image_data = png_io.getvalue()

            # 剪切
            def Cut(x, y, width, height):
                global hdc_copy, hbitmap, old_bitmap,hdc_src,hdc_dest

                # 设置裁剪区域
                x_clip, y_clip, width_clip, height_clip = x, y, width, height  # 裁剪区域的坐标和尺寸

                # 创建一个与屏幕兼容的内存设备上下文
                hdc_copy = gdi32.CreateCompatibleDC(hdc_src)
                # 创建对应大小位图
                hbitmap = gdi32.CreateCompatibleBitmap(hdc_src, width_clip, height_clip)  # 创建大小为裁剪区域尺寸的兼容位图
                old_bitmap = gdi32.SelectObject(hdc_copy, hbitmap)  # 将位图选入兼容设备上下文
                # 传递
                gdi32.BitBlt(hdc_copy, 0, 0, width_clip, height_clip, hdc_dest, x_clip, y_clip, SRCCOPY)

            # 复制
            def copy_bmp():
                global hbitmap
                # 这里是复制bmp图片内存对象
                # 加载必要的 Windows API 函数
                user32_1 = ctypes.windll.user32
                kernel32_1 = ctypes.windll.kernel32
                # 定义常量
                CF_BITMAP = 2

                # 打开剪贴板
                def OpenClipboard(hwnd):
                    return user32_1.OpenClipboard(hwnd)

                # 关闭剪贴板
                def CloseClipboard():
                    return user32_1.CloseClipboard()

                # 清空剪贴板
                def EmptyClipboard():
                    return user32_1.EmptyClipboard()

                # 设置剪贴板数据
                def SetClipboardData(uFormat, hData):
                    return user32_1.SetClipboardData(uFormat, hData)

                # 获取剪切板数据
                def GetClipboardData(uFormat):
                    return user32_1.GetClipboardData(uFormat)

                # 全局分配内存
                def GlobalAlloc(uFlags, dwBytes):
                    return kernel32_1.GlobalAlloc(uFlags, dwBytes)

                # 全局锁定内存
                def GlobalLock(hMem):
                    return kernel32_1.GlobalLock(hMem)

                # 全局解锁内存
                def GlobalUnlock(hMem):
                    return kernel32_1.GlobalUnlock(hMem)

                # 将图片复制到剪贴板
                def copy_bmp_to_clipboard():
                    hwnd = 0
                    if OpenClipboard(hwnd):
                        try:
                            EmptyClipboard()
                            SetClipboardData(CF_BITMAP, hbitmap)  # CF_BITMAP = 2
                        finally:
                            pass
                            CloseClipboard()

                # 复制
                copy_bmp_to_clipboard()

            """绘画层"""

            class DrawingApp:
                def __init__(self):
                    global popup, canvas, root, image_data
                    # 初始化主窗口
                    root = tk.Toplevel(top)
                    # root.overrideredirect(True)
                    bg_color = '#F0F0F0'
                    root.config(bg=bg_color)  # 背景色
                    root.wm_attributes('-transparentcolor', bg_color)
                    # 设置窗口为全屏模式
                    root.attributes('-fullscreen', True)
                    root.wm_attributes("-topmost", True)  # 窗口置顶

                    photo = PhotoImage(data=image_data)
                    print(photo)

                    # 创建Canvas用于传递
                    canvas = tk.Canvas(root, width=screenWidth, height=screenHeight)

                    self.root = root
                    self.root.wm_attributes("-topmost", True)  # 窗口置顶
                    self.root.attributes('-fullscreen', True)  # 全屏
                    self.canvas = canvas
                    self.canvas.pack(expand=True)
                    self.canvas.config(highlightthickness=0)  # 设置canvas边框为0
                    self.canvas.create_image(0, 0, image=photo, anchor=tk.NW)
                    self.canvas.image = photo

                    i1 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABTSURBVEhL7cxBCgAhDENRb+7Rq0gWNqKUDrPRvFUR84v9Rmni0jUF4wWncYW9k+53AsbDKY0rTGmiNFGaXJme4TWMJi49U5r0fwkYD9v0d0o7Zg0Izd58BueWAwAAAABJRU5ErkJggg=="
                    i2 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAACSSURBVEhL7ZbRDoAgCEWt9d/65+aClQgqczpndV7EhXc3YNPNe2/GsOM6gDWln1o75yBoQD4bpAFrLUY05vCvYn63gnDjfaSDLoD7izUn5MCVkfxdC9jO2lRoSBTWrPWMNgaqnSwnZF1rJqScI7uGMxrXAO4pk2oNiKZyTmMapTW8b66Bj9W6z41+E4v8DzOCMSddJdqD9ODtiwAAAABJRU5ErkJggg=="
                    i3 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAC3SURBVEhL3ZFBDsIwEAP5OU8vlna1pMHxupFAwJzaejI59Ha8jT9O31/IQaLSmWGhHOQdy7Q+VgiNp81usJJJ+lI3oEfmdEnmBcI/pae5rWtfpYGot3KTBtsfn2lqB9NkmlYa1GpqwE0DCI6TT1+RrtXUwEd+I6Bntj82aZoIWlmlRTfQ/ikNam67gfDnNDCjI/QISYNL9ZXM08CsC22ZBjgW5PtADvJ6lS4yM5CDxErv8Yvp43gAlXf3/IGNU4IAAAAASUVORK5CYII="
                    i4 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABxSURBVEhL7ZZLDoAwCETRi8PNkSjxMyXRWlmY8DZlM29BmgyTqlIOs78JJKpxISLiUydB0NQ7zOxTP5aF+KEe8W6A4ctd207Oa/nnDyk1UGqg1ECpgVIj3jYrgx12U2BBMT8D2ssIrqd39jZVh9kFogUN7BwohR5/ywAAAABJRU5ErkJggg=="

                    self.image1 = PhotoImage(data=base64.b64decode(i1))
                    self.image2 = PhotoImage(data=base64.b64decode(i2))
                    self.image3 = PhotoImage(data=base64.b64decode(i3))
                    self.image4 = PhotoImage(data=base64.b64decode(i4))

                    self.rect_id = None
                    self.start_x = None
                    self.start_y = None

                    self.bind_events()

                def bind_events(self):
                    self.canvas.bind("<ButtonPress-1>", self.on_button_press)
                    self.canvas.bind("<B1-Motion>", self.on_mouse_drag)
                    self.canvas.bind("<ButtonRelease-1>", self.on_button_release)
                    self.canvas.bind("<Button-3>", self.on_right_click)  # 鼠标右键

                def on_button_press(self, event):
                    self.start_x = event.x
                    self.start_y = event.y
                    if popup:
                        popup.destroy()

                ## 右键点击销毁
                def on_right_click(self, event):
                    destroy()
                    global  times
                    times = 1

                def on_mouse_drag(self, event):
                    if self.rect_id:
                        self.canvas.delete(self.rect_id)
                    self.rect_id = self.canvas.create_rectangle(self.start_x, self.start_y, event.x, event.y,
                                                                outline='red',
                                                                width=2)
                    if popup:
                        popup.destroy()

                def on_button_release(self, event):
                    if self.rect_id:
                        self.canvas.delete(self.rect_id)
                    self.rect_id = self.canvas.create_rectangle(self.start_x, self.start_y, event.x, event.y,
                                                                outline='red',
                                                                width=2, fill='')

                    """交互层"""

                    def copy_photo():
                        x = min(self.start_x, event.x)
                        y = min(self.start_y, event.y)
                        width = abs(self.start_x - event.x)
                        higth = abs(self.start_y - event.y)
                        Cut(x, y, width, higth)
                        copy_bmp()
                        destroy()
                        global times
                        times = 1

                    def save_photo():
                        file_path = filedialog.asksaveasfilename(
                            initialfile=datetime.now().strftime("%Y-%m-%d-%H-%M-%S"),
                            defaultextension=".png",
                            filetypes=[("PNG files", "*.png"), ("JPEG files", "*.jpg"),
                                       ("All files", "*.*")])

                        if file_path:
                            Cut_png_image(self.start_x, event.x, self.start_y, event.y)
                            with open(file_path, "wb") as f:
                                f.write(image_data)
                            destroy()
                            global times
                            times = 1

                    def close_popup():
                        destroy()
                        global times
                        times = 1

                    def all_popup():
                        file_path = filedialog.asksaveasfilename(
                            initialfile=datetime.now().strftime("%Y-%m-%d-%H-%M-%S"),
                            defaultextension=".png",
                            filetypes=[("PNG files", "*.png"), ("JPEG files", "*.jpg"),
                                       ("All files", "*.*")])
                        if file_path:
                            with open(file_path, "wb") as f:
                                f.write(image_data)
                            destroy()
                            global times
                            times = 1

                    global popup
                    # 弹出窗口
                    bg_color = '#FFFFF1'
                    popup = tk.Toplevel(self.root)
                    popup.title("操作选项")
                    popup.geometry("+" + str(event.x) + "+" + str(event.y))
                    popup.wm_attributes("-topmost", True)
                    popup.config(bg=bg_color)  # 背景色
                    popup.wm_attributes('-transparentcolor', bg_color)  # 窗口色
                    popup.overrideredirect(True)  # 无边框

                    tk.Button(popup, image=self.image1, text="复制", command=copy_photo).grid(row=0, column=0, padx=0,
                                                                                              pady=0)
                    tk.Button(popup, image=self.image2, text="保存", command=save_photo).grid(row=0, column=1, padx=0,
                                                                                              pady=0)
                    tk.Button(popup, image=self.image3, text="关闭", command=close_popup).grid(row=0, column=3, padx=0,
                                                                                               pady=0)
                    tk.Button(popup, image=self.image4, text="全部", command=all_popup).grid(row=0, column=2, padx=0,
                                                                                             pady=0)

            """启动层"""
            global times
            times = None
            Full_screen_capture(0, 0, screenWidth, screenHeight)
            png_image(screenWidth, screenHeight)
            if not len(str(hdc_src)) > 16:
                DrawingApp()

            # 百秒内截图处理
            time_end = 100
            for t in range(time_end):
                if times != None:
                    CleanScreen()
                    break
                else:
                    time.sleep(1)
                if t == time_end-1:
                    destroy()
                    CleanScreen()
            print("释放内存")
            global root
            root = None
            pass
        status_thread = threading.Thread(target=screenshot)
        # 启动线程
        status_thread.start()


    # 创建按钮,并绑定事件处理函数
    button = tk.Button(top, text="截图", command=on_button_click, bg=bg_color, fg="#FFFFFF")
    button.place(x=window_width // 2 + 80, y=25)

    ## 按键
    def on_key_press(event):
        global root
        print(event.keysym)
        if event.keysym == "F3" and root == None:
            print("F3按键启动成功")
            on_button_click()

    top.bind("<KeyPress>", on_key_press)

    top.mainloop()


if __name__ == "__main__":
    main()

import io  # 文件处理
import nt  # windows nt 库直接获取对应的磁盘空间
import time  # 时间
import zlib  # 加解密
import ctypes  # 调用
import struct  # 处理字节二进制
import base64  # 编解码
import threading  # 线程
import tkinter as tk  # tk
from datetime import datetime  # 时间
from tkinter import PhotoImage, filedialog

"""公用参数"""
gdi32 = ctypes.windll.gdi32
user32 = ctypes.windll.user32

# 定义常量
SM_CXSCREEN = 0
SM_CYSCREEN = 1

# 缩放比例
zoom = 1
screenWidth = int(user32.GetSystemMetrics(SM_CXSCREEN) * zoom)
screenHeight = int(user32.GetSystemMetrics(SM_CYSCREEN) * zoom)

SRCCOPY = 0x00CC0020

"""全局变量"""

# 全屏截图
hdc_dest, old_bmp, hwnd, hdc_src, bmp = None, None, None, None, None
# 剪切图片
hdc_copy, old_bitmap, hbitmap = None, None, None
# 图片数据
image_data = None
# 像素数据
b_stream = None
# 绘画层
canvas = None
# 交互层
popup = None
# 全部层
root = None
# 判断跳出
times = None


# 清理全部
def CleanScreen():
    global hdc_dest, old_bmp, hwnd, hdc_src, bmp, hdc_copy, old_bitmap, hbitmap
    # 恢复设备上下文
    gdi32.SelectObject(hdc_dest, old_bmp)
    gdi32.SelectObject(hdc_copy, old_bitmap)
    # 删除内存设备上下文
    gdi32.DeleteDC(hdc_dest)
    gdi32.DeleteDC(hdc_copy)
    # 释放桌面窗口的设备上下文
    user32.ReleaseDC(hwnd, hdc_src)
    # 处理位图
    gdi32.DeleteObject(bmp)
    gdi32.DeleteObject(hbitmap)
    hdc_dest, old_bmp, hwnd, hdc_src, bmp, hdc_copy, old_bitmap, hbitmap = None, None, None, None, None, None, None, None


## gif动态
class GifPlayer:
    def __init__(self, root, label_widget):
        self.root = root
        self.label_widget = label_widget
        self.frames = []
        self.frame_index = 0
        self.update_delay = 300  # 毫秒

        p1 = "iVBORw0KGgoAAAANSUhEUgAAAHMAAAAyCAYAAABvR+QvAAAKBUlEQVR4nO1b7VMT2xn/nU02CQSQGBDFNwRRuej1SpW2M15b2w+dfup0xnEcv/UfszM641RH+qWjXu1Yr6JelSpjBSG+AELVy0sgQDbZze6epx/C7t2wm5OEUIje/L4Q9jnPc57dZ8/zds4CVVRRRRVVVFHFZwtyQFEU2mx9qlgjEokE6bqeY0DTNCmdTguNOjIyQkRUNXwlIZ9BkskkERFdunTJRdd1vWrISkQho1jud2FhwemNq4YE4N9sBZx48OAB3blzRziGMcY2SJ01Y2jkEcmyLy+diBAKhdC2+5uKv5c1wzTNL2KFPfrhXsH7ePj4H+t+r9J6CywHhmFstgrrglAoVHBM646OdZ+3ooz5paCYEK6qyrrPW1E+m4iokmPijRt/p97eHoACIA8tQ0GGxcVFJJNJRJtaPWUwZFBbW4uZmRkEQkHIsgxQwEHn9m9N1bFz176KfR5CvH79mi5evFixcTP2+indv39jw/QbGu6nZ4M3K/Z5FEQymaxY5WOxwQ3X7cnT74qe07M0MQzDVbpZ3s/6a5pmzv/lwu/PqqKqKoiI1isZMgwDpmkiGAza82QyGUhSNl3gnEOWZaiqitraWuHNcEqvi06loDGyreixLmMahkF+v//z9NN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V8pzyDP7iOG0QZzIZodxyDh2vK6iyRbBWEK7MQCBQdnarKAoCgQAuXLgA4MunBpx9uXQxSwhO58Z7+fIlH8eWTxOYsq0GVhSFfD6fKVfX9SK3XK6+sVgM4XC46m9XHj25S9HoLI786iC8zIeGoIQPM7Nl8b6bHCHD0OEL6IDRgPa95TcRnCA0ZjU3yg3nhB07dgjliuIe3ypzwkYcxgq3bEZ4yyYEfH4QZOTzQKaMOOeXt8AjF8Yp6TRUPYZPn95Rxf1XC2qmnfe1wiAVsieEvXsqW1Urt/nGxh9QMpmoSpeSuyZO1/nuhjWmZrPZorM969l8cJpzOSvmJQibn5+ncPjLqQAiQiaTQSgUqmo1S5IXos/3yoVPbqy4fboSpepMs1XGwQ9eSZJkc2vWXZP1dHkjIyN0/Phx86SClcYNvBbx0RmGeYKuelTXw/kmOkA1dm55wyA0ptNGL28vOe1kVOsmVotyuj5uW2xWfO3fhwrdbDgcLopD2WwWd+7cAVBwZ8lkkqyFejKZNH+vV8xcWFgwz8NOTU3Z5r116xaAQhZsbSNyVO16mVY4zrEWcPpOsALYjGl9g0vdaHNzc02VCaKDYIBzK9CK1Xye0BAIIp1O4+efJ8njXV3zwjAyULIqFhPVfYBrM2Y6ncbU1BTt3/+VfuS5ShARvXr1qmI+JcsQm1+Ax0MwsDpnlFdy0FQPenqcDzeXC0dmTdOIx8RvfXszl8vB5/NhenoanZ2dv6gXuI466qijjorwP+AbSqBrhV82AAAAAElFTkSuQmCC"

        ## 遍历图片
        list_name = ["p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10"]
        list_str = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]
        list_all = []
        for i in range(10):
            photo = tk.PhotoImage(name=list_name[i], data=base64.b64decode(list_str[i]))
            list_all.append(photo)

        # 获取所有帧
        self.frames = list_all

        # 初始化显示第一帧
        self.label_widget.config(image=self.frames[0])
        self.label_widget.image = self.frames[0]

        # 绑定拖动事件
        self.label_widget.bind("<ButtonPress-1>", self.on_press)
        self.label_widget.bind("<ButtonRelease-1>", self.on_button_release)

        # 开始动画
        self.play_gif()

    def play_gif(self):
        if self.frame_index < len(self.frames):
            self.label_widget.config(image=self.frames[self.frame_index])
            self.frame_index += 1
            self.root.after(self.update_delay, self.play_gif)
        else:
            self.frame_index = 0
            self.root.after(self.update_delay, self.play_gif)

    def on_press(self, event):
        # 记录鼠标按下时的位置
        self.start_x = event.x
        self.start_y = event.y
        self.initial_x = self.root.winfo_x()
        self.initial_y = self.root.winfo_y()

    def on_button_release(self, event):
        # 计算鼠标移动的距离
        delta_x = event.x - self.start_x
        delta_y = event.y - self.start_y

        # 更新窗口位置
        self.root.geometry(f'+{self.initial_x + delta_x}+{self.initial_y + delta_y}')


## 获取cpu和内存的使用率
class FILETIME(ctypes.Structure):
    _fields_ = [("dwLowDateTime", ctypes.c_ulong),
                ("dwHighDateTime", ctypes.c_ulong)]


class SYSTEMTIME(ctypes.Structure):
    _fields_ = [("wYear", ctypes.c_ushort),
                ("wMonth", ctypes.c_ushort),
                ("wDayOfWeek", ctypes.c_ushort),
                ("wDay", ctypes.c_ushort),
                ("wHour", ctypes.c_ushort),
                ("wMinute", ctypes.c_ushort),
                ("wSecond", ctypes.c_ushort),
                ("wMilliseconds", ctypes.c_ushort)]


class MEMORYSTATUSEX(ctypes.Structure):
    _fields_ = [("dwLength", ctypes.c_ulong),
                ("dwMemoryLoad", ctypes.c_ulong),
                ("ullTotalPhys", ctypes.c_ulonglong),
                ("ullAvailPhys", ctypes.c_ulonglong),
                ("ullTotalPageFile", ctypes.c_ulonglong),
                ("ullAvailPageFile", ctypes.c_ulonglong),
                ("ullTotalVirtual", ctypes.c_ulonglong),
                ("ullAvailVirtual", ctypes.c_ulonglong),
                ("ullAvailExtendedVirtual", ctypes.c_ulonglong)]


## 调用dll
kernel32 = ctypes.windll.kernel32


## 获取cpu使用率
def get_cpu_usage():
    def get_cpu_times():
        idle_time = FILETIME()
        kernel_time = FILETIME()
        user_time = FILETIME()
        kernel32.GetSystemTimes(ctypes.byref(idle_time), ctypes.byref(kernel_time), ctypes.byref(user_time))
        return (idle_time, kernel_time, user_time)

    def filetime_to_seconds(ft):
        return (ft.dwHighDateTime * 0x100000000 + ft.dwLowDateTime) / 1e7

    (idle1, kernel1, user1) = get_cpu_times()
    time.sleep(1)
    (idle2, kernel2, user2) = get_cpu_times()

    idle_diff = filetime_to_seconds(idle2) - filetime_to_seconds(idle1)
    system_diff = (filetime_to_seconds(kernel2) - filetime_to_seconds(kernel1)) + \
                  (filetime_to_seconds(user2) - filetime_to_seconds(user1))

    return float("{:.1f}".format((1.0 - idle_diff / system_diff) * 100.0))


## 获取内存使用率
def get_memory_usage():
    mem_info = MEMORYSTATUSEX()
    mem_info.dwLength = ctypes.sizeof(MEMORYSTATUSEX)
    kernel32.GlobalMemoryStatusEx(ctypes.byref(mem_info))
    return float(mem_info.dwMemoryLoad)


## 启动tk的gui
def main():
    top = tk.Tk()
    top.title("GIF 动画播放器")
    top.overrideredirect(True)  # 无边框
    bg_color = '#FFFFF1'
    top.config(bg=bg_color)  # 背景色
    top.wm_attributes('-transparentcolor', bg_color)
    top.wm_attributes("-topmost", True)  # 窗口置顶
    top.attributes('-alpha', 1)  # 设置透明度,0.0 完全透明,1.0 完全不透明

    # 获取屏幕宽度和高度
    screen_width = top.winfo_screenwidth()
    screen_height = top.winfo_screenheight()

    # 窗口大小为300x200
    window_width = 300
    window_height = 200

    # 计算窗口位置,使其出现在右下角
    x_position = screen_width - window_width
    y_position = screen_height - window_height

    # 设置窗口的初始位置和大小
    top.geometry(f'{window_width}x{window_height}+{int(x_position)}+{int(y_position)}')

    # 创建Label来显示GIF
    label = tk.Label(top, bg=bg_color)
    label.pack(expand=True, fill='both')  # 确保Label填充整个窗口

    # 初始化GifPlayer
    GifPlayer(top, label)

    # 显示时间的Label
    time_label = tk.Label(top, bg=bg_color, fg='white', font=('Arial', 12))
    time_label.place(x=window_width // 2 - 50, y=50)

    ## 更新时间
    def update_time():
        # 获取当前时间并格式化为 时:分:秒
        current_time = datetime.now().strftime('%H:%M:%S')
        # 更新时间标签的文本
        time_label.config(text=current_time)
        # 每秒调用一次自己以更新时间
        top.after(1000, update_time)

    update_time()

    ## 状态显示
    status_show = tk.Label(top, bg=bg_color, fg='white', font=('Arial', 10))
    status_show.place(x=window_width // 2 + 60, y=55)

    ## 更新状态
    def update_status_show():
        def update_status():
            ## 状态更新
            cpu_status = get_cpu_usage()
            memory_status = get_memory_usage()
            total, free = nt._getdiskusage('C:/')
            disk_status = free / (2 ** 30)
            ## 颜表情表现
            list_emote = ["(^▽^)", "(⊙_⊙)", "(一_一)", "(一_一)!", "(╥_╥)"]
            if 0 <= cpu_status < 20:
                string_status = list_emote[0]
            elif 20 <= cpu_status < 40:
                string_status = list_emote[1]
            elif 40 <= cpu_status < 60:
                string_status = list_emote[2]
            elif 60 <= cpu_status < 80:
                string_status = list_emote[3]
            elif 80 <= cpu_status <= 100:
                string_status = list_emote[4]
            status_text = "CPU:{0:.1f}%\n内存:{1:.1f}%\n磁盘C:{2:.1f}G\n{3}\n".format(cpu_status, memory_status,
                                                                                      disk_status, string_status)
            # 更新文本
            status_show.config(text=status_text)

        status_thread = threading.Thread(target=update_status)
        # 启动线程
        status_thread.start()
        # 自调用更新
        top.after(2000, update_status_show)

    ## 状态更新
    update_status_show()

    ## 点击处理
    def on_button_click():
        def screenshot():
            """常用函数"""

            # 销毁共用组件
            def destroy():
                global canvas, popup, root
                if canvas:
                    canvas.destroy()
                if popup:
                    popup.destroy()
                if root:
                    root.destroy()

            """实现函数"""

            # 全屏截图
            def Full_screen_capture(x, y, width, height):
                global hdc_dest, old_bmp, hwnd, hdc_src, bmp
                # 获取桌面窗口句柄
                hwnd = user32.GetDesktopWindow()
                # 获取桌面窗口的设备上下文
                hdc_src = user32.GetDC(hwnd)
                if len(str(hdc_src)) > 16:
                    user32.ReleaseDC(hwnd, hdc_src)
                    print("获取失败")
                    return
                print(hwnd)
                print(hdc_src)
                # 创建一个与屏幕兼容的内存设备上下文
                hdc_dest = gdi32.CreateCompatibleDC(hdc_src)

                # 创建一个位图
                bmp = gdi32.CreateCompatibleBitmap(hdc_src, width, height)

                # 将位图选入内存设备上下文
                old_bmp = gdi32.SelectObject(hdc_dest, bmp)

                """
                    gdi32.BitBlt(hdc_src,  # 目标设备上下文  
                             x_dest,   # 目标矩形左上角的x坐标  
                             y_dest,   # 目标矩形左上角的y坐标  
                             width,    # 宽度  
                             height,   # 高度  
                             hdc_dest, # 源设备上下文  
                             x_src,    # 源矩形左上角的x坐标(通常是0)  
                             y_src,    # 源矩形左上角的y坐标(通常是0)  
                             SRCCOPY)  # 复制选项
                """
                # 捕获屏幕
                gdi32.BitBlt(hdc_dest, 0, 0, width, height, hdc_src, x, y, SRCCOPY)

            # 制作图片
            def png_image(width, height):
                global image_data, hdc_src, bmp, b_stream
                if len(str(hdc_src)) > 16:
                    user32.ReleaseDC(hwnd, hdc_src)
                    print("获取失败")
                    return

                # 定义 RGBQUAD 结构体
                class RGBQUAD(ctypes.Structure):
                    _fields_ = [("rgbBlue", ctypes.c_ubyte),
                                ("rgbGreen", ctypes.c_ubyte),
                                ("rgbRed", ctypes.c_ubyte),
                                ("rgbReserved", ctypes.c_ubyte)]

                # 定义 BITMAPINFOHEADER 结构体
                class BITMAPINFOHEADER(ctypes.Structure):
                    _fields_ = [("biSize", ctypes.c_uint),
                                ("biWidth", ctypes.c_int),
                                ("biHeight", ctypes.c_int),
                                ("biPlanes", ctypes.c_ushort),
                                ("biBitCount", ctypes.c_ushort),
                                ("biCompression", ctypes.c_uint),
                                ("biSizeImage", ctypes.c_uint),
                                ("biXPelsPerMeter", ctypes.c_int),
                                ("biYPelsPerMeter", ctypes.c_int),
                                ("biClrUsed", ctypes.c_uint),
                                ("biClrImportant", ctypes.c_uint)]

                # 定义 BITMAPINFO 结构体
                class BITMAPINFO(ctypes.Structure):
                    _fields_ = [("bmiHeader", BITMAPINFOHEADER),
                                ("bmiColors", RGBQUAD * 3)]  # 只分配了3个RGBQUAD的空间

                BI_RGB = 0
                DIB_RGB_COLORS = 0

                # 分配像素数据缓冲区(这里以24位位图为例,每个像素3字节)
                pixel_data = (ctypes.c_ubyte * (width * height * 3))()  # 4
                # 转换bytes
                # pixel_data = memoryview(pixel_data).tobytes()

                # 填充 BITMAPINFO 结构体
                bmi = BITMAPINFO()
                bmi.bmiHeader.biSize = ctypes.sizeof(BITMAPINFOHEADER)
                bmi.bmiHeader.biWidth = width
                bmi.bmiHeader.biHeight = -height  # 注意:负高度表示自底向上的位图
                bmi.bmiHeader.biPlanes = 1
                bmi.bmiHeader.biBitCount = 24  # 24即3*8   32
                bmi.bmiHeader.biCompression = BI_RGB  # 无压缩

                # 调用 GetDIBits 获取像素数据
                ret = gdi32.GetDIBits(hdc_src, bmp, 0, height, pixel_data, ctypes.byref(bmi), DIB_RGB_COLORS)
                if ret == 0:
                    print("GetDIBits failed:", ctypes.WinError())

                # 像素色彩换位置
                mv = (memoryview(pixel_data).cast('B'))
                # b_stream = bytearray(width * (height+1) * 3)
                print(len(mv))

                b_stream = bytearray()
                k = 0
                # for i in range(0, len(mv), 3):
                #     if i % (width*3) == 0:
                #         # b_stream[k] = 0
                #         k += 1
                #     b_stream[k] = mv[i + 2]
                #     b_stream[k + 1] = mv[i + 1]
                #     b_stream[k + 2] = mv[i]
                #     k+=3

                for i in range(0, len(mv), 3):  # 4
                    if i % (width * 3) == 0:
                        b_stream.append(0)
                        k += 1
                    b_stream.append(mv[i + 2])
                    b_stream.append(mv[i + 1])
                    b_stream.append(mv[i])
                    # b_stream.extend([mv[i + 2],mv[i + 1],mv[i]])
                    k += 3
                    # b_stream.append(mv[i+2])
                    # b_stream.append(mv[i+1])
                    # b_stream.append(mv[i+0])
                    # b_stream.append(mv[i+3])
                    # k+=4

                # print(b_stream)

                def crc32(data):  # 字节流
                    crc = zlib.crc32(data)
                    return crc

                def crc32_b(data):
                    crc = zlib.crc32(data).to_bytes(4, byteorder='big')
                    return crc

                # png图片标识符
                png_signature = b"\x89PNG\r\n\x1a\n"
                # IHDR块
                ihdr = struct.pack("!IIBBBBB", width, height, 8, 2, 0, 0, 0)  # 8 6 0 0 0
                # IHDR的CRC验证
                mid = crc32_b(b"IHDR" + ihdr)
                # 压缩图片数据
                bd = zlib.compress(bytes(b_stream))
                # IDAT的CRC验证
                crc_bytes = crc32_b(b"IDAT" + bd)
                idat_chunk = b"IDAT" + bd + crc_bytes
                # IEND块
                iend = b"\x00\x00\x00\x00IEND"
                # IEND的CRC验证
                crc_end = crc32_b(b"IEND")
                iend += crc_end

                # 写入图片操作,使用BytesIO来构建PNG
                png_io = io.BytesIO()
                png_io.write(png_signature + b"\x00\x00\x00\rIHDR" + ihdr + mid)
                idat_header = struct.pack("!I", len(bd))
                png_io.write(idat_header + idat_chunk)
                png_io.write(iend)

                image_data = png_io.getvalue()

            # 剪切图片
            def Cut_png_image(x1, x2, y1, y2):
                global b_stream, image_data
                print(screenWidth, screenHeight)
                x = abs(x1 - x2)
                y = abs(y1 - y2)
                min_x = min(x1, x2)
                min_y = min(y1, y2)
                one_line_pixel = screenWidth * 3 + 1
                cut_stream = bytearray()
                for i in range(1, screenHeight + 1):
                    if i >= min_y and i < min_y + y:
                        cut_stream.append(0)
                        cut_stream.extend(
                            b_stream[one_line_pixel * (i - 1) + (min_x - 1) * 3 + 1:one_line_pixel * (i - 1) + (
                                    min_x + x) * 3 - 2])

                def crc32(data):  # 字节流
                    crc = zlib.crc32(data)
                    return crc

                def crc32_b(data):
                    crc = zlib.crc32(data).to_bytes(4, byteorder='big')
                    return crc

                    # png图片标识符

                png_signature = b"\x89PNG\r\n\x1a\n"
                # IHDR块
                ihdr = struct.pack("!IIBBBBB", x, y, 8, 2, 0, 0, 0)  # 8 6 0 0 0
                # IHDR的CRC验证
                mid = crc32_b(b"IHDR" + ihdr)
                # 压缩图片数据
                bd = zlib.compress(bytes(cut_stream))
                # IDAT的CRC验证
                crc_bytes = crc32_b(b"IDAT" + bd)
                idat_chunk = b"IDAT" + bd + crc_bytes
                # IEND块
                iend = b"\x00\x00\x00\x00IEND"
                # IEND的CRC验证
                crc_end = crc32_b(b"IEND")
                iend += crc_end

                # 写入图片操作,使用BytesIO来构建PNG
                png_io = io.BytesIO()
                png_io.write(png_signature + b"\x00\x00\x00\rIHDR" + ihdr + mid)
                idat_header = struct.pack("!I", len(bd))
                png_io.write(idat_header + idat_chunk)
                png_io.write(iend)

                image_data = png_io.getvalue()

            # 剪切
            def Cut(x, y, width, height):
                global hdc_copy, hbitmap, old_bitmap,hdc_src,hdc_dest

                # 设置裁剪区域
                x_clip, y_clip, width_clip, height_clip = x, y, width, height  # 裁剪区域的坐标和尺寸

                # 创建一个与屏幕兼容的内存设备上下文
                hdc_copy = gdi32.CreateCompatibleDC(hdc_src)
                # 创建对应大小位图
                hbitmap = gdi32.CreateCompatibleBitmap(hdc_src, width_clip, height_clip)  # 创建大小为裁剪区域尺寸的兼容位图
                old_bitmap = gdi32.SelectObject(hdc_copy, hbitmap)  # 将位图选入兼容设备上下文
                # 传递
                gdi32.BitBlt(hdc_copy, 0, 0, width_clip, height_clip, hdc_dest, x_clip, y_clip, SRCCOPY)

            # 复制
            def copy_bmp():
                global hbitmap
                # 这里是复制bmp图片内存对象
                # 加载必要的 Windows API 函数
                user32_1 = ctypes.windll.user32
                kernel32_1 = ctypes.windll.kernel32
                # 定义常量
                CF_BITMAP = 2

                # 打开剪贴板
                def OpenClipboard(hwnd):
                    return user32_1.OpenClipboard(hwnd)

                # 关闭剪贴板
                def CloseClipboard():
                    return user32_1.CloseClipboard()

                # 清空剪贴板
                def EmptyClipboard():
                    return user32_1.EmptyClipboard()

                # 设置剪贴板数据
                def SetClipboardData(uFormat, hData):
                    return user32_1.SetClipboardData(uFormat, hData)

                # 获取剪切板数据
                def GetClipboardData(uFormat):
                    return user32_1.GetClipboardData(uFormat)

                # 全局分配内存
                def GlobalAlloc(uFlags, dwBytes):
                    return kernel32_1.GlobalAlloc(uFlags, dwBytes)

                # 全局锁定内存
                def GlobalLock(hMem):
                    return kernel32_1.GlobalLock(hMem)

                # 全局解锁内存
                def GlobalUnlock(hMem):
                    return kernel32_1.GlobalUnlock(hMem)

                # 将图片复制到剪贴板
                def copy_bmp_to_clipboard():
                    hwnd = 0
                    if OpenClipboard(hwnd):
                        try:
                            EmptyClipboard()
                            SetClipboardData(CF_BITMAP, hbitmap)  # CF_BITMAP = 2
                        finally:
                            pass
                            CloseClipboard()

                # 复制
                copy_bmp_to_clipboard()

            """绘画层"""

            class DrawingApp:
                def __init__(self):
                    global popup, canvas, root, image_data
                    # 初始化主窗口
                    root = tk.Toplevel(top)
                    # root.overrideredirect(True)
                    bg_color = '#F0F0F0'
                    root.config(bg=bg_color)  # 背景色
                    root.wm_attributes('-transparentcolor', bg_color)
                    # 设置窗口为全屏模式
                    root.attributes('-fullscreen', True)
                    root.wm_attributes("-topmost", True)  # 窗口置顶

                    photo = PhotoImage(data=image_data)
                    print(photo)

                    # 创建Canvas用于传递
                    canvas = tk.Canvas(root, width=screenWidth, height=screenHeight)

                    self.root = root
                    self.root.wm_attributes("-topmost", True)  # 窗口置顶
                    self.root.attributes('-fullscreen', True)  # 全屏
                    self.canvas = canvas
                    self.canvas.pack(expand=True)
                    self.canvas.config(highlightthickness=0)  # 设置canvas边框为0
                    self.canvas.create_image(0, 0, image=photo, anchor=tk.NW)
                    self.canvas.image = photo

                    i1 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABTSURBVEhL7cxBCgAhDENRb+7Rq0gWNqKUDrPRvFUR84v9Rmni0jUF4wWncYW9k+53AsbDKY0rTGmiNFGaXJme4TWMJi49U5r0fwkYD9v0d0o7Zg0Izd58BueWAwAAAABJRU5ErkJggg=="
                    i2 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAACSSURBVEhL7ZbRDoAgCEWt9d/65+aClQgqczpndV7EhXc3YNPNe2/GsOM6gDWln1o75yBoQD4bpAFrLUY05vCvYn63gnDjfaSDLoD7izUn5MCVkfxdC9jO2lRoSBTWrPWMNgaqnSwnZF1rJqScI7uGMxrXAO4pk2oNiKZyTmMapTW8b66Bj9W6z41+E4v8DzOCMSddJdqD9ODtiwAAAABJRU5ErkJggg=="
                    i3 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAC3SURBVEhL3ZFBDsIwEAP5OU8vlna1pMHxupFAwJzaejI59Ha8jT9O31/IQaLSmWGhHOQdy7Q+VgiNp81usJJJ+lI3oEfmdEnmBcI/pae5rWtfpYGot3KTBtsfn2lqB9NkmlYa1GpqwE0DCI6TT1+RrtXUwEd+I6Bntj82aZoIWlmlRTfQ/ikNam67gfDnNDCjI/QISYNL9ZXM08CsC22ZBjgW5PtADvJ6lS4yM5CDxErv8Yvp43gAlXf3/IGNU4IAAAAASUVORK5CYII="
                    i4 = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABxSURBVEhL7ZZLDoAwCETRi8PNkSjxMyXRWlmY8DZlM29BmgyTqlIOs78JJKpxISLiUydB0NQ7zOxTP5aF+KEe8W6A4ctd207Oa/nnDyk1UGqg1ECpgVIj3jYrgx12U2BBMT8D2ssIrqd39jZVh9kFogUN7BwohR5/ywAAAABJRU5ErkJggg=="

                    self.image1 = PhotoImage(data=base64.b64decode(i1))
                    self.image2 = PhotoImage(data=base64.b64decode(i2))
                    self.image3 = PhotoImage(data=base64.b64decode(i3))
                    self.image4 = PhotoImage(data=base64.b64decode(i4))

                    self.rect_id = None
                    self.start_x = None
                    self.start_y = None

                    self.bind_events()

                def bind_events(self):
                    self.canvas.bind("<ButtonPress-1>", self.on_button_press)
                    self.canvas.bind("<B1-Motion>", self.on_mouse_drag)
                    self.canvas.bind("<ButtonRelease-1>", self.on_button_release)
                    self.canvas.bind("<Button-3>", self.on_right_click)  # 鼠标右键

                def on_button_press(self, event):
                    self.start_x = event.x
                    self.start_y = event.y
                    if popup:
                        popup.destroy()

                ## 右键点击销毁
                def on_right_click(self, event):
                    destroy()
                    global  times
                    times = 1

                def on_mouse_drag(self, event):
                    if self.rect_id:
                        self.canvas.delete(self.rect_id)
                    self.rect_id = self.canvas.create_rectangle(self.start_x, self.start_y, event.x, event.y,
                                                                outline='red',
                                                                width=2)
                    if popup:
                        popup.destroy()

                def on_button_release(self, event):
                    if self.rect_id:
                        self.canvas.delete(self.rect_id)
                    self.rect_id = self.canvas.create_rectangle(self.start_x, self.start_y, event.x, event.y,
                                                                outline='red',
                                                                width=2, fill='')

                    """交互层"""

                    def copy_photo():
                        x = min(self.start_x, event.x)
                        y = min(self.start_y, event.y)
                        width = abs(self.start_x - event.x)
                        higth = abs(self.start_y - event.y)
                        Cut(x, y, width, higth)
                        copy_bmp()
                        destroy()
                        global times
                        times = 1

                    def save_photo():
                        file_path = filedialog.asksaveasfilename(
                            initialfile=datetime.now().strftime("%Y-%m-%d-%H-%M-%S"),
                            defaultextension=".png",
                            filetypes=[("PNG files", "*.png"), ("JPEG files", "*.jpg"),
                                       ("All files", "*.*")])

                        if file_path:
                            Cut_png_image(self.start_x, event.x, self.start_y, event.y)
                            with open(file_path, "wb") as f:
                                f.write(image_data)
                            destroy()
                            global times
                            times = 1

                    def close_popup():
                        destroy()
                        global times
                        times = 1

                    def all_popup():
                        file_path = filedialog.asksaveasfilename(
                            initialfile=datetime.now().strftime("%Y-%m-%d-%H-%M-%S"),
                            defaultextension=".png",
                            filetypes=[("PNG files", "*.png"), ("JPEG files", "*.jpg"),
                                       ("All files", "*.*")])
                        if file_path:
                            with open(file_path, "wb") as f:
                                f.write(image_data)
                            destroy()
                            global times
                            times = 1

                    global popup
                    # 弹出窗口
                    bg_color = '#FFFFF1'
                    popup = tk.Toplevel(self.root)
                    popup.title("操作选项")
                    popup.geometry("+" + str(event.x) + "+" + str(event.y))
                    popup.wm_attributes("-topmost", True)
                    popup.config(bg=bg_color)  # 背景色
                    popup.wm_attributes('-transparentcolor', bg_color)  # 窗口色
                    popup.overrideredirect(True)  # 无边框

                    tk.Button(popup, image=self.image1, text="复制", command=copy_photo).grid(row=0, column=0, padx=0,
                                                                                              pady=0)
                    tk.Button(popup, image=self.image2, text="保存", command=save_photo).grid(row=0, column=1, padx=0,
                                                                                              pady=0)
                    tk.Button(popup, image=self.image3, text="关闭", command=close_popup).grid(row=0, column=3, padx=0,
                                                                                               pady=0)
                    tk.Button(popup, image=self.image4, text="全部", command=all_popup).grid(row=0, column=2, padx=0,
                                                                                             pady=0)

            """启动层"""
            global times
            times = None
            Full_screen_capture(0, 0, screenWidth, screenHeight)
            png_image(screenWidth, screenHeight)
            if not len(str(hdc_src)) > 16:
                DrawingApp()

            # 百秒内截图处理
            time_end = 100
            for t in range(time_end):
                if times != None:
                    CleanScreen()
                    break
                else:
                    time.sleep(1)
                if t == time_end-1:
                    destroy()
                    CleanScreen()
            print("释放内存")
            global root
            root = None
            pass
        status_thread = threading.Thread(target=screenshot)
        # 启动线程
        status_thread.start()


    # 创建按钮,并绑定事件处理函数
    button = tk.Button(top, text="截图", command=on_button_click, bg=bg_color, fg="#FFFFFF")
    button.place(x=window_width // 2 + 80, y=25)

    ## 按键
    def on_key_press(event):
        global root
        print(event.keysym)
        if event.keysym == "F3" and root == None:
            print("F3按键启动成功")
            on_button_click()

    top.bind("<KeyPress>", on_key_press)

    top.mainloop()


if __name__ == "__main__":
    main()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/953226.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【数学】概率论与数理统计(五)

文章目录 [toc] 二维随机向量及其分布随机向量离散型随机向量的概率分布律性质示例问题解答 连续型随机向量的概率密度函数随机向量的分布函数性质连续型随机向量均匀分布 边缘分布边缘概率分布律边缘概率密度函数二维正态分布示例问题解答 边缘分布函数 二维随机向量及其分布 …

mysql中创建计算字段

目录 1、计算字段 2、拼接字段 3、去除空格和使用别名 &#xff08;1&#xff09;去除空格 &#xff08;2&#xff09;使用别名&#xff1a;AS 4、执行算术计算 5、小结 博主用的是mysql8 DBMS&#xff0c;附上示例资料&#xff1a; 百度网盘链接: https://pan.baidu.co…

uniapp 之 uni-forms校验提示【提交的字段[‘xxx‘]在数据库中并不存在】解决方案

目录 场景问题代码结果问题剖析解决方案 场景 uni-forms官方组件地址 使用uniapp官方提供的组件&#xff0c;某个表单需求&#xff0c;单位性质字段如果是高校&#xff0c;那么工作单位则是高校的下拉选择格式&#xff0c;单位性质如果是其他的类型&#xff0c;工作单位则是手动…

【SH】Xiaomi9刷Windows10系统研发记录 、手机刷Windows系统教程、小米9重装win10系统

文章目录 参考资料云盘资料软硬件环境手机解锁刷机驱动绑定账号和设备解锁手机 Mindows工具箱安装工具箱和修复下载下载安卓和woa资源包第三方Recovery 一键安装Windows准备工作创建分区安装系统 效果展示Windows和Android一键互换Win切换安卓安卓切换Win 删除分区 参考资料 解…

苹果电脑怎么清理后台,提升苹果电脑运行速度

苹果电脑以其流畅的系统和高效的性能备受用户青睐&#xff0c;但即使是性能强大的Mac&#xff0c;随着使用时间的增长&#xff0c;也会遇到运行变慢、卡顿的问题。造成这种现象的一个主要原因是后台运行的程序和进程过多&#xff0c;占用了系统资源。那么&#xff0c;苹果电脑怎…

qt 快捷功能 快速生成 setter getter 构造函数 父类虚函数重写 成员函数实现 代码框架 查看父类及父类中的虚函数

qt 快速生成 setter getter 构造函数 父类虚函数重写 成员函数实现 代码框架 1、找到要实现的头文件 2、鼠标移动到在头文件中的类定义的类名上&#xff0c;右键进行选择。 这是插入父类虚函数(父类虚函数重写) 选项弹出来的结果。可以查看到所有父类及父类中的所有的虚函数

2_CSS3 背景 --[CSS3 进阶之路]

CSS3 中的背景属性提供了许多强大的功能来增强网页设计&#xff0c;包括但不限于多背景图像、渐变、背景大小控制等。以下是一些关键的 CSS3 背景属性及其用法示例。 1. 多重背景图像 CSS3 允许你为一个元素设置多个背景图像。这些图像按照它们在 background-image 属性中定义…

C++ ——— 内部类

目录 内部类的概念 内部类的特征 sizeof(外部类) 的大小 内部类的实例化 内部类就是外部类的友元 内部类的概念 如果一个类定义在另一个类的内部&#xff0c;这个内部类就叫做内部类&#xff0c;内部类是一个独立的类&#xff0c;它不属于外部类&#xff0c;更不能通过外…

03_Redis基本操作

1.Redis查询命令 1.1 官网命查询命令 为了便于学习Redis,官方将其用于操作不同数据类型的命令进行了分类整理。你可以通过访问Redis官方网站上的命令参考页面https://redis.io/commands来查阅这些分组的命令,这有助于更系统地理解和使用Redis的各项功能。 1.2 HELP查询命令…

深度解读微软Speech服务:让语音识别走进现实

大家好&#xff0c;今天我们来探讨一个激动人心的技术话题&#xff1a;微软的语音识别服务如何为我们提供强大的语音识别解决方案&#xff0c;特别是在电话录音中识别出不同的说话人。 场景描绘 想象一下&#xff0c;你有一段电话录音&#xff0c;并需要将其中的多个说话人区分…

mapbox基础,expressions表达式汇总

👨‍⚕️ 主页: gis分享者 👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅! 👨‍⚕️ 收录于专栏:mapbox 从入门到精通 文章目录 一、🍀前言二、🍀Expressions简介2.1 expressions 操作符2.1.1 Data expressions2.1.2 Camera expressions2.2 Expressi…

HTML中link的用法

一点寒芒先到&#xff0c;随后&#xff0c;抢出如龙&#xff01; 对于本人而言&#xff0c;这篇笔记内容有些扩展了&#xff0c;有些还未学到的也用上了&#xff0c;但是大概可以使用的明白&#xff0c;坚持下去&#xff0c;相信一定可以建设一个稳固的根基。 该文章为个人成…

宝塔面板 申请证书后 仍然提示不安全

证书显示有效&#xff0c;但是网站显示不安全 导致的原因是引入静态文件使用的是HTTP&#xff0c;查看方法为F12打开console控制台 可以看到静态文件全部都是HTTP 网站采用wordpress搭建&#xff0c;基于问题解决&#xff0c;其他方式搭建也是一样&#xff0c;处理掉所有的H…

Maven 中 scope=provided 和 optional=true 的区别

先说效果&#xff0c;maven依赖声明中加了<scope>provided</scope>&#xff0c;或者加了<optional>true</optional>&#xff0c;从效果上看是一样的&#xff0c;都会中断依赖传递&#xff0c;观察下图&#xff1a; 图中&#xff0c;项目B分别依赖了C和…

Linux标准IOday4

1:思维导图2: 创建2个子进程 父进程负责: 向文件中写入数据 2个子进程负责: 从文件中读取数据 要求: 一定保证1号子进程先读取&#xff0c;2号子进程后读取 使用文件IO去实现 #include <stdio.h>#include <string.h>#include <un…

Spring Boot教程之五十五:Spring Boot Kafka 消费者示例

Spring Boot Kafka 消费者示例 Spring Boot 是 Java 编程语言中最流行和使用最多的框架之一。它是一个基于微服务的框架&#xff0c;使用 Spring Boot 制作生产就绪的应用程序只需很少的时间。Spring Boot 可以轻松创建独立的、生产级的基于 Spring 的应用程序&#xff0c;您可…

ColorGATE 23系列的RIP软件

ColorGATE 23系列的RIP软件。ColorGATE是全球领先的用于无化学胶片生产的RIP软件&#xff0c;以下是对其特点和功能的介绍&#xff1a; 应用领域 适用于柔版、胶版和丝网印刷等领域&#xff0c;利用喷墨打印机进行无化学胶片生产&#xff0c;可应用于高端品质的印刷。 核心技…

Type-C双屏显示器方案

在数字化时代&#xff0c;高效的信息处理和视觉体验已成为我们日常生活和工作的关键需求。随着科技的进步&#xff0c;一款结合了便携性和高效视觉输出的设备——双屏便携屏&#xff0c;逐渐崭露头角&#xff0c;成为追求高效工作和娱乐体验人群的新宠。本文将深入探讨双屏便携…

51单片机 DS18B20温度储传感器

DS18B20温度传感器 64-BITROM&#xff1a;作为器件地址&#xff0c;用于总线通信的寻址&#xff0c;是唯一的&#xff0c;不可更改 SCRATCHPAD&#xff08;暂存器&#xff09;&#xff1a;用于总线的数据交互 EEPROM&#xff1a;用于保存温度触发阈值和配置参数 暂存器 单总线…

对话新晋 Apache SeaTunnel Committer:张圣航的开源之路与技术洞察

近日&#xff0c;张圣航被推选为 Apache SeaTunnel 的 Committer成员。带着对技术的热情和社区的责任&#xff0c;他将如何跟随 Apache SeaTunnel 社区迈向新的高度&#xff1f;让我们一起来聆听他的故事。 自我介绍 请您简单介绍一下自己&#xff0c;包括职业背景、当前的工作…