From 0b16572adf56b641ff11a791e44f31459166ea3e Mon Sep 17 00:00:00 2001 From: tonquer Date: Sun, 3 Dec 2023 19:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86webp?= =?UTF-8?q?=E4=BF=9D=E5=AD=98png=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #82 --- src/config/config.py | 2 +- src/start.py | 2 +- src/tools/tool.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config/config.py b/src/config/config.py index c2ceffc..7d92fe8 100644 --- a/src/config/config.py +++ b/src/config/config.py @@ -44,7 +44,7 @@ UpdateUrl3Back = "https://hub.fastgit.xyz/tonquer/JMComic-qt" UpdateVersion = "v1.1.8" -RealVersion = "v1.1.8" +RealVersion = "v1.1.8.1" VersionTime = "2023-11-22" Waifu2xVersion = "1.1.6" diff --git a/src/start.py b/src/start.py index 5722ff6..66f4a04 100644 --- a/src/start.py +++ b/src/start.py @@ -63,7 +63,7 @@ socket.close() app.quit() Log.Warn("server already star") - exit(1) + sys.exit(1) localServer = QLocalServer() # 没有实例运行,创建服务器 localServer.listen(serverName) diff --git a/src/tools/tool.py b/src/tools/tool.py index 99361eb..adc4bde 100644 --- a/src/tools/tool.py +++ b/src/tools/tool.py @@ -913,13 +913,14 @@ def SegmentationPicture(imgData, epsId, scramble_id, bookId): @staticmethod def SegmentationPictureToDisk(imgData, epsId, scramble_id, bookId, path, toFormat): num = ToolUtil.GetSegmentationNum(epsId, scramble_id, bookId) - if num <= 1: - return imgData from PIL import Image from io import BytesIO src = BytesIO(imgData) srcImg = Image.open(src) + if num <= 1: + srcImg.save(path, toFormat) + return size = (width, height) = srcImg.size desImg = Image.new(srcImg.mode, size)