The previous post "Tinygui drawing example" introduced the Tinygui Library's drawing function, next will introduce the bitmap display, because CORTEX-M3 Development Board's RAM is relatively small, for example em-stm3210e only 128K, therefore displays the bitmap to be a more difficult matter, like 320* The 240 16-bit bitmap size is 150K, and the RAM memory requirement is at least greater than 150K due to the official WPF drawing with a BMP bitmap as the base. Tinygui is directly to the video memory to draw, there is no direct demand for RAM, of course, if the ram is small enough, the entire bitmap should be divided into pieces.
Because the current CORTEX-M3 chip frequency is low, so in order to speed up the display of bitmaps, the introduction of the Tinybmp bitmap format, the format is actually very simple, a file header, data content and LCD memory data exactly the same.
In order to facilitate the common picture conversion to tinybmp, I developed a conversion tool, the program is very simple, generally set the converted picture size, directly save.
(The tool is in this sample source code package)
Tinybmp can be stored in resources or in Flash, but there is a disadvantage in resources that the size of the resource is limited by RAM, because when the TINYCLR loads the application, it loads all the resources into memory. and store in Flash does not have this limit, as long as you show the picture is not larger than the limited RAM, so long as the flash is large enough, you can store and display enough pictures.
This way I wrote a bitmap display example, which is used in both ways.