fix
This commit is contained in:
parent
454d77632f
commit
f2965f3034
@ -29,10 +29,17 @@ try:
|
|||||||
font20 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 20)
|
font20 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 20)
|
||||||
font18 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 18)
|
font18 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 18)
|
||||||
|
|
||||||
|
# Drawing on the Horizontal image
|
||||||
|
logging.info("1.Drawing on the Horizontal image...")
|
||||||
HBlackimage = Image.new('1', (epd.height, epd.width), 255) # 298*126
|
HBlackimage = Image.new('1', (epd.height, epd.width), 255) # 298*126
|
||||||
|
HRYimage = Image.new('1', (epd.height, epd.width), 255) # 298*126 ryimage: red or yellow image
|
||||||
drawblack = ImageDraw.Draw(HBlackimage)
|
drawblack = ImageDraw.Draw(HBlackimage)
|
||||||
|
drawry = ImageDraw.Draw(HRYimage)
|
||||||
drawblack.text((10, 0), 'hello world', font = font20, fill = 0)
|
drawblack.text((10, 0), 'hello world', font = font20, fill = 0)
|
||||||
drawblack.text((10, 0), 'hier bin ich', font = font20, fill = 0)
|
drawblack.text((10, 20), '2.13inch e-Paper bc', font = font20, fill = 0)
|
||||||
|
epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage))
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
|
||||||
logging.info("4.read bmp file on window")
|
logging.info("4.read bmp file on window")
|
||||||
blackimage1 = Image.new('1', (epd.height, epd.width), 255) # 298*126
|
blackimage1 = Image.new('1', (epd.height, epd.width), 255) # 298*126
|
||||||
|
Loading…
Reference in New Issue
Block a user