| 1 |
Coming up with the proper table for the thresh_map is best done by printing |
| 2 |
(on the target printer) a linear ramp using a theshold array that has been |
| 3 |
mapped to 256 levels using thresh_map without a trasfer function data file. |
| 4 |
|
| 5 |
The invocation for that would be: |
| 6 |
thresh_map -p -o thresh_lin.ps threshold.dat |
| 7 |
|
| 8 |
Then print a gray ramp to your device, XXXX with ghostscript using this |
| 9 |
thresh_lin.ps file: |
| 10 |
gs -sDEVICE=XXXX -o out.prn thresh_lin.ps grayramp.ps |
| 11 |
|
| 12 |
Next measure several patches from the print with a densitometer to get |
| 13 |
the "L" value (0.0 is black, 1.0 is white). |
| 14 |
|
| 15 |
Create a text file with the measurement results with each value, in order |
| 16 |
on a separate line. with the patch number (integer 1-256) followed by a |
| 17 |
space, followed by the L value (real number). Even though the lightest |
| 18 |
patch is 255, the file should end with a line: |
| 19 |
|
| 20 |
256 1.0000 |
| 21 |
|
| 22 |
thresh_map [-c] [-p] [-q] [-o thresh_new.ps] threshold.dat [linear.dat][> threshold.bin] |
| 23 |
|
| 24 |
threshold.dat is the file produced by genpat: A list of pixels in |
| 25 |
order of painting, one line per pixel format %d %d |
| 26 |
|
| 27 |
linear.dat is optional. If missing, the thresold array will have |
| 28 |
1/256 of the total at each level. The format of the linear.dat |
| 29 |
file is: %d %f where the first integer is the level and the |
| 30 |
second float is the brightness (0 == dark, similar to L* value). |
| 31 |
The 'level' is in the range 0 to 256. The final entry should be |
| 32 |
256 WHITEVALUE. If the final measurement is not level 256, then |
| 33 |
the assumed WHITEVALUE will be 1.0000 |
| 34 |
|
| 35 |
-c outputs the count of pixels at each of 256 levels |
| 36 |
-p generates output in PostScript HalftoneType 3 format |
| 37 |
-q suppresses output (except -c) |
| 38 |
-o specifies the file for the binary or PostScript mapped threshold array |
| 39 |
|
| 40 |
To use your newly created PS threshold array file to print a file (such as the |
| 41 |
gray ramp to allow verification of the quality) use: |
| 42 |
|
| 43 |
gs -sDEVICE=XXXX -o out.prn thresh_new.ps grayramp.ps |