![IDTECH Vivopay Neo 2 Developer'S Manual Download Page 421](http://html.mh-extra.com/html/idtech/vivopay-neo-2/vivopay-neo-2_developers-manual_618786421.webp)
NEO 2 Interface Developer’s Guide
Copyright © 2019, International Technologies & Systems Corporation. All rights reserved.
421
Inverting the Color
Compared to a regular monochrome bitmap, the image used with ILM commands has inverted
color. White areas of the bitmap must be black and black areas white. To invert the color, each
bit of a bitmap image must be reversed by performing a NOT operation on each byte of image
data.
For example, suppose that 8 pixels were stored as 0x43 (0100 0011 in binary). This value must
be reversed with the logical NOT to become 0xBC (1011 1100 in binary). Thus, 0xBC on an LCD
matches 0x43 displayed on a PC monitor.
Image Cropping
Although message bitmaps can be sent at maximum screen size, cropping the images speeds
the download and uses less memory. Cropping MUST be done after all other processing of the
bitmap image. Other operations may be done in any order (as long as cropping is done last).
Cropping the image requires that you include the row number, column number, height and
width parameters in the ViVOpay header. The Column Number/Row Numbers define where
the upper-left corner of the bitmap is positioned. The Height and Width parameters determine
the area the bitmap takes up on the LCD screen.
For example, here is a 128x64 pixel bitmap:
Here is the same image with unnecessary white space cropped out. It is now 50x10 pixels:
Cropping must be expressed in byte boundaries instead of pixels. For example, suppose you
want to crop pixels 0 – 11 of a row of 128 pixels. Byte 0 (containing pixels 0-7) can be cropped
but Byte 1 (containing pixels 8-15) cannot be cropped, because it contains bits of non-cropped