diff --git a/examples/epd_bitmap.py b/examples/epd_bitmap.py index 1daa25a..f5f19ad 100644 --- a/examples/epd_bitmap.py +++ b/examples/epd_bitmap.py @@ -49,7 +49,7 @@ display.rotation = 0 -FILENAME = "blinka154mono.bmp" +FILENAME = "blinka.bmp" def read_le(s): @@ -68,7 +68,7 @@ class BMPError(Exception): def display_bitmap(epd, filename): # pylint: disable=too-many-locals, too-many-branches try: - f = open("/" + filename, "rb") + f = open(filename, "rb") except OSError: print("Couldn't open file") return diff --git a/examples/epd_pillow_image.py b/examples/epd_pillow_image.py index 3ba2fb3..eefa11c 100644 --- a/examples/epd_pillow_image.py +++ b/examples/epd_pillow_image.py @@ -71,7 +71,10 @@ # Crop and center the image x = scaled_width // 2 - display.width // 2 y = scaled_height // 2 - display.height // 2 -image = image.crop((x, y, x + display.width, y + display.height)) +image = image.crop((x, y, x + display.width, y + display.height)).convert("RGB") + +# Convert to Monochrome and Add dithering +# image = image.convert("1").convert("L") # Display image. display.image(image)