Pages: [1]   Go Down
Author Topic: Sainsmart 3.2 display bitmap problem  (Read 686 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Tonto el que no entienda

France
Online Online
God Member
*****
Karma: 34
Posts: 975
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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);


* jarduino_full_moon.png (127.74 KB, 262x202 - viewed 14 times.)

* jarduino_full_moon_not.png (446.42 KB, 550x381 - viewed 15 times.)
Logged

Tonto el que no entienda

Pages: [1]   Go Up
Jump to: