diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.py index 8a92e16e..984034ae 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.py @@ -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 ### \ No newline at end of file