C Language Development Kit/Functions/ShowPicture

From OptiWiki

Jump to: navigation, search
Description Places a bitmap on the screen.
void showpicture(int x, int y, const char * ptr);
int x, int y
The screen coordinates of the upper left corner of the picture.
const char * ptr
The pointer to the user bitmap. This user bitmap has a slightly modified standard Windows BMP format.

Use the bitmap converter program BMPTOH.EXE to convert a black and white Windows .BMP file to a .H file, that can be included in a C application.

Returns None
Remarks The maximum size of the picture depends on the handheld terminal's display size.

See the table below for the size of the display for the various terminals. Note that the coordinates of the upper left corner of the display are (0,0), the coordinates of the lower right corner are also shown in the table below:

OPH1004 & H13 OPH1003 PHL1300 PHL1700 PHL2700 OPL97xx DCL153x
LCD size in pixels 128 * 128 112 * 128 96 * 64 96 * 48 128 * 64 112 * 62 112 * 64
Coordinate of lower right corner 127,127 111,127 95,63 95,47 127,63 111,63 111,63
// Create a black and white (monochrome) picture with MS Paint (windows application)
// and save it as EXAMPLE.BMP file (modified Windows bitmap).
// Next, run the BMP to H converter BMPTOH.EXE to create a file called example.h
// (Open the bitmap, select the display size, and select the 'save as' option
// to convert the file)
// Now we have an include file that contains the data of the modified Windows bitmap.
// An example of an application that shows the picture is shown below:
#include "lib.h"
#include <"example.h">
void main( void )
    showpicture( 0, 0, _example);
    while( 1 )

Personal tools