diff --git a/barcodes.png b/barcodes.png deleted file mode 100644 index f5a5f80..0000000 Binary files a/barcodes.png and /dev/null differ diff --git a/begin.py b/begin.py index 450712b..2295eb3 100644 --- a/begin.py +++ b/begin.py @@ -260,7 +260,7 @@ while while_loop: text_draw = ImageDraw.Draw(image) text_draw.text((x_position, y_position), FeatureByte, fill=text_color, font=font) # 保存生成的图像 - #image.save("barcodes.png") + image.save("database/"+sn+".png") # 显示图像(可选) image.show() diff --git a/begin.spec b/begin.spec deleted file mode 100644 index 8113d39..0000000 --- a/begin.spec +++ /dev/null @@ -1,45 +0,0 @@ -# -*- 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 deleted file mode 100644 index 7f401cc..0000000 Binary files a/logo.ico and /dev/null differ diff --git a/temp.png b/temp.png deleted file mode 100644 index 6ee9ea6..0000000 Binary files a/temp.png and /dev/null differ diff --git a/test.png b/test.png deleted file mode 100644 index 041c94f..0000000 Binary files a/test.png and /dev/null differ diff --git a/test.png.png b/test.png.png deleted file mode 100644 index e73a164..0000000 Binary files a/test.png.png and /dev/null differ diff --git a/test.png.svg b/test.png.svg deleted file mode 100644 index f9f1e09..0000000 --- a/test.png.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 123asd - - diff --git a/test.py b/test.py deleted file mode 100644 index c4687c1..0000000 --- a/test.py +++ /dev/null @@ -1,71 +0,0 @@ -from PIL import Image, ImageDraw,ImageFont -from barcode import Code128 -from barcode.writer import ImageWriter -import qrcode - -# 定义图像大小和条形码大小 -image_width = 2479 -image_height = 3508 -qrcode_size = 250 -# 创建一个空白图像 -image = Image.new("RGB", (image_width, image_height), (255, 255, 255)) -draw = ImageDraw.Draw(image) - -# 条形码配置 -barcode_options = { - "writer": ImageWriter(), - "output": 'temp', # 输出格式,可以是文件名或字节流 -} - -# 在图像上生成多个条形码并放置它们 -x_position = 50 -y_position = 50 - - -# 生成条形码 -barcode = Code128("test", writer=barcode_options["writer"]) -barcode_file = barcode.save(barcode_options["output"]) - -# 打开生成的条形码图像 -barcode_image = Image.open(barcode_file) - -# 将条形码添加到图像上 -image.paste(barcode_image, (x_position, y_position)) - -# 更新下一个条形码的位置 -y_position += 120 - -# 在条形码下方添加自定义文本 -custom_text = "Custom Text 123" -text_color = (0, 0, 0) # 文本颜色(黑色) -# 设置字体大小 -font_size = 100 -font = ImageFont.truetype("fonts/arial", font_size) # 替换为你自己的字体文件路径 - -# 创建一个Draw对象并将文本添加到图像上 -text_draw = ImageDraw.Draw(image) -text_draw.text((x_position, y_position + 120), custom_text, fill=text_color, font=font) - -# 更新下一个条形码的位置 -y_position += 220 - - -# 生成二维码 -qr = qrcode.QRCode( - version=1, - error_correction=qrcode.constants.ERROR_CORRECT_L, - box_size=10, - border=4, -) -qr.add_data("QR Code Data456") -qr.make(fit=True) - -qr_image = qr.make_image(fill_color="black", back_color="white").resize((qrcode_size, qrcode_size)) - -# 将二维码添加到图像上 -image.paste(qr_image, (x_position, y_position)) -# 保存生成的图像 -#image.save("barcodes.png") - -# 显示图像(可选) -image.show()