diff --git a/adafruit_pybadger/pybadger_base.py b/adafruit_pybadger/pybadger_base.py index 67f4443..50fe49d 100644 --- a/adafruit_pybadger/pybadger_base.py +++ b/adafruit_pybadger/pybadger_base.py @@ -538,8 +538,7 @@ def show_business_card( business_card_label_groups.append(email_two_group) business_card_splash = displayio.Group() - image_file = open(image_name, "rb") - on_disk_bitmap = displayio.OnDiskBitmap(image_file) + on_disk_bitmap = displayio.OnDiskBitmap(image_name) face_image = displayio.TileGrid(on_disk_bitmap, pixel_shader=on_disk_bitmap.pixel_shader) business_card_splash.append(face_image) for group in business_card_label_groups: diff --git a/examples/pybadger_pygamer_asyncio.py b/examples/pybadger_pygamer_asyncio.py index c3ac367..4a560c3 100644 --- a/examples/pybadger_pygamer_asyncio.py +++ b/examples/pybadger_pygamer_asyncio.py @@ -15,7 +15,7 @@ custom_line2 = "LAST" # also a great place to show a pronoun # Set up the custom image -qr_image = OnDiskBitmap(open("/QR_Blinka_CircuitPythonOrg.bmp", "rb")) +qr_image = OnDiskBitmap("/QR_Blinka_CircuitPythonOrg.bmp") qr_tg = TileGrid(qr_image, pixel_shader=qr_image.pixel_shader) qr_gp = Group() qr_gp.append(qr_tg)