How to show a bitmap on the screen of Verifone VX 520

I am trying to display a bitmap on a Verifone VX 520 screen.

I tried to use the put_BMP() function, but it returns -1 and the image is not displayed. The image is monochrome and 128x128 pixels. Here is the code:

 int main() { char bg[] = "background.bmp"; int display = open(DEV_CONSOLE, O_WRONLY); put_BMP(bg); return 0; } 

How to do it?

+5
source share
1 answer

Here are some things to check:

1) "[ put_BMP() ] is only available in pixel mode ." To put the terminal in pixel mode, you call set_display_coordinate_mode(PIXEL_MODE); Remember to return it by calling set_display_coordinate_mode(CHARACTER_MODE); when you are done.

2) "The file must be uncompressed ."

3) "The file must be monochrome or 4-level gray." (I see you do it)

4) "The file should be 128 pixels wide and either 64 pixels high (Vx510, 570, 610) or 128 pixels high (Vx 670)." Note that the 520 is not on this list, however the 520 and 570 are very similar in many ways, and the screen size is one of them. If you use an image with a size of 128 pixels, you will only see its top.

5) In addition, do not forget to copy the file to the terminal . I do this more often than I have to admit.

The following code:

 set_display_coordinate_mode(PIXEL_MODE); put_BMP("StackOverflow.bmp"); set_display_coordinate_mode(CHARACTER_MODE); 

uses a 128 x 64 pixel logo and results in:

put_BMP result

+12
source

All Articles