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
History
Pick up a bug-fix on jpeg rendering
2020-03-29, by WiredHome [Sun, 29 Mar 2020 18:13:41 +0000] rev 20
Pick up a bug-fix on jpeg rendering
Breaking change update to RA8875 Library. Improved APIs, Improved Portrait Mode, Code Cleanup.
2020-03-28, by WiredHome [Sat, 28 Mar 2020 15:29:51 +0000] rev 19
Breaking change update to RA8875 Library. Improved APIs, Improved Portrait Mode, Code Cleanup.
Update RA8875 Lib to add GSL1680 support.
2019-03-04, by WiredHome [Mon, 04 Mar 2019 12:08:42 +0000] rev 18
Update RA8875 Lib to add GSL1680 support.
Add FlashFileSystem to the demo.
2018-07-17, by WiredHome [Tue, 17 Jul 2018 23:33:06 +0000] rev 17
Add FlashFileSystem to the demo.
Repurposed to pull images from LocalFileSystem and FlashFileSystem
2018-07-17, by WiredHome [Tue, 17 Jul 2018 23:23:00 +0000] rev 16
Repurposed to pull images from LocalFileSystem and FlashFileSystem
Update to latest libraries and test with both 480x272 and 800x480 screens.
2016-08-06, by WiredHome [Sat, 06 Aug 2016 14:50:25 +0000] rev 15
Update to latest libraries and test with both 480x272 and 800x480 screens.
Changed a few images and repeat the test forever.;
2016-08-03, by WiredHome [Wed, 03 Aug 2016 11:08:02 +0000] rev 14
Changed a few images and repeat the test forever.;
Revised demo to also show JPEG files, not just BMP files.
2016-05-17, by WiredHome [Tue, 17 May 2016 22:33:54 +0000] rev 13
Revised demo to also show JPEG files, not just BMP files.
Working - original malloc was incorrect - causing out of bounds corruption.
2016-05-17, by WiredHome [Tue, 17 May 2016 22:06:13 +0000] rev 12
Working - original malloc was incorrect - causing out of bounds corruption.
working - adding instrumentation
2016-05-17, by WiredHome [Tue, 17 May 2016 10:45:59 +0000] rev 11
working - adding instrumentation