-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp_img.py
More file actions
43 lines (36 loc) · 1.66 KB
/
Copy pathapp_img.py
File metadata and controls
43 lines (36 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright (C) 2026 张小鱼
# SPDX-License-Identifier: AGPL-3.0-or-later
import sys
import os
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QIcon, QFont
from core.main import BaseMainWindow
from features import IMG_FEATURES
from core.utils import resource_path
from version import IMG_VERSION
def get_img_help_text():
return """
<h2>🖼️ IMG 批量处理工具</h2>
<p>本工具专为图片批量处理设计,提供以下功能:</p>
<b>1. 图片格式转换</b><br>转换为 PNG、JPG、WEBP、BMP、TIFF、GIF、ICO<br><br>
<b>2. 调整图片大小</b><br>按像素/百分比/短边约束缩放,支持 DPI 修改<br><br>
<b>3. 压缩图片文件</b><br>通过质量/缩放/灰度/颜色数等多维度压缩<br><br>
<b>4. 图片拼接合并</b><br>垂直/水平/网格拼接/台词拼接,支持标签和标题<br><br>
<b>5. 图片分切裁剪</b><br>按网格或行列将大图切分成多张小图<br><br>
<b>6. 多图合成GIF</b><br>将多张图片合成为 GIF 动图,支持分组输出<br>
<p style="text-align:center; color:#888; font-size:12px;">
© 张小鱼(Aria)· contact@arianote.top
</p>
"""
if __name__ == "__main__":
app = QApplication(sys.argv)
app.setWindowIcon(QIcon(resource_path("assets/logo_img.ico")))
app.setFont(QFont("Microsoft YaHei" if sys.platform.startswith("win") else "Arial", 10))
window = BaseMainWindow(
app_title=f"IMG 批量处理工具 v{IMG_VERSION} ©张小鱼",
feature_modules=IMG_FEATURES,
icon_path="assets/logo_img.ico",
help_text=get_img_help_text()
)
window.show()
sys.exit(app.exec())