Python + generating images + text
Source: https://hackaday.com/2018/03/21/making-pictures-worth-1000-words-in-python/
Install the library: sudo pip install pillow
The code:
#!/usr/bin/env pythonfromPILimportImage, ImageDraw, ImageFont# Text positioningtext_y=100text_pad=45# Define fonts for regular text and headingdata_font=ImageFont.truetype("Roboto-Regular.ttf",32)header_font=ImageFont.truetype("Roboto-Bold.ttf",50)# Load background imagebg_img=Image.open("bg_img.png")surface=ImageDraw.Draw(bg_img)# Write headingsurface.text((20,8),"Temperature Log", font=header_font)# Write temperaturesforxinrange(len(temps)):surface.text((20, (text_y+(text_pad*x))), temps[x], font=data_font)# Save filebg_img.save(open("temp_log.png","wb"),"PNG")
Powershell + Mikrotik backups BSOD 0x0000007B Windows 7 / Windows Server 2008 R2 – 2
Comments are currently closed.