From 019794911279a829e2082af15e53ffb03cc2c855 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 13 Aug 2023 15:30:48 -0400 Subject: [PATCH] Update rpitx.py with white and black text in sstv --- rpitx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpitx.py b/rpitx.py index 16bb7506..4ec57c75 100644 --- a/rpitx.py +++ b/rpitx.py @@ -393,7 +393,8 @@ if __name__ == "__main__": print("Photo taken") file='/home/pi/CubeSatSim/camera_out.jpg' - font1 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 20) + font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) + font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 20) try: filep = open("/home/pi/CubeSatSim/telem_string.txt") @@ -406,6 +407,8 @@ if __name__ == "__main__": img = Image.open(file) draw = ImageDraw.Draw(img) + draw.text((10, 10), callsign, font=font2, fill='white') + draw.text((120, 10), telem_string, font=font2, fill='white') draw.text((10, 10), callsign, font=font1, fill='black') draw.text((120, 10), telem_string, font=font1, fill='black') img.save(file)