Skip to content

BMP not displaying properly using set_background() #56

Closed
@caternuson

Description

@caternuson

Guessing this is just something related to changes in CP.

Was using this BMP for testing:
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MagTag_Weather/bmps/weather_bg.bmp

And then this:

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit MagTag with ESP32S2
>>> from adafruit_magtag.magtag import MagTag
>>> magtag = MagTag()
>>> magtag.graphics.set_background("/bmps/weather_bg.bmp")
>>> magtag.display.refresh()
>>>

results in all dark display.

It seems to be MagTag library related. This example does work:

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit MagTag with ESP32S2
>>> import board
>>> import displayio
>>> display = board.DISPLAY
>>> bitmap = displayio.OnDiskBitmap("/bmps/weather_bg.bmp")
>>> tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)
>>> group = displayio.Group()
>>> group.append(tile_grid)
>>> display.show(group)
>>> display.refresh()
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions