added , to number formatting

This commit is contained in:
Fredrick W Warren 2022-05-05 12:45:34 -07:00
parent a852b72a35
commit e704ab69c8

View File

@ -52,8 +52,8 @@ image = Image.open(bundle_dir + "/" + infile)
font = ImageFont.truetype(bundle_dir + "/" + font_face, 19) font = ImageFont.truetype(bundle_dir + "/" + font_face, 19)
draw = ImageDraw.Draw(image) draw = ImageDraw.Draw(image)
draw.text((xpos, line1), str(co2)+" lbs", font=font, fill=fill_color) draw.text((xpos, line1), "{:,} lbs".format(co2) , font=font, fill=fill_color)
draw.text((xpos, line2), str(trees), font=font, fill=fill_color) draw.text((xpos, line2), "{:,}".format(trees), font=font, fill=fill_color)
image.save(outfile) image.save(outfile)