TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (91 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139271 times)
  2. FAT32 Library (71757 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47433 times)
  5. Network WiFi Library (43098 times)
  6. FT800 Library (42409 times)
  7. GSM click (29835 times)
  8. mikroSDK (28106 times)
  9. PID Library (26886 times)
  10. microSD click (26200 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Library

JPEG direct load from MMC

Rating:

5

Author: Stevan Milinkovic

Last Updated: 2013-04-26

Package Version: 0.0.0.3

Category: Graphics & LCD

Downloaded: 2482 times

Followed by: 1 user

License: MIT license  

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.

No Abuse Reported

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".

  • Information
  • Comments (6)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Library Blog

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: 

http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=6419451

You can get an implementation of the library and demo project for EasyMx Pro V7 for STM32 ARM if you click on [older versions]

ALSO FROM THIS AUTHOR

Porting FreeRTOS to MikroC for STM32 M3

0

This project is my first attempt of porting FreeRTOSV7.1.1 to CORTEX STM32F107 MikroC Version 2.5. Please feel free to experiment and let me know about your opinion.

[Learn More]