"STM32. Net MF Development Board Learning-04" Tinygui Bitmap Display

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.