![IDTECH Vivopay Neo 2 Скачать руководство пользователя страница 420](http://html.mh-extra.com/html/idtech/vivopay-neo-2/vivopay-neo-2_developers-manual_618786420.webp)
NEO 2 Interface Developer’s Guide
Copyright © 2019, International Technologies & Systems Corporation. All rights reserved.
420
16.
Appendix A.4: Preparing Bitmaps for Use with ILM
The serial ILM commands for language support require bitmap images to display messages. In
place of 22 text string messages, ILM commands use 22 bitmap images to display messages.
These bitmaps are downloaded to the reader as described in
The bit map images used for ILM support must be modified before they can be downloaded to
the reader. You need to make the following changes:
•
Replace the standard bmp header with a ViVOpay header
•
Invert the image orientation (top to bottom)
•
Invert the image color (black to white)
•
Reduce image size by cropping unused pixels
All processing of regular monochrome bitmaps must be done before attempting to download
the images to the reader. You cannot download color or grayscale images.
ViVOpay BMP Header
For each bitmap image, you must replace the standard bitmap header with a simplified
ViVOpay header. The ViVOpay bitmap header is 12 bytes of data in the format shown in the
following table, prefixed to the actual bitmap data:
Bytes
0-1
Bytes
2-3
Bytes
4-5
Bytes
6-7
Bytes
8-9
Bytes
10-11
Bytes
12…n
Bitmap
Length
Row Number
Column
Number
Height
Width
Reserved
Bitmap
data
All variables in the header are 2 bytes long.
Bitmap Length
This data field contains the total number of bytes in the Bitmap Data Field.
Row Number
This data field contains the row offset that this image should start at. Value is in PIXELS.
Column Number
This data field contains the column offset that this image should start at. Value is in
BYTES.
Height
This data field contains the number of rows (in pixels) that this image contains.
Width
This data field contains the number of columns (in bytes) that this image contains.
Reserved
This data field is reserved for future image manipulation options.
Bitmap Data
This is the actual image data.
Inverting the Image
The ViVOpay LCD expects each row of data in the opposite order than is in the bitmap. To
invert the image you can employ row swapping. Assuming the bitmap is a 128 x 64 pixel
image, each 16 bytes of data constitutes one “row” of 128 pixels (128 pixels / 8 pixels/byte =
16 bytes). Reversing the order of each 16 bytes of data in this case inverts the image.