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 = rootself.label_widget = label_widgetself.frames = []self.frame_index = 0self.update_delay = 300 # 毫秒p1 = "iVBORw0KGgoAAAANSUhEUgAAAHMAAAAyCAYAAABvR+QvAAAKBUlEQVR4nO1b7VMT2xn/nU02CQSQGBDFNwRRuej1SpW2M15b2w+dfup0xnEcv/UfszM641RH+qWjXu1Yr6JelSpjBSG+AELVy0sgQDbZze6epx/C7t2wm5OE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9g0vdaHNzc02VCaKDYIBzK9CK1Xye0BAIIp1O4+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 += 1self.root.after(self.update_delay, self.play_gif)else:self.frame_index = 0self.root.after(self.update_delay, self.play_gif)def on_press(self, event):# 记录鼠标按下时的位置self.start_x = event.xself.start_y = event.yself.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_xdelta_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()# 窗口大小为300x200window_width = 300window_height = 200# 计算窗口位置,使其出现在右下角x_position = screen_width - window_widthy_position = screen_height - window_height# 设置窗口的初始位置和大小top.geometry(f'{window_width}x{window_height}+{int(x_position)}+{int(y_position)}')# 创建Label来显示GIFlabel = tk.Label(top, bg=bg_color)label.pack(expand=True, fill='both') # 确保Label填充整个窗口# 初始化GifPlayerGifPlayer(top, label)# 显示时间的Labeltime_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, rootif 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("获取失败")returnprint(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_streamif 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 = 0DIB_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 = widthbmi.bmiHeader.biHeight = -height # 注意:负高度表示自底向上的位图bmi.bmiHeader.biPlanes = 1bmi.bmiHeader.biBitCount = 24 # 24即3*8 32bmi.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+=3for i in range(0, len(mv), 3): # 4if i % (width * 3) == 0:b_stream.append(0)k += 1b_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 crcdef 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来构建PNGpng_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_dataprint(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 + 1cut_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 crcdef 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来构建PNGpng_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.user32kernel32_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 = 0if OpenClipboard(hwnd):try:EmptyClipboard()SetClipboardData(CF_BITMAP, hbitmap) # CF_BITMAP = 2finally:passCloseClipboard()# 复制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 = rootself.root.wm_attributes("-topmost", True) # 窗口置顶self.root.attributes('-fullscreen', True) # 全屏self.canvas = canvasself.canvas.pack(expand=True)self.canvas.config(highlightthickness=0) # 设置canvas边框为0self.canvas.create_image(0, 0, image=photo, anchor=tk.NW)self.canvas.image = photoi1 = "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 = Noneself.start_x = Noneself.start_y = Noneself.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.xself.start_y = event.yif popup:popup.destroy()## 右键点击销毁def on_right_click(self, event):destroy()global timestimes = 1def 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 timestimes = 1def 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 timestimes = 1def close_popup():destroy()global timestimes = 1def 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 timestimes = 1global 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 timestimes = NoneFull_screen_capture(0, 0, screenWidth, screenHeight)png_image(screenWidth, screenHeight)if not len(str(hdc_src)) > 16:DrawingApp()# 百秒内截图处理time_end = 100for t in range(time_end):if times != None:CleanScreen()breakelse:time.sleep(1)if t == time_end-1:destroy()CleanScreen()print("释放内存")global rootroot = Nonepassstatus_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 key_state():global rootkey = 0x72 # F3prev_state = 0while True:time.sleep(0.02)# 获取按键状态state = user32.GetAsyncKeyState(key)if state & 0x8000:if not prev_state & 0x8000 and root == None:print("F3 键被按下")on_button_click()# elif prev_state & 0x8000:# print("F3 键被释放")prev_state = statekey_thread = threading.Thread(target=key_state)# 启动线程key_thread.start()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 = rootself.label_widget = label_widgetself.frames = []self.frame_index = 0self.update_delay = 300 # 毫秒p1 = "iVBORw0KGgoAAAANSUhEUgAAAHMAAAAyC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yA0ptNGL28vOe1kVOsmVotyuj5uW2xWfO3fhwrdbDgcLopD2WwWd+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 += 1self.root.after(self.update_delay, self.play_gif)else:self.frame_index = 0self.root.after(self.update_delay, self.play_gif)def on_press(self, event):# 记录鼠标按下时的位置self.start_x = event.xself.start_y = event.yself.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_xdelta_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()# 窗口大小为300x200window_width = 300window_height = 200# 计算窗口位置,使其出现在右下角x_position = screen_width - window_widthy_position = screen_height - window_height# 设置窗口的初始位置和大小top.geometry(f'{window_width}x{window_height}+{int(x_position)}+{int(y_position)}')# 创建Label来显示GIFlabel = tk.Label(top, bg=bg_color)label.pack(expand=True, fill='both') # 确保Label填充整个窗口# 初始化GifPlayerGifPlayer(top, label)# 显示时间的Labeltime_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, rootif 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("获取失败")returnprint(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_streamif 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 = 0DIB_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 = widthbmi.bmiHeader.biHeight = -height # 注意:负高度表示自底向上的位图bmi.bmiHeader.biPlanes = 1bmi.bmiHeader.biBitCount = 24 # 24即3*8 32bmi.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+=3for i in range(0, len(mv), 3): # 4if i % (width * 3) == 0:b_stream.append(0)k += 1b_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 crcdef 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来构建PNGpng_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_dataprint(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 + 1cut_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 crcdef 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来构建PNGpng_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.user32kernel32_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 = 0if OpenClipboard(hwnd):try:EmptyClipboard()SetClipboardData(CF_BITMAP, hbitmap) # CF_BITMAP = 2finally:passCloseClipboard()# 复制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 = rootself.root.wm_attributes("-topmost", True) # 窗口置顶self.root.attributes('-fullscreen', True) # 全屏self.canvas = canvasself.canvas.pack(expand=True)self.canvas.config(highlightthickness=0) # 设置canvas边框为0self.canvas.create_image(0, 0, image=photo, anchor=tk.NW)self.canvas.image = photoi1 = "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 = Noneself.start_x = Noneself.start_y = Noneself.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.xself.start_y = event.yif popup:popup.destroy()## 右键点击销毁def on_right_click(self, event):destroy()global timestimes = 1def 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 timestimes = 1def 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 timestimes = 1def close_popup():destroy()global timestimes = 1def 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 timestimes = 1global 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 timestimes = NoneFull_screen_capture(0, 0, screenWidth, screenHeight)png_image(screenWidth, screenHeight)if not len(str(hdc_src)) > 16:DrawingApp()# 百秒内截图处理time_end = 100for t in range(time_end):if times != None:CleanScreen()breakelse:time.sleep(1)if t == time_end-1:destroy()CleanScreen()print("释放内存")global rootroot = Nonepassstatus_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 key_state():global rootkey = 0x72 # F3prev_state = 0while True:time.sleep(0.02)# 获取按键状态state = user32.GetAsyncKeyState(key)if state & 0x8000:if not prev_state & 0x8000 and root == None:print("F3 键被按下")on_button_click()# elif prev_state & 0x8000:# print("F3 键被释放")prev_state = statekey_thread = threading.Thread(target=key_state)# 启动线程key_thread.start()top.mainloop()if __name__ == "__main__":main()