Xerox 721P87491 Printer User Manual


 
POSTSCRIPT
2-32 XEROX DOCUPRINT NPS GUIDE TO USING PAGE DESCRIPTION LANGUAGES
the image relative to the PostScript default image and user
coordinate systems.
Scan resolution and scaling
Just as rotation of an image is often required to produce correct
output, scaling is also often required. To reduce imaging time,
present the data so that scaling is not required; supply data for 300
dots per inch of output size in both dimensions.
Part of the image-to-user space transformation for any image is the
scaling that takes image coordinates to physical coordinates in user
space. DocuPrint splits the transformation into two parts. The scale
operator is needed as part of the transformation from the unit square
in user space (1 unit equals 1 point, which equals 1/72 inches) to the
destination rectangle or parallelogram.
In the following example, the number of samples in each dimension
is divided by the input resolution, giving the size of the image in
inches, which is multiplied by 72 to obtain the size in points. The two
computed values are used as scale factors to take the unit square to
the size of the original image.
Figure 2-11. Scaling and resolution example
As with rotation, the image-to-user space transformation specifies
the output size of the image, and internal scaling may or may not be
required, depending on the data available. In the scaling and
resolution example above, 300 samples per inch of output size were
provided, and output scaling is not required.
Common cases of scaling are optimized to minimize the performance
penalty. See Performance measurement in the Troubleshooting
Guide. Recognition of optimized cases is dependent upon precise
scale values. For this reason, you should always have the scale
values calculated by the PostScript code as shown in the examples.
Optimized scaling works well with optimized rotations.
The following example illustrates the requirements for embedding
and printing an image in a normal scan.This example uses the
default PostScript user coordinate system. The image data is already
in the correct order for that coordinate system, so the use of the
rotate operator is not required. DocuPrint NPS performs an internal
rotation of the image data in order to align it properly with the print
scan ordering. Three hundred samples per square inch of output size
is provided and scaling is not required.
/lines 3296 def % lines in the image
/bpl 2528 def % bits per line
/res 300.0 def % spots per inch of image resolution
.
.
.
bpl res div 72 mul lines res div 72 mul scale