Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,11 @@ def sleep(self):

epdconfig.delay_ms(2000)
epdconfig.module_exit()
### END OF FILE ###
def getbuffer_region(self, image):
# Accept any size image, convert to 1-bit, and invert bits for e-paper
img = image.convert('1')
buf = bytearray(img.tobytes('raw'))
for i in range(len(buf)):
buf[i] ^= 0xFF
return buf
### END OF FILE ###