How to read image file from SD card and display on LCD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-06 11:45 PM
Hi,
I am using STM32F103ZET6 development board interfaced with micro SD card. I am able to read and write data to the text file created in SD card using FAFTS but unable to read and display images stored in SD card on LCD display. Can anybody suggest me how to overcome my problem and resolve the issue at earliest. Regards,Aradhya- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-07 7:05 AM
I guess you need to start by understanding bitmap formats, and how the pixel data is encoded into the bytes within the file?
The files read just like any other stream of bytes. You have to figure which specific formats you want to support, and then the function of your display, and the routines to plot points of colour.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-09 9:38 PM
Hi Clive, Thanks for your response i want read images stored in bitmap format, can i get some sample codes to know the basics of the bitmap image format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-10 6:08 AM
https://community.st.com/0D50X00009XkZvsSAF
This thread deals with BMP images and a 320x240 panelCompressed formats like JPEG/PNG can be significantly more complicated.The web should have plenty of material covering video displays and bitmap formats.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-19 6:12 AM
Hi Clive, thank you for the useful information about bit map formats, understood the bit map format but have some doubt in below part i.e. what we are storing in w[i] array as per my knowledge i understood that we are converting 24 bit RGB image into 16bit RGB image, please help me out if i'm wrong on this part.
for(
i
=
0
; i<256; i++) // Build palette conversion (+0x46 count?)
{
uint32_t pal;
f_read(&fsrc, &pal, 4, &bytesread); // Read palette B G R
// BBBBBGGGGGGRRRRR 5:6:5
pal = ((pal & 0xF80000) >> 8) | ((pal & 0x00FC00) >> 5) | ((pal & 0x0000F8) >> 3);
w[i] = (uint16_t)pal;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-19 7:25 AM
Without digging through everything, I'd say this deals with an 8-bit BMP, with a 24-bit palette table, and the palette table is being reduce for the 16-bit colour depth of the display. The pixels are defined as an 8-bit index into the palette table.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-22 2:29 AM
Thank you very much for your suggestions, now i can able to display the 24bit bit map image on LCD module, but updation of image taking more time is their any way to reduce the interval
