Convert a PIL Image (mode '1' or 'L') to a display buffer (the image itself).
(self, image)
| 75 | self._device.contrast(self._brightness * 17) |
| 76 | |
| 77 | def getbuffer(self, image): |
| 78 | """Convert a PIL Image (mode '1' or 'L') to a display buffer (the image itself).""" |
| 79 | if image.size != (self.width, self.height): |
| 80 | image = image.resize((self.width, self.height)) |
| 81 | return image.convert("1") |
| 82 | |
| 83 | def display(self, buf): |
| 84 | """Push a PIL Image (or getbuffer result) to the MAX7219 panels.""" |