HP (Hewlett-Packard) PCL 5 User Manual

PCL 5 Color Technical Reference Manual
Edition 1 E00994
5961-0635 Printed in U.S.A. 9/94
Notice
THIS MA T ERIAL, INCLUD ING , BUT NOT LIMIT ED TO, TH E IMPL IED WARRANTIES OF MERCHANTABILITY AND FIT NESS FOR A PARTICULAR P URPOSE. Hewlett­Packard shall not be liable for er rors co ntain ed herein or for incide ntal c on seque ntial d am­ages in connection with the fur nish in g, per for man ce, or use of this material.
This document con tains pr opr ietar y inf or mation whic h is protec ted by copy rig ht. All righ t s are reserved. No part of th i s documen t may be photoc opied, reproduc ed, or translated w ith­out the prior written consent of Hewlett-Packard Company.
Copyright © 1994 by HEWLETT-PACKARD CO.
Adobe, PostScript, and the PostScript logo are trademarks of Ado be Systems Inco rp orated which may be registered in certain jurisdictions. AppleTalk is a registered trademark of Apple Computer, Inc. PCL and Resolution Enhancement are registered tr ademar ks of Hewlett-Pac kar d Company. IBM is a registered trademark of International Business Machines Corporation.
First Edition Septembe r 1994
iiii
Inside This Manual
What You Can
Learn
From This Manual
Note All commands describe d in this manual are not nece ssarily
Manual Organization
This manual describes the PCL 5 commands used to print color on the HP Color LaserJe t and Desk Jet 1200C printers. Some of the main topic s include an overview of the color printing process, using palettes, choosing color modes, adjusting outpu t color to meet your requir eme nts, printing color raster graph ics, and HP-GL /2 ve cto r graphics. Ex amples are prov ided which demon str ate the use of the PCL 5 color commands.
supported by both printe rs. See the PCL 5 Comparison Guide for feature support inf ormation for eac h prin ter.
This manual is written primarily for users that are already familiar with PCL 5 printe r featur es. For infor mation on using PCL 5, see the PCL 5 Printer Language Technical Reference Manual.
This manual contain s seve n chapter s. A brief description of each chapter is prov ided below.
Chapter 1. C olo r Pr in ting Ov er vie w
This chapter explains back gro und in for mation about prin t­ing color docume nts usin g PCL 5. Topics include palettes, device-d epen de nt v s. device -in depe ndent color, color selec­tion, pixel encodin g, color modes, and c olor matchin g.
Chapter 2. Us in g Co lo r Mo des
Chapter 2 defines th e four color modes and desc r ibes how to use them, including descrip tion s of sen ding color raster data using different pixel encoding modes and color spaces.
iiiiii
Chapter 3. Us ing Pal ett es
This chapter descr ibes the palettes associated with the four color modes and explains how palettes are created, saved, and modified.
Chapter 4. Modifying Output Color
This chapter explains ho w color can be optimized by co m­pensating for differe nt con dition s, such as variation s in color due to light sou rces, limitations of the orig inal ar t­work and variation s in viewin g monitor s. Th e chapter details the use of halftone rendering algorithms, color lookup tables, gamma correction , and viewing illumin an t commands provide d so that user s can requ est and rece ive colored outpu t that match es the ir expec tation s.
Chapter 5. The PCL Print Model
Chapter 5 describes the pr int mode l and how it deter min es the printed outcome w he n vario us patter ns, colo rs, and im­ages are applied together on a page. This chapter di scus ses the role that logical operation s and transparenc y mode s have on this process.
Chapter 6. Ra ste r Gr ap hi cs
This chapter descr ibes the raster graph ics co mmand s and also compressing raster graphics images using various com­pression methods.
iviv
Chapter 7. C olo r Vector Graphi cs (H P-G L/2 )
This chapter di scu s ses pr in ting color pag es using HP-GL/ 2, the vector graphic s lan guag e inclu de d on all PCL 5 print­ers. The chapter desc ribes new and/or mod ified HP-GL/2 commands and how they are used to prin t with HP color printer s.
Index
This manual includes an index for quick access to PCL com­mand information.
Related Documents
The following documents provide related information about Hewlett-Pac kar d PCL 5 prin ter s.
PCL 5 Printer La ngua ge Technical Reference Ma nual
The PCL 5 Printer Language T echnical Reference Manual provides a description of the printer comman d langu ag e that controls PCL 5 prin ter s. Th e manual pr ov ides explana­tions of each PCL command, and examples demonstrating how the commands are used to manipulate the printe r. A lar ge portio n of th e manu al is devoted to HP-G L/2, the vector- b ased graph ics language in PCL 5 prin ter s.
PCL 5 Comparison Guide
This document provides printer-specific information on paper handling, internal fonts, PCL command support, and control panel in for mation . It identifies featu r e differ en ce s between the var ious PCL 5 printer s, and how the printers implement the commands describe d in the PCL 5 Printer Language Technical Refe re nc e Manual .
Printer Job Langua ge Technical Referen ce Manu al
This manual describes PJL, the HP printer job language used on many of the Hewlett-Pack ar d prin ter s. PJL is used for switching pr inter languages, r equ esting status informa­tion, changin g display messag es, in quir in g about featu r e settings, and other job-level functions.
PCL/PJL Technical Quick Re fere nce Gui de
This booklet is designed to prov ide quic k acce ss to the syn­tax of each PCL and PJL command. The commands are grouped by their func tion so that those familiar with PCL and/or PJL can fin d the syntax of a specific command w ith­out opening the manual.
vv
ContentsContents
1. Color Printing Overview
Color Concept s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Raster Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Raster Color vs. Non-Raster Color . . . . . . . . . . . . . . 1- 3
Device-D epen de nt vs. Devic e-I nd epen de nt Color. . . 1-3
Black and White Reference s . . . . . . . . . . . . . . . . . . . 1-4
Color Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Pixe l En c o ding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 -5
Color Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Device-Ind epen de nt Color . . . . . . . . . . . . . . . . . . . . . . . 1- 9
Device-D epen de nt Color. . . . . . . . . . . . . . . . . . . . . . . 1- 9
Dev ic e-In d e pen de n t Color . . . . . . . . . . . . . . . . . . . . . 1 - 9
Color Matchin g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1- 1 0
Processing Color Documen t s. . . . . . . . . . . . . . . . . . . . . 1-12
Non-Raster Color vs. Raster Color . . . . . . . . . . . . . 1-12
Color Processing Func tion s . . . . . . . . . . . . . . . . . . . 1 - 13
2. Usi n g C ol o r Mo des
Black-and- Wh ite Mod e (Defau lt) . . . . . . . . . . . . . . . . . . 2-1
Simple Color Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
PCL Imaging Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
HP-GL/2 Imagin g Mode. . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Simple Color Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Contents-1Contents-1
Simple Color Command. . . . . . . . . . . . . . . . . . . . . . . 2-3
PCL Imaging Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Configure Image Data (CID) Command. . . . . . . . . . 2-5
Common 6-Byte Header . . . . . . . . . . . . . . . . . . . . . . 2-6
Short Form of CID Command . . . . . . . . . . . . . . . . 2-15
Long Form of CID Command . . . . . . . . . . . . . . . . . 2-17
Examples Using the CID Command. . . . . . . . . . . . 2-25
HP-GL/2 Imagin g Mode . . . . . . . . . . . . . . . . . . . . . . . . 2-28
3. Usin g Pa l ette s
Saving the Palette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Push/Pop Palette Command . . . . . . . . . . . . . . . . . . . 3-3
Palette Managemen t by ID. . . . . . . . . . . . . . . . . . . . . . . 3-5
Select Palette Command . . . . . . . . . . . . . . . . . . . . . . 3-7
Palette Control ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Palette Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Simple Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 1
Contents-2Contents-2
CID Color Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
HP-GL/2 Palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Foreground Co l o r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Foreground Color Command. . . . . . . . . . . . . . . . . . 3-17
Programming Color Palettes . . . . . . . . . . . . . . . . . . . . 3-19
Color Component One . . . . . . . . . . . . . . . . . . . . . . . 3-19
Color Component Two . . . . . . . . . . . . . . . . . . . . . . . 3-20
Color Component Th ree. . . . . . . . . . . . . . . . . . . . . . 3-20
Assign Co l o r In d ex. . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 1
4. Mo di fyi n g Ou tpu t Co l or
Halftone Ren der Algo rith m s. . . . . . . . . . . . . . . . . . . . . . 4-2
Render Alg or ithm Comman d. . . . . . . . . . . . . . . . . . . 4- 2
User-Defin ed D ithe rs. . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Download Dith er Matr ix Command . . . . . . . . . . . . . 4-6
Multiple Dither Matric e s. . . . . . . . . . . . . . . . . . . . . . 4- 9
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Color Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 1
Gamma Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
View in g Illumin ant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Mon ochro m e Printing . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Driver Configuration Comman d. . . . . . . . . . . . . . . . . . 4- 19
5. The PCL Print Model
Command Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Source T r an spare nc y Mod e Command. . . . . . . . . . . . . . 5-7
Pattern Transpar en cy Mode Comman d . . . . . . . . . . . . . 5-8
Logical Operatio ns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Logical Operations and Transparency Interactions 5-12
Logical Operation Command . . . . . . . . . . . . . . . . . . . . 5-13
T able of Logical Ope ratio ns . . . . . . . . . . . . . . . . . . . 5-1 5
Pixel Placemen t. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Pixel Placemen t Command . . . . . . . . . . . . . . . . . . . 5-24
Filling with Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5
Pattern ID (Area Fill ID) Command. . . . . . . . . . . . . . . 5-26
Select Current Pattern Comman d . . . . . . . . . . . . . . . . 5-30
User-Defin ed Patter n Graph ic s . . . . . . . . . . . . . . . . . . 5-31
Download Pattern Comman d . . . . . . . . . . . . . . . . . . . . 5-36
Contents-3Contents-3
Set Pattern Reference Point Comman d. . . . . . . . . . . . 5-42
Pattern Control Comman d. . . . . . . . . . . . . . . . . . . . . . 5-43
Rectangular Area Fills (Rules). . . . . . . . . . . . . . . . . . . 5-44
Pattern Tran spare nc y for Rec tan g ular Ar ea Fill. . . . . 5-49
Rectangular Fill Examples. . . . . . . . . . . . . . . . . . . . . . 5-51
6. Raster Graphics
Raster Graphics Command Sequen c e . . . . . . . . . . . . . . 6-5
Raster Graphics Resolution Command . . . . . . . . . . . . . 6-7
Raster Graphics Presen tation Mode Command . . . . . . 6-9
Source Raster Height Command . . . . . . . . . . . . . . . . . 6-12
Source Raster Width Comman d. . . . . . . . . . . . . . . . . . 6-15
Start Raster Graphics Command. . . . . . . . . . . . . . . . . 6-17
Raster Y Offset Command . . . . . . . . . . . . . . . . . . . . . . 6-19
Set Compression Method Command . . . . . . . . . . . . . . 6-20
Unencoded (Method 0). . . . . . . . . . . . . . . . . . . . . . . 6-20
Run-length En cod in g (Method 1 ) . . . . . . . . . . . . . . 6-2 1
Contents-4Contents-4
Tagged Image File Format Encoding (Method 2). . 6-21
Delta Row Compression (Metho d 3) . . . . . . . . . . . . 6-25
Adaptive Compression (Metho d 5) . . . . . . . . . . . . . 6-30
T ran sfer Raster Data Command s . . . . . . . . . . . . . . . . 6-35
End Raster Graphics Command. . . . . . . . . . . . . . . . . . 6-39
Raster Scaling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-40
Destination Raster Width . . . . . . . . . . . . . . . . . . . . 6-41
Destination Raster Height . . . . . . . . . . . . . . . . . . . 6-41
Scale Algo rith m . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-42
Raster Graphics Example. . . . . . . . . . . . . . . . . . . . . . . 6-43
Color Raster Graphics Example. . . . . . . . . . . . . . . . . . 6-46
7. Color V e cto r Gr ap hics (HP-G L/2)
Ent er HP-GL/ 2 M o de. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 -2
Default Settings when Enter in g HP-G L/2 . . . . . . . . 7-4
MC (Me rge C ontrol). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7- 6
PC (Pen Color) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
NP (Number of Pens). . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
CR (Color Range). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7- 1 8
PP (Pixel Placemen t ). . . . . . . . . . . . . . . . . . . . . . . . . . . 7- 19
Index
Contents-5Contents-5
1
Color Printin g Ove r viewColor Printin g Ove r view
Introduction This chapter provides an overview of the way color i s used
in the HP Color LaserJe t and De skJet 1200C prin ter s. I t previews the remainin g chapter s, w hic h descr ibe th e specific details of Hewlett-Packard color printing.
Note The features described in this docu men t are a superset of
those supported by the Color LaserJet and DeskJet 1200C printers. Some features are supported on one or the other printer s, but not on both . See the PCL 5 Compar is on Guid e for specific feature sup port for each printer.
Processing a color document inv olves specifyin g a palette or palettes, and then using the colors within the current palette to print. For non- r aste r prin ting , items such as text, rule s, an d v ec tors are simply printed in the curren tly active color, which is specified using the For egr ou nd Color command or Select Pen command if in HP- GL /2. For ra ster printing, the color of each pixel is specified as either a direct color specific ation , or as an index into the palette, depending on the pixel en co din g mode.
The PCL Print Model deter min es how color is applied to the page. The printed re sult can vary in backgro und an d texture depending on the source transparency mode, pattern transparency mode, and selected logical operation (ROP). Besides the pr e-de fin ed shadin g and pattern s, user s can define new mono chr ome or multicolor patterns.
When printing color pages, a user can choose one of several color modes, depen din g on the desired r esults. Each color mode has a palette associated with it. Simple Color Mo de
provides a palette of fully satur ated color s wh ose colo rs are similar to those of a plotter’s pen colors. The palette is nonprogrammable, and is intended for simple printing of items such as bar and pie charts. For application s requ ir ing different or mor e specif ic c olor s, the printer offers the PCL Imaging and HP-GL/2 Imaging Mo des. The palette c olor s in these two modes can be modified to pro vid e the desir ed result.
When choosing color for a particular application, the Color LaserJet prin ter provides device-dependent and device-independent color (the DeskJet 1200C supports only device-dependent color). Device-independent color provides accurate colo r matc hing based on an absolute color standard. It is preferred w he n users wan t a prec ise co lor to match the output from ano the r devic e or to match the colo r on an existing page.
Besides providing devic e-in de pen den t co lor for prec ise colo r matching, the HP prin ter s can modify color to compen sate for various characteristics. The Color LaserJet printer supports the followin g method s of modifying color (the DeskJet 1200C printer supp or t s halfton e algorithms and gamma correction , but not colo r looku p tables or the View in g Illumin ant c omman d).
Halftone render algorithms determine how colors are rendered using the printers available colors. Halftone algorithm s can be used to chang e apparen t resolu tion , change the textu re of image s, reduc e the number of colors, and ch an ge a color image to mono chr ome.
Color lookup tables can remap colors to compensate for various diff er en ce s in inpu t data, suc h as un w anted color casts caused by unbalanced photographic light sources.
Gamma correction provides a way to adjust for color differenc es in display monitors so that the display mor e closely matches the prin ted ou tpu t.
Since the appearance of colors changes under different viewing light sources, the Viewing Illuminant command allows the application to modify outp ut color based on the light sourc e used to view the pr inte d page .
1-2 Color Printing Overview1-2 Color Printing Overview
Color Conc epts This section describes so me of the conce pts and ter mino log y
used in this chapter, such as palettes, raster vs. non-raster color, device-independent vs. device-dependent color, black and white refer en ces, co lor selection , pixel en codin g , and color modes.
Palettes A palette is a collection of colors that ar e sele cte d by their
index numbers. You can create yo ur ow n palette or choose from one of several fixed palettes. Although only one p alette is active at any time, all palettes are assigned ID numbers and can be stored in the pr inte r for later selection usin g the ID number. They can be deleted when desire d. Palettes can also be saved (pushed) to a stack and later retriev ed (popped) when needed.
Raster Mode Raster mode is entered explic itly by the Start Ra ster
command (?*r#A) or implicitly by a Transfe r Raster command (?*b#V, ?*b#W). Raster mode is exited explicitly by an End Raster command (?*rC) or implicitly by a non-raster command.
Raster Color vs.
Non-Raster Color
Device-Dependent
vs. Device-
Independent Color
Palettes are used differently dep en din g on wheth er the printer is in raster mode.
In non-raster mode, the palette is alway s used for color selection. The color of text or patter ns is specified using the Foregrou nd Color comman d ( ?*v#S).
In raster mode, the palette is only used for index ed color selection; it i s not used for direct color selection. (Indexed and direct color selection are explain ed later in this section.)
Device-dependent color spaces are relative to the dev ice ’ s ability to produce spec ific colors. For example, if red is specified in a devic e-d epen de nt color space, two differ en t printers will combin e the same amounts of cyan , mag enta, yellow, and black toner to produce the color, but the results
Color Printing Overview 1-3Color Printing Overview 1-3
will be different because of the different properties of the toner.
Device-independent color is specified absolutely, in a color coordinate system that is indep en dent of any device . For example, if red is specified in a device- ind epen de nt color space, two printers will alway s p rodu ce the same result, even though they may need to combine different amounts of cyan, magenta, y ellow, and black toner. Printer s that produce devic e-in dep en den t colo r are calibr ated to prec i se color standards.
Black and White
References
Example: Assuming the white and black refere nces are set as follows:
Device-dep endent color specific ation s are ba sed upon an arbitrary range of values for each primary color component. The range endpoints f or each color compon en t are called black and white references for that c omponent. Colors relative to these predef ine d limits are derived by specif ying the amount of each compon en t.
For the Device RGB color space, the maximum limit is called the white refer ence and the minimu m limit is called the black reference. Regardless of the number chosen, the white referenc e repr esen ts the maximu m valu e of a primary color that a device c an produ c e, and the black reference re pr esen ts the minimu m valu e of that primar y color. For example, if 100 is chosen as the white reference for red in the RGB color model, it represents the reddest red the device can pr odu ce. If 10 were chosen instead, then 10 would represent the same red.
Scenario 1
White Reference Black Reference
red = 63 red = 0 green = 63 green = 0 blue = 63 blue = 0
1-4 Color Printing Overview1-4 Color Printing Overview
Scenario 2
White Reference Black Reference
red = 63 red = 4 green = 127 green = 0 blue = 31 blue = 0
Using these referen ce values, 50% blue for scenar io 1 is 31, and 50% blue for scenario 2 is 15.
Color Selection The HP color printer s offer two methods for selecting colo rs:
Indexed selection Direct selection
In indexed selection, colors are chosen using their palette index numbers. For non-r aster mode, the palette index number is specified using the Foregro und Color command . In raster mode, the data bit combination for each pixel forms an index nu mber. The example below shows how the index numbers for an 8-colo r palette are specified:
Three-bit combinations: 0 1 0 1 0 1 0 1
0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1
Palette index number : 0 1 2 3 4 5 6 7
The number of colors in the palette dictates the numbe r of bits per pixel of raster data required to sp ecify an index number. For example, to specify 256 colors you need to send 8 bits of raster data per pixel (2
In direct selection , color s are spec ified u sing the propo rtio ns of their primary compone nts. For example, using a 24-bit-per- pixel repr esen tation , the color specified by (0xf f, 0xf0, 0x00) for red, green , and blue would pr int a sligh tly red-tinted yellow. A palette is not u sed for direc t se lec tion .
8
= 256).
Pixe l E nc o ding Colors are encoded in a row of raster data using either
plane or pixe l format. In planar format, all th e pixels in a row are partially specified by one plane (bit) befo re the next
Color Printing Overview 1-5Color Printing Overview 1-5
plane is sent. In pixel for mat, each pixe l is fully spec ified before sending the next pixel.
Encoding by Plane
Planar encoding uses successive data planes, each providing one bit for each pixel in a row. Each plane builds upon the prec edin g plane s until th e pixe l s in a row are fully defined. A pixel is not fully def ine d un til it has rec eiv ed a ll the planes for that r ow.
The planes in a row form index number s that defin e a pixel by selecting a palette entry. For example, an 8-entry palette requires 3 plane s (2
3
= 8). The underlined bits below compose the index of th e color of th e thir d pixel in the firs t row .
?*b#V row 1 plane 1 (red) b1 b1 ?*b#V plane 2 (grn) b2 b2 ?*b#W plane 3 (blue) b3 b3
b1 b1 b1 b1 . . . b2 b2 b2 b2 . . . b3 b3 b3 b3 . . .
?*b#V row 2 plane 1 (red) b1 b1 b1 b1 b1 b1 . . .
Encoding by Pixel
When encoding by pixel, each pixel is fully specified before any bits are sent for the next pixe l. For examp le, if fou r bits are needed to define a pixe l, then ever y grou p of four bits in the data stream defines a pixel. The under line d (c4 . . . c1) group below define s the secon d pix el in the first ro w.
?*b#W row 1 b4 b3 b2 b1
c4 c3 c2 c1 . . . ?*b#W row 2 b4 b3 b2 b1 . . . The table below shows the four PCL option s for selectin g
colors and encodin g color raster data.
1-6 Color Printing Overview1-6 Color Printing Overview
Indexed
Selection
Direct
Selection
Planar Encoding Pixel Enco ding
Indexed plan ar Inde xed pixe l
Direct planar Direct pixel
Color Modes There are four PCL 5 color modes:
Black and White mode Simple Color mode PCL Imaging mode HP-GL/2 Imagin g mode
All four modes create a palette. The palettes used in the Black and White mode and Simple Color mode are not modifiable. You can, however, modify the palettes in the PCL Imaging and HP-G L/2 Imaging mod es.
You can use more than one mode on the same page. For example, you could enter the Simple Color mode to print a headline and a bar chart, PCL Imag in g mode to prin t a raster photogr aph , and Black and Wh ite mode to prin t some body text. Each mode i s described in more detail in Chapter 2, “Using Color Modes.”
Device-Dependent
Color Spaces
The following PCL commands can alter color processing for device-d epen de nt c olor spaces:
Renderin g Algorithm (?*t#J) Gamma Correction (?*t#I) Color Lookup Tables (?*l#W) Configure Image Data (?*v#W) Simple Color (?*r#U) Mono chrome Print Mode (?&b#M)
Color lookup tables or gamma cor r ection (which are mutually exclu sive) can modify the mapping of inp ut to output.
Color Printing Overview 1-7Color Printing Overview 1-7
Device-Independent
Color Spaces
The following PCL commands can alter color processing for device-in de pen den t co lor spaces:
Renderin g Algorithm (?*t#J) Gamma Correction (?*t#I) Color Lookup Tables (?*l#W) Configure Image Data (?*v#W) View in g Illumin ant ( ?*i#W) Mono chrome Print Mode (?&b#M)
Device-in dependent color spaces ar e supported under the following conditions:
1. The Configure Imag e Data command (?*v#W) co nfigur es
the current palette and specifies a devic e-in de pen den t color space.
2. The Render Algorithm comman d (?*t#J) is set to one of
the following: Nearest Intensity ( ?*t0J) Device Best (?*t3J, ?*t5J) Error Diffusion (?*t4J, ?*t6J) Cluster Order ed Dith er (?*t7J, ?*t8J) Ordered Dith er (?*t1 1J, ?*t12J)
Color proces sing rever ts to de vice-dependen t pr oc essin g if the render algor ithm is chang ed from one of the above. This is because extensiv e devic e characterization is necessary to achieve device- independenc e— calibration must be based on known parameter s that aff ect the dev ic e’ s co lor gamut. Render algorithms such as Snap to Primaries (?*t1J), Snap Black to White and Colors to Black (?*t2J), or User-Defin ed Half ton e ( ?*t9J) either limit the number of colors available, or are undefin ed to the exte nt th at their performan ce i s not as precise. These algor ith ms, the refore, produce dev ic e-de pen den t re sults. D ev ice -in depe nd en t color is again generated if the render algo rith m chan g es to one of the 5 listed above and the color space has not chan ged.
1-8 Color Printing Overview1-8 Color Printing Overview
Device­Independent Color
The PCL language charac ter izes co lor as either devic e-d e­pendent or device -in depe nd en t. Both categor ies encomp a ss many color spaces, each with unique characteristics.
Device-
Dependent
Color
Device-
Independent
Color
Device-dep endent color is relative to the devic e’s inhere nt characteristics. For example, the colors produced by plotters are relative to the color of the installed plotter pens. Pen color varies consider ably, especially as pens wear out, chang in g the color of th e outp ut. Likew ise, for monitor screens, the red, g re en, and blue scr een ph osph or s determine the colo rs produ c ed. Fully satu rated co lor s can vary greatly betw een sc r een s. For p rin ter s, the color produced on a page depend s on the prin ter’s subtrac tiv e inks or toner (cyan, mag en ta, yellow, and black).
When using devic e-d epen de nt c olor, devices receiv ing relative color specific ation s for the same color freque ntly do not produce the same color. For example, a monitor’s saturated red may be differen t than a plotter’s. In short, the same color page may appear considerably different on different devices.
The HP color printer s prov ide devic e- depe nd en t color specified using either the Device RGB or CMY color spac es.
In contrast with device-dependent color, device-independent color is based on an absolute color standar d—th e tristimulus values of human vision. The device, whether a printer or other wise, is calibrated to match an indep en dent color specification. The color specification is translated in such a way that the resultant colo r is indepen den t of the device. Examples of color sp aces based on absolute standards includ e Ko dak P hoto Y CC, CIE L *a*b*, YU V, and the proposed YCr Cb. Eac h is a transfor m fr om tristimu lu s CIE XYZ space.
With proper calibration , any dev ic e can provid e a transfo rm from device-in dependent colo r spac e to the device’s ow n color space, pro du cin g outp ut fr om diffe re nt dev ic es tha t have the same color appear an c e. For example, if a monitor’s
Color Printing Overview 1-9Color Printing Overview 1-9
parameters are known (gamma, gain , chromatic ity coordinates for each primar y, and the white point), the monitor’s RGB pixel information can be transformed into device-in de pen den t co lor.
The Color LaserJe t prin ter pro vid es device- independe nt color specified usin g either the CIE L*a*b*, Color imetr ic RGB, or Luminan ce-Ch ro minan c e color spaces.
Color Matching When attempting to match color produced by differ ent
devices, it is importan t to know the differ en ce betwe en true color matching and appearance matching.
Proper devic e calibr ation can ach iev e tr ue color match in g , so that a side-by-side comparison of a prin ted pag e with the monitor on which the pag e was desig ned will show an exac t match. However, true color matching is only satisfac tor y when using the mon itor as a viewin g refer en ce. V iew ed away from the screen , the prin ted pag e may appe ar flat and unsaturated bec ause pr in ter s and monito rs hav e differ en t dynamic ranges. For example, black on the scre en appear s gray when compared to printed black, wh ich is unacceptable if the intent i s pure black . Likewise, the white produced on a monitor scr een appear s yellow or blue when compared to a white sheet of paper. True colo r matching would require that g ray be prin ted in the black area s and colored dots be printed in the white areas.
1-10 Color Printing Overview1-10 Color Printing Overview
Color Appe arance Matching
Color appearance matching goes beyond true color matching by inclu din g adju stmen ts for the dynamic range s of the devices, so the user’s inten t is maintained . For example, the white areas of a page shown on a monitor display screen would be pr inte d as white on a printed pag e because the user spec ified w hite , even thoug h the scr een cannot duplic ate a wh ite that tru ly matc hes wh ite paper. Although the prin ted color does not ex ac tly matc h scree n color, color appearanc e does match , which is what use rs usually want. To maximize user satisfaction, the PCL language uses appearan c e match in g when ren der in g device-in de pen den t co lor.
Color Lookup Tables
Color lookup tables, which prov ide addition al co ntrol of th e printed outpu t, are tran sfor mation s that map input data into a new output color range based upon poin t-by -poin t conversions.
Overhead tran sp are ncies pr ovide on e examp le of a good use for color looku p tables. Let’s say a page is printed on plain paper and it matches the user’s expectatio ns. When printing the same documen t on ov er he ad tr ansparency film, the resulting image looks unsaturated and flat. To compensate, the user can se nd a color looku p table to increase color satu ration with out ch angin g compositio n (for example, using the CIE L*a*b* color space to increase the a* and b* parameters in equal amoun ts).
Color lookup tables can al so be used to adjust data from a Kodak CD-ROM , wh ich uses th e Photo Y CC dev ic e­independen t color sp ace . The gamma correction table is complex and canno t be descr ibed by the traditio nal logarithmic expr es sion. Howev er, since the data can be mapped into new data values via tables, the user can provide a gamma correction table that e ssentially desc ribe s the complex correction factors.
Color lookup tables can be used to “ne utral-balan c e” an image. For example, an underwater photog rap h produ c es a severe bluish cast when printed. The user can eliminate that cast from the image by providin g a color looku p table that subtracts some color portion from each of the primaries.
Ill um i nation Mo d els
Illumination sources have different spectral distributions, causing colors to appear differently under one light source compared to anothe r. For example, printed colors that look normal in natural sunlig h t shift in hue when viewed u nd er fluorescen t and tun g sten ligh ting . The PCL langu ag e allows the user to compen sate for th e differ enc es in vie win g illumination using the V iew in g Illu min ant comman d. It allows the user to select differ ent illu min ation s.
Color Printing Overview 1-11Color Printing Overview 1-11
Processing Color Documents
To process a color pag e, PCL prov ides way s of specify in g and modifyin g color so that the printe d result ap pear s as the user desires. This sectio n prov ides a conc eptu al overview of the process.
Non-Raster Color
vs. Raster Color
All color portions of a page consist of eithe r:
Page Marking Primitives (non-raster data) Color Raster Data
Page Marking Primitives
Non-raster data con si sts of HP-GL/2 and PCL pag e marking primitiv es such as glyph s, rules, poly g on s, circ les, and vectors. Pag e markin g primitiv es con tain no color information about th e image. They merely mar k the pag e with attributes as signed to the curren t wo rkin g environme nt (for example, colo rs, patte rns, log ic al operation modes, etc.). Page markin g primitives act a s stencils throu g h which co lor “paint” is poured, forming a homogeneous pattern.
Page marking primitiv es prin t in the curren tly specif ied color, which is specified usin g the Foreg ro und Color command. For ex ample, if y ou specify the color blue using the Foreground Color co mmand , and then send some tex t to the printer, the text will be printed blue.
Color Ra ster Da ta
Unlike page markin g primitives, eac h pixel of a colo r ra ster image contains co lor information. A color raster pixel may be defined by either:
Palette Entry Indices Direct Color Spec ific ation s
User-def ine d color pattern s are a form of color raster, but each pixel of a user -def ine d color pattern can be defined only by palette entry indice s, not by direct co lor specification s.
1-12 Color Printing Overview1-12 Color Printing Overview
Color Processing
Functions
Given these two color uses, page mark in g primitiv es and color raster data, color processin g must:
Convert color attributes to an internal re pr esentation that can be poured through the page marking stencil onto the destination via some logical oper ation .
Convert multiple-bit-per-pixel color raster to an internal representation that c an be merge d into th e destinatio n via some logical operation.
Color processing must have access to the following state variables, which indic ate the for m and attribu tes by whic h the two color groups are g ener ated.
Halftone (rendering algorithm) RGB gamma correction Device-dep endent color lookup tables for eac h of the
three primaries
Chapter 2 describes in more detail how color raste r data is specified.
Color Printing Overview 1-13Color Printing Overview 1-13
U sing Color M odesU sing Color M odes
Introduction The PCL printer lang uag e has fou r color modes:
Black-and- Wh ite Simple Color PCL Imaging HP-GL/2 Imaging
PCL allows you to use any mode or combination of modes to accomplish your printing objective s most effic ien tly.
All four of the color modes create a palette. The palette for each mode is discussed in the section desc ribin g that mode, and also in Chapter 3 (“Using Palettes”).
2
Black-and-White
Mode (Default)
Black-and- Wh ite Mod e is the defau lt colo r mode. PCL devices power up in this mode and revert bac k to it whenever the printer receives an ?E reset. Black-and- Wh ite mo de i s also selectable using the Simple Color command (?*r1U). This mode creates an unmodifiable, default 2-pen palette, with white at index 0 and black at index 1 (compatible with ex isting mon ochr ome PCL 5 printer s).
Simple Color Mode Simple Color Mode, entered by the Simple Color command
(?*r#U), creates a fixed-size, fixed- color, unmodifiable palette. Dependin g on the value field, ?*r#U can create a 2-pen Black-and- Wh ite palette, an 8-pen RGB palette, or an 8-pen CMY palette. When using the Simple Color mode, the pixel encoding mode is always indexed planar.
PCL Imaging Mode PCL Imaging Mode, enabled by the Configure Image D a t a
command (?*v#W), allows a maximum of 24 bits per pixel for color specific ation . Theref ore, mor e color s (prod uc ed by halftoning) may be specifie d than are obtainable in Simple Color Mode. In the PCL Imagin g M ode, p ixe l en c oding mode, bits per pixel, bits per primary, white/black references, and the color palette are all programmable .
HP-GL/2 Imaging
Mode
In HP-GL/2, the Initialize (IN) command starts color imaging and perf or m s the following:
Sets the pixel encoding mode to ind ex by plane . Sets bits per index to 3. Creates an 8-pen palette that is reprogrammable in
either PCL or HP-G L/2 con tex t s (see Chapter 3, “Usin g Palettes,” for more information ).
Although default HP- GL /2 palettes are differen t than default PCL palettes, an HP-GL/ 2 palette is modifiable in either PCL or HP-G L/ 2 (u sin g the Assig n Color Index [?*v#I] or Pen Color [PC] commands, respectiv ely ). Likewise, a PCL palette created by the Con figure Imag e Data command (?*v#W) is modifiable in both PCL an d HP-GL/2 using the same comman ds.
The active palette is always transferred between HP-GL/2 and PCL contex ts. Sinc e only one palette at a time can be active, a new palette created in either contex t overwr ites the current palette.
2-2 Using Color Modes2-2 Using Color Modes
Simple Color Mode
The Simple Color command (?*r#U) spec ifies colo r selection from a fixed palette. RGB or CMY raster data must be sent by plane (?*b#V) as well as by row (?*b#W). The last plane in each row is sent using the ?*b#W command; all other planes are sen t using the ?*b#V command. In Simple Color mode, the pixel en c odin g mode is always indexed planar.
Simple Color
Command
The Simple Color command creates a fixed-size palette, whose color specification cannot be modified.
?*r#U # = –3 – 3 planes, device CMY palette
1 – Single plane K (Black) palette 3 – 3 planes, device RG B palette
Default = 1 Range = –3, 1, 3
The absolute value of the value field specif ies the number of planes per row of raster data to be sent. The number of entries in the new palette is 2
1. For example, a 3-plane palette has 8 entries, with index numbers 0 to 7.
This command destroys the activ e palette and creates a new palette, which beco mes the active palette . When the Simple Color mode is active, PCL and HP -G L/2 comman d s that modify the palette are locked out (NP, PC, ?*v#A, ?*v#B, ?*v#C, ?*v#I). When a Simple Color palette is popped from the stack ( ?*p#P), it cannot be modified, and the pixel encoding mode reverts to indexed planar.
A value field of 1 creates a 2-entry Black-and-White default palette.
n
, with index values 0 to 2n –
Usi ng Color Modes 2 -3Usi ng Color Modes 2 -3
A value field of 3 creates an 8-entry Device RGB palette (compatible with a PCL Imaging Mode palette, but not an HP-GL/2 default (IN) palette).
A value field of –3 creates an 8-entry palette in De vice CMY color space.
The Simple Color palettes are show n below :
Single Plane (value = 1)
Index Color
0 White 1 Black
3-Plane RGB (value = 3)
Index Color
0 Black 1 Red 2 Green 3 Yellow 4 Blue
2-4 Using Color Modes2-4 Using Color Modes
5Magenta 6 Cyan 7 White
3-Plane CMY (value = –3)
Index Color
0 White 1 Cyan 2Magenta 3 Blue 4 Yellow
Index Color
5 Green 6 Red 7 Black
PCL Im aging Mode
Configure Image
Data (CID)
Command
The PCL Imaging mode, entered using the Configure Image Data (CID) command (?*v#W), creates a variable-sized programmable palette. It provides half ton ing in the printer, with multiple color spaces, pix el en codin g mode s, and reprogrammable palettes.
The CID command provides con fig u ration infor mation for creating palettes and tran smitting raster data. The CID command performs the following:
Designates the color space for the defau lt palette Designates the size of the palette to be created Provides data for transf or ming color - sp ace -spec ific
values into device-specific values Provides data for transfor ming devic e-de penden t data
(monitor RGB) to device- ind epen de nt (Colorimetric RGB) Designates the format of ra ster data and how primary
components are combined to yie ld the r aste r representation
?*v#W[binar y da ta]
# = Number of data bytes
Default = NA Range = Short form: 6 bytes
Long form: >6 bytes
Usi ng Color Modes 2 -5Usi ng Color Modes 2 -5
Invalid config ur ation s of the CID comman d are igno re d and the data discarded. An y sign s in the value field are ignor ed.
The data fields in this command must contain byte-alig ned binary data, not ASCII data.
This command has two forms: the six-byte sho rt for m described below, and the long form consisting of these six bytes, plus additional in formation spe cif ic to the color space .
Common 6-Byte
Header
The short and long form s of the CID command use a common 6-byte header, regardless of which color space is specified. The header data fields, whose mean ing may v ary according to the color spaces, are present in all color space specification s. Th e short for m and lon g for m of the CID command are explained separ ately in the following pag es.
Byte 15 (MSB) 8 7 0 (LSB) Byte
0
Color space (UBYTE)
2
Bits/index (UBYTE)
4
Bits/primary # 2 (UBYTE)
Byte 0 (Color Space)
This byte specifies the color space. The range of values is 0 through 4. All oth er v alues are ignor ed.
Byte V alue Color Space
0 Device RGB (defaul t)
Pixel encoding mode (UBYTE)
Bits/primary # 1 (UBYTE)
Bits/primary # 3 (UBYTE)
1
3
5
2-6 Using Color Modes2-6 Using Color Modes
1 Device C M Y 2 Colorimetric RGB Spaces 3 CIE L*a*b* 4 Luminance-Chrominance Spaces
Note Colorimetric RGB color spaces are based on the 1931
standard 2-deg re e ob server and specified by CIE xy chromaticity coordinate s. They use the standard D6500 viewing illuminan t and a 45-deg r ee illumination model with a 0-degree co llec tor geometry for reflective data.
CIE L*a*b* is the CIE 1976 Uniform Color Space based on the 1931 standard 2-degre e observ er, and using a 45-degree illumination model with a 0-degree c ollec tor geometr y for reflective data. Th e viewin g illumin an t is the standard D6500 illuminant.
Luminance-Chromin an ce spaces are a 3x3 linear transformatio n from Color imetr ic RGB. Like CIE L*a*b*, achromatic data is contained in one channel an d chr omatic data shares the other two chan nels.
Byte 1 (Pixel Enco di n g Mo de)
Byte number 1 designates the format in whic h raster data is to be transmitted and interprete d. Th e range of this value field is 0 to 3. All other values for this field are ignored.
Byte V alue Pi xel En co ding Mod e Restrictions
0
1
Indexed by Plan e (default)
Bits/index must be 1, 2, 3, 4, 5, 6, 7, or 8
Indexed by Pixel Bits/index must be
1, 2, 4, or 8
2
Direct by Plan e 1 bit per primary
(RGB or CMY only)
3
Direct by Pixel 8 bits per primary
(All Color Spaces)
You need one plane or on e bit/ pixel for each power of two colors in the palette. For examp le, a 256-co lor palett e requires 8 plane s or 8 bits/pixel (2
8
= 256).
Usi ng Color Modes 2 -7Usi ng Color Modes 2 -7
Loading...
+ 197 hidden pages