18 lines
434 B
Python
18 lines
434 B
Python
from lib import epd4in2
|
||
import os
|
||
#picdir = os.path.join(os.path.dirname(os.path.realpath(__file__)),'pic'
|
||
from PIL import Image
|
||
|
||
epd = epd4in2.EPD()
|
||
epd.init()
|
||
|
||
image = Image.open('./document.bmp')
|
||
image = image.convert('L')
|
||
epd.display_4Gray(epd.getbuffer_4Gray(image))
|
||
epd.sleep()
|
||
|
||
## version grayscale
|
||
#epd.Init_4Gray()
|
||
#Himage = Image.open(os.path.join(picdir, 'book_base.bmp'))
|
||
#epd.display_4Gray(epd.getbuffer_4Gray(Himage))
|
||
|