为啥需要拖进去呢 我一直都是选择啊 搞一个动作比整一个软件强多了把 另外 python写个代码也行啊。
[Python] 纯文本查看 复制代码 from PIL import Image
import os
def change_dpi(folder_path, target_dpi):
for filename in os.listdir(folder_path):
if filename.lower().endswith(('.png', '.jpg', '.jpeg', '.bmp', '.gif')):
image_path = os.path.join(folder_path, filename)
img = Image.open(image_path)
# 假设图片是以英寸为单位,根据实际情况调整
width, height = img.size
# 计算新尺寸
new_width = int(width * (target_dpi / img.info['dpi'][0]))
new_height = int(height * (target_dpi / img.info['dpi'][1]))
# 调整图片尺寸
img = img.resize((new_width, new_height), Image.ANTIALIAS)
# 保存修改后的图片
img.save(image_path)
folder_path = 'path/to/your/folder'
target_dpi = 600
change_dpi(folder_path, target_dpi) |