Demonstration of the Bitmap rendering - reads BMP and JPG files in many format variants and renders to the screen.

Dependencies:   FlashFileSystem mbed RA8875

Bitmap and JPEG Demo

This demo publishes each graphic file from a list of files to the display. The graphic files can be BMP, JPG, or ICO. On the terminal it displays the filename and the return-code (in case of an error). This demo works as intended on the 480x272 display in either 8 or 16 bit per pixel mode and it should work on larger displays.

Items of interest to change and rebuild/test:

// Not all systems have the LocalFileSystem. Plug in the library and driver for yours.
LocalFileSystem local("local");             // Image source

TestImage_T TestImage[] = {
    { 0, 0, "/local/01601602.bmp"},
    { 0, 0, "/local/48027202.bmp"},
    { 0, 0, "/local/48027204.bmp"},
    { 0, 0, "/local/48027208.bmp"},
    { 0, 0, "/local/48027224.bmp"},
    { 0, 0, "/local/p480272.jpg"},
    { 0, 0, "/local/p480272.bmp"}
};

// deefine your screen size and color depth. 
#define SCREEN_W 480
#define SCREEN_H 272
#define SCREEN_BPP 16

LocalFileSystem may need to be altered to SDFileSystem (for example) and the corresponding paths in the TestImage array.

Also, the Screen size and bit per pixel color depth.

Images

The following image files are saved in different resolution and color depth. The first, and smallest, was simply for developing the monochrome support. Others are 4-bit color, 8-bit color, 24-bit color, and a mislabeled 1-bit color (shown as 02).

/media/uploads/WiredHome/testimages.zip

Changes

RevisionDateWhoCommit message
20:583a7555ec2f 2020-03-29 WiredHome Pick up a bug-fix on jpeg rendering default tip
19:853f3668db17 2020-03-28 WiredHome Breaking change update to RA8875 Library. Improved APIs, Improved Portrait Mode, Code Cleanup.
18:dafd8eb3cebf 2019-03-04 WiredHome Update RA8875 Lib to add GSL1680 support.
17:14385f75449d 2018-07-17 WiredHome Add FlashFileSystem to the demo.
16:987892bebe05 2018-07-17 WiredHome Repurposed to pull images from LocalFileSystem and FlashFileSystem
15:f33dcd24d8d1 2016-08-06 WiredHome Update to latest libraries and test with both 480x272 and 800x480 screens.
14:694822610507 2016-08-03 WiredHome Changed a few images and repeat the test forever.;
13:5c69f3c304c8 2016-05-17 WiredHome Revised demo to also show JPEG files, not just BMP files.
12:93adb3470150 2016-05-17 WiredHome Working - original malloc was incorrect - causing out of bounds corruption.
11:0c2ff405c1c1 2016-05-17 WiredHome working - adding instrumentation
10:e5eb5f6294fd 2016-05-16 WiredHome not working - added instrumentation
9:092f7ac73c03 2016-05-16 WiredHome Working - modified instrumentation
8:caad7dbb4eda 2016-05-16 WiredHome Not working - add instrumentation.
7:f96367d6e3e2 2016-05-16 WiredHome Added additional tracers
6:0d2003e1d114 2016-05-16 WiredHome Add JDEC memory dump
5:0330a01310ae 2016-05-16 WiredHome Added display of JDEC at creation of huffman table
4:12a2675c2b80 2016-05-16 WiredHome add instrumentation
3:533ced3d7c39 2016-05-16 WiredHome add instrumentation
2:1e1dd697d12d 2016-05-16 WiredHome Jpeg not yet working, just an intermediate checkpoint.
1:84fb3e9adaaf 2016-05-15 WiredHome Working JPEG decoder using c functions external to the graphics library.
0:9ecf49d75058 2016-04-27 WiredHome Demonstration that loads various bitmap files of different color depth.