Skip to content

HX8357: Mirroring and Color issues #128

Open
@Tetrikus

Description

@Tetrikus

If I just use the library as it is, my displays (HX8357d) have two issues:

  • The displayed image is mirrored X <-> Y
  • The colors seems kind of inverted (or maybe better just BGR instead of RGB

I tried the following:


I changed (_MADCTL, b"\xa0") to (_MADCTL, b"\x20")

This fixes the mirroring of the image.

But the colors are still behaving odd. Some JPG images are displayed correct (does this make any sense?). But most (PNG and JPG) look inverted (except white and black). Also, if I draw text, the colors are displayed in BGR instead of RGB. Any idea how I could adapt the library to fix this as well?

(_COLMOD, b"\x55"),  # 16 bit
(_MADCTL, b"\xc0"),
(_TEON, b"\x00"),
(_TEARLINE, b"\x00\x02"),  # TW off
(_SLPOUT, None),
(_MADCTL, b"\x20"),
(_DISPON, None),

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