You have unsaved changes. If you choose to leave all changes will be discarded.
Author: Stevan Milinkovic
Last Updated: 2013-04-26
Category: Graphics & LCD
Downloaded: 583 times
Want to view your JPEG pictures directly from microSD? Now it is possible on EasyMx PRO v7 for STM32 ARM. There is no need for Visual TFT. You even don’t have to know you JPEG files in advance. Just install the library, insert the microSD with your pictures and run your application.
Do you want to subscribe in order to receive notifications regarding "JPEG direct load from MMC" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "JPEG direct load from MMC" changes.
Do you want to report abuse regarding "JPEG direct load from MMC".
|DOWNLOAD LINK||RELATED COMPILER||CONTAINS|
|1366975583_jpeg_direct_load_mikroc_arm.zip [10.45KB]||mikroC PRO for ARM||
JPEG direct load from MMC
2012-07-30: version 0.0.0.1
Want to view your JPEG pictures directly from microSD? Now it is possible on EasyMx PRO v7 for STM32 ARM. There is no need for Visual TFT. You even don’t have to know you JPEG files in advance. Just install the library, insert the microSD with your pictures and run your application. All JPEG decoding is done during the image loading process from MMC.
There are two demo applications, which are individually enabled or disabled by line #define DEMO_1. If you comment out this line, DEMO_2 will be compiled.
In the DEMO_1 application, there are four pictures of different sizes. Demo shows autoscale and autorotation feature of the library. Of course, loading speed strongly depends on image size. So, be patient while loading big images.
Limitations: JPEG images up to 2560x1920 pixels (actually a little more, e.g. pictures taken by Canon PowerShot A530 are shown very well).
DEMO_2 compares two instances of the same image: one from code memory (as is in TFT example from Mikroelektronika) and another from MMC.
Function prototype: int TFT_Ext_Jpeg(FILE* fp)
In demo applications, value for fp is 0 because the library uses the already opened and activated file (Mmc_FAT16 file system). Pointer to ANSI FILE structure is for future use and is not implemented yet.
Please take a look at the memory usage after compilation of DEMO_1 (that is, without embedded “tiger” picture). You can see that required ROM space is about 20KB and RAM space is less than 5KB. Since the whole library is solely based on MikroC TFT library, it is expected to be portable to the other platforms.
The package name is “RAF”. Make sure that library TFT_Ext_Direct is checked.
Included JPEG demo files:
320x240.jpg 18 KB
640x480.jpg 55 KB
1280x960.jpg 121 KB
big.jpg 2560x1920 pixels 1156 KB
tiger.jpg 51 KB
Copy these files to your microSD card.
Note: Library distribution is only for STM32F107VC
2012-08-19: version 0.0.0.2
Library code is further optimized so memory footprint is smaller than in version 0.0.0.1. This doesn’t affect performance in any way.
Now, for DEMO_1 we have: Static RAM (bytes): 4018 and Used ROM (bytes): 20004 (8%). Note that these figures include memory usage for all necessary functions from System, MMC_FAT16, TFT, and dependent libraries.
In order to update the library, just replace old jpeg.emcl with new version.
2013-04-26: version 0.0.0.3 (source code)
Please feel free to use this source code for whatever you want. I hope that code is readable and that there are enough comments for you to understand it and to be able to port it to other platforms. If you need a “bigger picture” of how it works, please refer to my article:
You can get an implementation of the library and demo project for EasyMx Pro V7 for STM32 ARM if you click on [older versions]