Arduino Forum

Using Arduino => Displays => Topic started by: sarkar on May 10, 2011, 05:52 pm

Title: How to display images from SD card on a color screen?
Post by: sarkar on May 10, 2011, 05:52 pm
I wish to start a project with touchscreen. My idea is that, there will be a background image and a layer in which there will be a smaller image. One can move the smaller image on the background by touching and dragging it. :D

Now, the Basic Question is that, how to display an image on any tft/lcd/oled display?
Is there any library to display JPG, BMP or PNG image?
AND What's the best hardware to use with Arduino Uno, to perform the above task? :smiley-roll:
Title: Re: How to display images from SD card on a color screen?
Post by: johnwasser on May 10, 2011, 06:26 pm
320x240 color touch-screen + SD card slot:
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=3&products_id=55  $20.50

Arduino shield for the above:
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=18&products_id=149  $4.80

The LCD is available in 8-bit and 16-bit bus flavors.

How to show images on this device:
http://iteadstudio.com/application-note/show-images-and-different-fonts-on-itdb02-series-lcd/
Title: Re: How to display images from SD card on a color screen?
Post by: AWOL on May 10, 2011, 06:36 pm
Quote
Is there any library to display JPG, BMP or PNG image?

JPEG on an AVR?
How long have you got?
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 10, 2011, 06:50 pm

Quote
Is there any library to display JPG, BMP or PNG image?

JPEG on an AVR?
How long have you got?


Well, I dunno much abt image processing. But as far as I know, JPEG is all about RGB matrix. What's the issue with AVRs?
Title: Re: How to display images from SD card on a color screen?
Post by: AWOL on May 10, 2011, 06:54 pm
Quote
JPEG is all about RGB matrix

JPEG has very little to do with RGB, it does all the compression in YUV.
There's the conversion from RGB to YUV, then the Discrete Cosine Transform, quantisation, run-length coding and Huffman coding (or the reverse, if you're decoding) on each of the components.
None of these operations is particularly well-suited to an 8 bit microcontroller with very limited RAM.
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 10, 2011, 08:33 pm
hmm.. ok... :smiley-roll-sweat:

now, let me know how to display bitmaps or png images on a display... :smiley-surprise:
Title: Re: How to display images from SD card on a color screen?
Post by: olikraus on May 10, 2011, 11:44 pm
png is also difficult to handle in general and the zlib will probably also not fit into the AVR. BMP also has a lot of flavors to handle. I personally would start to use tga (http://en.wikipedia.org/wiki/Truevision_TGA). Gimp can still save pictures as .tga files, so it is easy to convert pictures into .tga.

Oliver
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 11, 2011, 04:55 pm
thanks... well, for any image format... I wanna display it on any display...
pl continue suggestions... :D
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 11, 2011, 04:59 pm

320x240 color touch-screen + SD card slot:
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=3&products_id=55  $20.50

Arduino shield for the above:
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=18&products_id=149  $4.80

The LCD is available in 8-bit and 16-bit bus flavors.

How to show images on this device:
http://iteadstudio.com/application-note/show-images-and-different-fonts-on-itdb02-series-lcd/


Hey johnwasser, please suggest me some more solutions if you know, so that I can compare the pros n cons... Well, Thanks for such a helpful post...! :smiley-surprise:
Title: Re: How to display images from SD card on a color screen?
Post by: doc_norway on May 14, 2011, 01:11 am
If you should go for the display and shield mentioned earlier in this thread you can display images easily with my libraries (also mentioned in the app-note mentioned).

Libraries:
ITDB02_Graph : http://www.henningkarlsen.com/electronics/a_l_itdb02_graph.php (http://www.henningkarlsen.com/electronics/a_l_itdb02_graph.php)
ITDB02_tinyFAT : http://www.henningkarlsen.com/electronics/a_l_itdb02_tinyfat.php (http://www.henningkarlsen.com/electronics/a_l_itdb02_tinyfat.php)
tinyFAT : http://www.henningkarlsen.com/electronics/a_l_tinyfat.php (http://www.henningkarlsen.com/electronics/a_l_tinyfat.php)

The ITDB02_tinyFAT library has demos showing how to load images from a SD card and displaying them on the screen.
A tool to convert images to the required format is included with the ITDB02_Graph library (Windows only), and a web-version of the tool is available at http://www.henningkarlsen.com/electronics/t_imageconverter565.php (http://www.henningkarlsen.com/electronics/t_imageconverter565.php).

I am not sure if the Arduino is fast enough for the touch-and-drag function you want, though...

/Henning
Title: Re: How to display images from SD card on a color screen?
Post by: johnwasser on May 14, 2011, 01:43 am

Hey johnwasser, please suggest me some more solutions if you know, so that I can compare the pros n cons...


You want more?  Try

http://www.google.com/search?q=Arduino+Touchscreen
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 15, 2011, 11:44 am

If you should go for the display and shield mentioned earlier in this thread you can display images easily with my libraries (also mentioned in the app-note mentioned).

Libraries:
ITDB02_Graph : http://www.henningkarlsen.com/electronics/a_l_itdb02_graph.php (http://www.henningkarlsen.com/electronics/a_l_itdb02_graph.php)
ITDB02_tinyFAT : http://www.henningkarlsen.com/electronics/a_l_itdb02_tinyfat.php (http://www.henningkarlsen.com/electronics/a_l_itdb02_tinyfat.php)
tinyFAT : http://www.henningkarlsen.com/electronics/a_l_tinyfat.php (http://www.henningkarlsen.com/electronics/a_l_tinyfat.php)

The ITDB02_tinyFAT library has demos showing how to load images from a SD card and displaying them on the screen.
A tool to convert images to the required format is included with the ITDB02_Graph library (Windows only), and a web-version of the tool is available at http://www.henningkarlsen.com/electronics/t_imageconverter565.php (http://www.henningkarlsen.com/electronics/t_imageconverter565.php).



GREAT!! Thanks!!! XD

Quote
I am not sure if the Arduino is fast enough for the touch-and-drag function you want, though...
:~
Title: Re: How to display images from SD card on a color screen?
Post by: sarkar on May 15, 2011, 11:46 am


Hey johnwasser, please suggest me some more solutions if you know, so that I can compare the pros n cons...


You want more?  Try

http://www.google.com/search?q=Arduino+Touchscreen

Like!