@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user