diff --git a/.gitignore b/.gitignore index 86acc7f..b34a0ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vs build database -dist \ No newline at end of file +dist +temp.png \ No newline at end of file diff --git a/begin.py b/begin.py index 2295eb3..258675f 100644 --- a/begin.py +++ b/begin.py @@ -260,10 +260,14 @@ while while_loop: text_draw = ImageDraw.Draw(image) text_draw.text((x_position, y_position), FeatureByte, fill=text_color, font=font) # 保存生成的图像 - image.save("database/"+sn+".png") + filename="database/"+sn+".png" + image.save(filename) - # 显示图像(可选) - image.show() + #try print + pilfile=Image.open(filename) + pilfile.show() + + except: print("Data Error") diff --git a/begin.spec b/begin.spec new file mode 100644 index 0000000..8113d39 --- /dev/null +++ b/begin.spec @@ -0,0 +1,45 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['begin.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='begin', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=['logo.ico'], +) diff --git a/logo.ico b/logo.ico new file mode 100644 index 0000000..7f401cc Binary files /dev/null and b/logo.ico differ