PEM 1: INDEXED BY PIXEL

In this mode, each pixel in a row is fully specified before any bits are sent for the next pixel. The bits for each pixel form a palette index number. Assuming four bits per index, the underlined block below is the palette index for pixel two of row one (i1 is the least significant bit).

?*b#W row 1 i4 i3 i2 i1 i4 i3 i2 i1 . . .

?*b#W row 2 i4 i3 i2 i1 i4 i3 i2 i1 . . .

?*b#W row 3 i4 i3 i2 i1 i4 i3 i2 i1 . . .

Example:

In the example below the data in the row transfer commands are shown as two-digit hexadecimal numbers for clarity, even though the actual data would be byte-aligned binary data. The example is for a two-pixel-wide image.

?*v6W 00 01 04 08 08 08

Binary Data for the CID

 

command represented in

 

hexadecimal. This command

 

sets the color space to RGB, the

 

PEM to Indexed by Pixel, the

 

palette size to 16 (24). The last

 

three bytes are ignored.

?*r1A

Start raster

?*b1W45

The most significant nibble

 

selects palette entry 4 for the

 

first pixel. The second pixel is set

 

to index 5. Move to next row.

?*b1W6A

The first pixel is index 6, the

 

second pixel is index 10. Move to

 

the next row.

?*b1W03

The first pixel is index 0, the

 

second pixel is index 3.

EN

Using Color Modes 2-9

Page 33
Image 33
HP L 5 manual PEM 1 Indexed by Pixel