bitmap from sd card

how would I go about displaying a bitmap from an SD card

I can add a .c tab to display a bitmap by using

tab name is lightOn.c

extern unsigned short lightOn[1150];

and somewhere in call the picture up to the screen by using

myGLCD.drawBitmap (290, 5, 25, 46, lightOn, i, 32, 32);

and a little picture I have drawn of a light bulb in paint and converted to a bitmap will show in the top corner of my screen.
but to save program space I wanted to call it up from an SD card instead of having loads of tabs for each bit map.

I'm using a qvt 320_240 tft which runs great with the UTFT library just haven't sussed the SD card out.

lightOn.c (11.1 KB)

lightOn.jpg

lightOff.c (11.1 KB)

lightOff.jpg

I wanted to call it up from an SD card instead of having loads of tabs for each bit map.

You need to define the array, read the data from the SD card, converting the strings in the file to ints to store in the array, and then you need to rewrite the function that displays the bitmap (because the existing function expects the arrayo to be in PROGMEM, which is read-only at run time).