Graphic commands examples, Bit images and graphics – Bematech MP-2100 TH User Manual

Page 22

Advertising
background image

User’s Manual

22

Graphic Commands Examples

24-bit graphics

For this 24-bit graphic pattern we have eight bit-
columns, each with a height of 3 bytes (24 bits). The
printer must, after the command is stated, receive the
1st , 2nd and 3rd bytes of the first bit-column, than
the 1st , 2nd and 3rd bytes of the second bit-column
and so on, until the last bit-column is filled.

The command sequence to print this graphic pattern would be (numbers in decimal):
ESC * ! 8 0 1 1 1 2 2 2 4 4 4 8 8 8 16 16 16 32 32 32 64 64 64 128 128 128
Where you have 8 + 0 * 256 = 8 bit-columns to be filled, each with 3 bytes that will give us a total of 24 bytes
to be sent (excluding the command sequence).

8-bit graphics

For this 8-bit graphic pattern we have eight bit-columns,
each with a height of 1 byte (8 bits). The printer must,
after the command is stated, receive the byte for the
first bit-column, than the byte for the second bit-column
and so on, until the last bit-column is filled. The
resolution is lower but needs less bytes to be sent to
the printer.

Bit Images And Graphics

ASCII

Dec

Hex

Description

ESC $ n1 n2

36

24

Fill in blank bit columns, from the actual column until column number
(n1+n2*256), where n1+n2*256<=576.

ESC * ! n1

42 33

2A 21

24-bit graphics. Programs bit image for 24 bits, in double density

n2 b1...bn

where n1+n2*256 is the number of bit-columns that will be sent
(see below) and b1...bn are the bytes that compose the bit image.
For each column one may need 3 bytes to complete. So, if you need
to send an image with an 8-column width you may send 24 bytes to
fill those columns. A full line has 576 bit columns so a full line will
need 576*3 = 1728 bytes.

ESC K n1

75

4B

8-bit graphics. Selects the “8 pin” bit image (compatible with

n2 b1...bn

matrix printers) where you use n1+n2*256 columns, with 1 byte
per column thus using a lower resolution and up to 576 columns.

MSB (bit 7)

3

rd

byte

1

st

bit-

column

Figure 12

LSB (bit 0)

8

th

bit-

column

1

st

byte

2

nd

byte

1

st

bit-column

8

th

bit-column

1 byte

LSB (bit 0)

MSB (bit 7)

Figure 13

Advertising