Previous Next Table of Contents

3. Calibration

3.1 Adjusting xoffset and yoffset. Light way

Those variables, managed from /etc/pnm2ppa.conf, control the exact placement of the printed page into the paper. Its correction values, given in 1/600 inch, can be determined using this light way, or using the next, heavy way. Heavy way uses MUCH memory (about 35-40 MB) and really overloads your system, but can obtain the best value of the variables. This light way doesn't stresses very much the system, and is usually good enough for most common home enviroments. If you will not use the printer in a highly specialized enviroment (graphic design or something else), try this light way.

When correcting xoffset and yoffset, remeber that a larger number moves the image right/down, and a lesser one moves left/up.

Start uncommenting the xoffset and yoffset values in /etc/pnm2ppa.conf. Print the provided testpage.ps (for US letter pappersize) o testpage-a4.ps (for A4 pappersize). For other paper sizes (Legal and A3), you'll need to use the heavy way.

The two squares surrounding the central test are at 1cm and 2cm of the border. Use a ruler to verify this. If they are not at that distance, you'll need to change the variables and print again. Notice the text given in the printing itself: It is not unusual for the 1cm bottom margin not to show. Many printers cannot print that close to the bottom of the page.

When the page is almost centered, go to marggin adjust.

3.2 Adjusting xoffset and yoffset. heavy way

This method of adjusting offsets gets probably best results, but is much more system overloader, so use carefully (especially in a multi-user enviroment). Even if you are using this, read the light one too, to know the effects of changing the variables.

Use the generated calibrate-ppa binary to creaate a calibration page, and print it:

calibrate_ppa -s a4 --center | pnm2ppa --bw -i - -o - | lpr -l

(Change a4 to letter or legal as needed)

Use the printed pattern to figure out the necesary values to be added/substracted to the offset variables.

3.3 Adjusting margins

Edit /etc/pnm2ppa.conf and uncomment the lines modifying the margins. They are usually good enough for most printers, so you probably should let them unchanged. You can just print something to ensure that it works, and play latter with them.

3.4 Adjusting shearing

Again, there are two ways of generate the necesary printing for this calibration. The heavy one uses calibrate_ppa to generate the patern. The lihgt one uses a provided pregenerated test.ps file. In this case, both methods are equally good, and usable by every papersize, because it uses only the center of the page, with no knowledge of the size. So, in short...

Print test.ps through the color printer and look for "broken" lines:

lpr -Pcolor test.ps

Shearing is caused because of the two way printing mechanism: one way prints slightly offset to the other. If you turn off two-way printing int /etc/pnm2ppa by uncommenting the unimode line (or using the --uni modifier to the command), you won't need to worry about this, but printing will be slower (maybe prettier too).

Uncomment colorshear and blackshear in the configuration file and modify them until vertical color and black lines are not "broken" (values are in 1/600 inch).

3.5 Adjusting color offset

Whe want color to be perfectly aligned to black. This is controled by ColOffsX and CollOffsY. Modify them until gren horizontal and vertical lines in test.ps are perfectly aligned to 0. Fine adjust can be made looking at the red bars (it's a kind of zoom of the offsets): 0 in the black line must be next to 0 in the red one. If they are not, the lines aligned in each of the two bars tells us how much disaligned they are.

3.6 Adjusting blackness

This is just your preference... blackness variable tells the filter how much black int to use. 0 means no use of black ink (it's created adding all other three primary colors), and 4 means very much black ink. 2 is the default, and is probably the best. Anyway, play with it and use the one that you want.

3.7 Other adjustments

There are still three sets of variable to modify. The six variables about Gamma will be discused in the next subsection. The last set, *_ink, is for debuging only. Each variable, when set to 0, switch off the corresponding ink type. Just don't use them, unless you know what you are doing.

3.8 Color correction. Using Gamma indexes

The real color seen from the humman eye is not exactly the one computed by a machine, so usually a gamma correction function is applied over the machine color, to conver it to the one perceived by eye. The parameter for that function (one for each color) is Gamma* or *GammaIdx (one or the other, not both).

Method for configuring that corrections are nowadays not very "user friendly", so feel free to improve them if you want. Furthermore, if you don't want to be anoyed by this configuration, forget it: the printer works rasonably well with the defaults values.

First, you need to obtaing a corrected file for comparision... just type:

calibrate_ppa -g -o gamma.ppm

to create a (big, 10MB) gamma.ppm file. We will use it for comparision (we'll call it "reference"):

Print now the not-corrected file using pnm2ppa:

pnm2ppa -g -i - -o /dev/lp0

Now let's look at the red column: what of the rows best fits the "reference"? If you've choosen the 5th row, then RedGammaIdx value is 5. Do the same for green and blue columns, choosing a GammaIdx.

Finally, uncomment lines asigning values to *GammaIdx and give them the correct value.

3.9 Color correction. Using gammafile

This method consist in the use of a lookup table, instead of a function. The configuration of this method is still obscure... at least, I can't understand it, so I won't explain it to confuse you.

Directly copied/pasted from CALIBRATION.txt:

A 'gamma correction file' is a binary file containing 3 x 256 numbers, which are lookup tables of corrected red green and blue color intensities.

The program pnm2ppa will use a default correction file /etc/pnm2ppa.gamma if it exists, unless the --noGamma option is used. The default correction file location can be changed by using the pnm2ppa option -F gammafile , where 'gammafile' is the name (including the full path) of the gamma correction file to be used.

Currently, there are two available tools for constructing a gamma correction file:

o A graphical utility ppagammacorrect is available in the PPA Color Correction Utilities section of the pnm2ppa web page http://sourceforge.net/projects/pnm2ppa, (but at the time of writing, this appears to be frozen in early stages of development, with little documentation, and may not be fully functional).

o A working procedure is given in http://download.sourceforge.net/pnm2ppa/color-calibrate-1.0.tar.gz, which is made available by Klamer Schutte. This is the method recommended by many users.


Previous Next Table of Contents