项目初始化

This commit is contained in:
2025-09-28 13:37:21 +08:00
commit 7795de3550
21 changed files with 364 additions and 0 deletions

11
utils/pillow_util.py Normal file
View File

@@ -0,0 +1,11 @@
from PIL import Image, ImageEnhance
# 加载图片
img = Image.open("fb1df265-5085-4bc2-881b-7674b620c4ac.jpg")
# 增强对比度1.5 倍为示例,你可以调节参数)
enhancer = ImageEnhance.Contrast(img)
img_enhanced = enhancer.enhance(4.0)
# 保存增强后的图像
img_enhanced.save("enhanced_image_pillow.png")