HP (Hewlett-Packard) PCL 5 Printer User Manual


 
Draw fourth raster image (same image using long form of CID command)
Send long form of the
Configure Image Data
command (select RGB color
model, pixel encoding to
direct by pixel, set bits per
index to 0 [ignored parame-
ter], and specify 8 bits
for each primary color,
followed by the white/black
references)
?*v18W00h 03h 00h 00h 00h 00h 00h ffh 00h ffh 00h ffh
00h 00h 00h 00h 00h 00h
(The black and white references are written as 2-byte
values, requiring 12 bytes to write the 6 reference values.
The white reference is 255=00000000 11111111 [binary]
and the black reference is 0=00000000 00000000 [binary])
Position the cursor 1" from
left margin and 1/3" below
current position
?*p300x+100Y
Start raster graphics with
the current x position as
the left graphics margin.
?*r1A
Enter mode 0 compression
(uncompressed)
?*b0M
Transfer data by row with
4200 bytes/row
?*b4200W
(This section is shown in C code to show how Raster data is formatted.)
for (i=0;i<200;i++) /* Red block */
fprintf(prn, “%c%c%c”,255,0,0)
for (i=0;i<200;i++) /* Green block */
fprintf(prn, “%c%c%c”,0,255,0)
for (i=0;i<200;i++) /* Blue block */
fprintf(prn, “%c%c%c”,0,0,255)
for (i=0;i<200;i++) /* Send 4 more blocks of color*/
fprintf(prn, “%c%c%c”,216,218,50)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,249,120,15)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,158,81,200)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,45,120,249)
6-50 Raster Graphics6-50 Raster Graphics