I'm trying to show a bitmap image on a Verifone VX 520 screen.
I tried using the put_BMP()
function but it returns -1
and the image doesn't show. 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 do I accomplish this?
End-of-service date has been set to April 30, 2023, so all businesses still using the Verifone Vx520 will have to replace it with a newer device by then to keep processing transactions and avoid downtime.
The Vx520 has a thermal printer, meaning that it does not take any ink or ribbons. Only thermal paper rolls can be used.
Here are some things to check:
1) "[put_BMP()
] is available only in pixel mode." To put the terminal into pixel mode, you call set_display_coordinate_mode(PIXEL_MODE);
Don't forget to put it back 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 are doing this)
4) "The file should be 128 pixels wide and either 64 pixels high (Vx510, 570, 610) or 128 pixels high (Vx 670)." Note that 520 is not on this list, however the 520 and the 570 are very similar in many ways and the screen size is one of them. If you use a pic that is 128 pixels high, you'll only see the top 1/2 of it.
5) Also, don't forget to copy the file to the terminal--I do that more often than I care to admit.
The following code:
set_display_coordinate_mode(PIXEL_MODE);
put_BMP("StackOverflow.bmp");
set_display_coordinate_mode(CHARACTER_MODE);
uses a logo that is 128 x 64 pixels and results in:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With