Constant bitmap work around

Use this work around if you want to:

  • have faster screen updates when displaying pictures
  • reduce the risk of freezing applications due to data loss
  • work without files system but with bitmaps

This work around consists of ZB.lcd.showbmp.extended.vi that can be used as a replacement for zb.lcd.showbmp.vi.
It has the same connector pane as zb.lcd.showbmp.vi. If a bitmap with unknown file name is to be displayed, the vi calls zb.lcd.showbmp.vi. If a bitmap with known file name (a case in the case structure is named after the bitmap) the draw pixmap function is called with a constant that holds the picture information.

The second VI in the ZIP file (convert bmp 2 const.vi) is the conversion tool it reads in a bitmap file and displays it in a 2d array of color informations.

To add your own bitmaps complete the following steps:

  1. copy ZB.lcd.showbmp.extended.vi in to your project folders
  2. run convert bmp 2 const.vi
  3. Right click on the indicator “Array” and choose → Data Operations → Copy Data
  4. duplicate the “test.bmp” case in ZB.lcd.showbmp.extended.vi
  5. name the case after the bitmap
  6. paste the data in the constant array within you new case.
  7. repeat steps 3 - 7 for all bitmaps that you would like to have as constants in your application
  8. replace zb.lcd.showbmp.vi in your application with the copy of ZB.lcd.showbmp.extended.vi from your project folders.
 
constant_bitmap.txt · Last modified: 2017/11/07 22:26 by 127.0.0.1
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki