Minor day night changes

This commit is contained in:
Joe S 2020-12-20 21:12:55 -05:00
parent 0873ef3b4e
commit 1be15aa07a
3 changed files with 11 additions and 7 deletions

18
sstv.py
View File

@ -17,8 +17,12 @@ def mark_photo():
raw_img = Image.open("working/working.jpg") # Open the current working image raw_img = Image.open("working/working.jpg") # Open the current working image
img = raw_img.resize((320, 240), Image.ANTIALIAS) # resize it for the radio img = raw_img.resize((320, 240), Image.ANTIALIAS) # resize it for the radio
if False:
TINT_COLOR = (255, 255, 255) # White text bg TINT_COLOR = (255, 255, 255) # White text bg
TEXT_COLOR = (0,0,0)
else:
TINT_COLOR = (0, 0, 0) # Black text bg
TEXT_COLOR = (255,255,255)
TRANSPARENCY = .25 # Degree of transparency, 0-100% TRANSPARENCY = .25 # Degree of transparency, 0-100%
OPACITY = int(255 * TRANSPARENCY) OPACITY = int(255 * TRANSPARENCY)
overlay = Image.new('RGBA', img.size, TINT_COLOR+(0,)) overlay = Image.new('RGBA', img.size, TINT_COLOR+(0,))
@ -28,12 +32,12 @@ def mark_photo():
smallfont = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 17) smallfont = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 17)
draw.rectangle(((0, 0), (90, 20)), fill=TINT_COLOR+(OPACITY,)) draw.rectangle(((0, 0), (90, 20)), fill=TINT_COLOR+(OPACITY,))
draw.text((0, 0),"KW1FOX",(0,0,0),font=bigfont) # Draw KW1FOX in the top left draw.text((0, 0),"KW1FOX",TEXT_COLOR,font=bigfont) # Draw KW1FOX in the top left
draw.rectangle(((0, 40), (83, 100)), fill=TINT_COLOR+(OPACITY,)) draw.rectangle(((0, 40), (83, 80)), fill=TINT_COLOR+(OPACITY,))
draw.text((0, 40),"day: 25.2",(0,0,0),font=smallfont) draw.text((0, 40),"day: 25.2",TEXT_COLOR,font=smallfont)
draw.text((0, 60),"Volt: 13.8",(0,0,0),font=smallfont) draw.text((0, 60),"Volt: 13.8",TEXT_COLOR,font=smallfont)
draw.text((0, 80),"Miles: 1.02",(0,0,0),font=smallfont) #draw.text((0, 80),"Miles: 1.02",TEXT_COLOR,font=smallfont)
img = img.convert("RGBA") img = img.convert("RGBA")
img = Image.alpha_composite(img, overlay) img = Image.alpha_composite(img, overlay)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.