Go Down

Topic: Sainsmart 3.2 display bitmap problem (Read 879 times) previous topic - next topic

sotirisk

Hello,

I have a problem with my 3.2 display when I want to display images.

I tried the code from Jarduino project and the images appear correctly.
I tried importing these .c files into my code (which is based in the UTouch 320x240 example by Hanning Karlsen)
and the images appear corrupted.
Dimensions etc. are correct.

Any ideas / did someone had the same issue?
I tried arduino versions 1.03, 0.22 and 0.23 and the latest UTFT library (2.0) but with no luck.

I am not trying to read from an SD, I just want to display an image that I will have in the EEPROM.
Tonto el que no entienda

guix

What do you mean corrupted if "dimensions etc are correct" ? A picture (of the original and the corrupted, side by side) is worth 1000 words :)

My guess is that it's a bit order problem.. If you post the picture's .c file I may take a look :)

sotirisk

Hello and thank you for your reply.
I am using an image from Jarduino that I can compile properly (using 022 arduino platform) and the SAME image (copy/pasted the code) that it doesn't appears correctly in my program. I used the same memory address with Jarduino code (0x24D).

The code I am using is simple but I don't know if it is correct as I am not really into it yet.

I'm attaching 2 photos I took from my screen, one with the Jarduino image and the other with my program (but same image).
It appears completely corrupted.

Code: [Select]
unsigned int *Pic;               //Pointer to the Lunar Phase Pics
extern unsigned int                  //Lunar Phase Pics
Last_Quarter[0x24D];


/*************************
**   Custom functions   **
*************************/

void drawButtons()
{
delay(500);
  myGLCD.drawBitmap(200, 180, 58, 58, Pic);
  delay(500);
Tonto el que no entienda

Go Up