8000 Data in displayio.Bitmap is mirrored for depths < 8 · Issue #6675 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
Data in displayio.Bitmap is mirrored for depths < 8 #6675
Open
@deshipu

Description

@deshipu

CircuitPython version

Adafruit CircuitPython 8.0.0-alpha.0-dirty on 2022-07-26; S2Mini with ESP32S2-S2FN4R2

Code/REPL

>>> b = displayio.Bitmap(8, 8, 65526)
>>> m = memoryview(b)
>>> b[0, 0] = 1
>>> m[0]
1
>>> b = displayio.Bitmap(8, 8, 256)
>>> m = memoryview(b)
>>> b[0, 0] = 1
>>> m[0]
1
>>> b = displayio.Bitmap(8, 8, 16)
>>> m = memoryview(b)
>>> b[0, 0] = 1
>>> m[0]
0
>>> m[1]
0
>>> m[2]
0
>>> m[3]
16

Behavior

When the depth is less than 8, the data inside the bitmap is saved right to left instead of left to right. This makes writing image loaders harder, as we have to consider every depth separately, instead of just dumping the image data into the bitmap.

Description

No response

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0