Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image rotation in RA8875 #143

Open
mikey06355 opened this issue Aug 12, 2019 · 2 comments
Open

Image rotation in RA8875 #143

mikey06355 opened this issue Aug 12, 2019 · 2 comments

Comments

@mikey06355
Copy link

Using the example load24bitImages if I set rotation to a 1 or 3 (portrait mode) the image will not display. I am using an Adafruit 5" tft and a Teensy 3.2. Text rotate fine.
Thanks...Mike

@KurtE
Copy link

KurtE commented Sep 3, 2019

For what it is worth, I found that I had the same issue. Simply trying to draw an image I had stored in an array.

The issue is with the function drawPixels, that does not work properly in portrait mode. I believe this is because the underlying stuff is simply swapping the usage of what is horizontal and what is vertical...

I talk more about it in the Teensy forum thread: https://forum.pjrc.com/threads/57280-RA8875-from-Buydisplay?p=214506&viewfull=1#post214506

@KurtE
Copy link

KurtE commented Feb 1, 2020

@mikey06355 and @sumotoy (if you are at listening)...

A couple of us have been doing some work to make this driver work on the newer Teensy boards, in particular T4. We have a good working version up at: https://github.com/mjs513/RA8875/tree/RA8875_t4

One of the last things I added in our version is a function that is in some of our other drivers.

writeRect(int16_t x, int16_t y, int16_t w, int16_t h, const uint16_t *pcolors)

This function fills a rectangle on the screen with the bitmap data pointed to by pcolors. If in portrait mode, it will call drawPixels with a temporary buffer, where it will grab the pixels from the opposite direction... in order to get it right on the display...

More details up in the thread: https://forum.pjrc.com/threads/57280-RA8875-from-Buydisplay?p=228071&viewfull=1#post228071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants