convert #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
import os
from PIL import Image
import tkinter as tk
from tkinter import messagebox
def convert_to_8bit(input_file, output_file):
# 打开图像
image = Image.open(input_file)
def process_images():
# 获取当前文件夹路径
folder_path = os.getcwd()
count = 0 # 统计转换的图片数量
def close_app():
root.destroy() # 销毁窗口
root.quit() # 退出应用程序
if name == "main":
# 执行图像转换并获取转换的图片数量
converted_count = process_images()