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.
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?
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.
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 (Truevision TGA - Wikipedia). Gimp can still save pictures as .tga files, so it is easy to convert pictures into .tga.
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).
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 Electronics - Henning Karlsen.
I am not sure if the Arduino is fast enough for the touch-and-drag function you want, though...
doc_norway:
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).
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 Electronics - Henning Karlsen.
GREAT!! Thanks!!! XD
I am not sure if the Arduino is fast enough for the touch-and-drag function you want, though...