Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/RD/saotng/printing.html
Дата изменения: Unknown
Дата индексирования: Mon Oct 1 23:56:21 2012
Кодировка:
Printing an Image

Printing an Image

Summary:


Contents of This Section


Return to SAOtng Summary User's Guide

Printing an Image

A Postscript representation of the currently displayed image can be generated using the Print Image option of the Images menu. Print Image brings up a dialog box, into which a print directive can be entered. Enter a carriage return in the dialog box or click on the OK button to generate PostScript output. Print directives are described below

The SAOtng print command works by sending the current colormap (as a list of ASCII RGB 3-tuples) and an 8-bit FITS representation of the displayed image (the "scaled" data) to the fits2ps program. This program outputs a PostScript representation of the image to its standard output. The print directive is then used to redirect the PostScript to the appropriate place.

The fits2ps can be run stand-alone. The command:

    cat [foo.fits] | fits2ps -luts [colormap]
will generate a PostScript image from the input FITS file and colormap. The FITS file must have BITPIX=8, i.e., it must be an 8-bit image.

The fits2ps program supports the following command-line options:

  -border [npix]	skip border [npix] thick around image
  -bskip [boffs]	skip [boffs] rows from bottom
  -copies [n]		number of copies to print (default: 1)
  -fits [fitsfile]	input FITS file is [fitsfile]
  -font [size]		font size (points) of title string (default: 16)
  -gamma [r,[g,b]]	use [r,g,b] as gamma corrections (r,g,b ] 0)
			[ 1.0 brighter, ] 1.0 dimmer, = 1.0 normal.
  -help			display the help page.
  -height [vsize]	use [vsize] as output image height (inches)
  -label [string]	use [string] as title to place on top of page
  -landscape		print image in landscape orientation
 			(default if width  ] height)
  -lskip [loffs]	skip [loffs] columns from left
  -luts [lfile]		read color lookup tables from [lfile]
  -mono			convert color to grayscale.
  -paper [format]	format of output page: "A" (default), 
			"B", "A3", "A4"
  -portrait		print image in portrait orientation
 			(default if width [= height)
  -raster		do not runlength encode output pixmap.
  -reverse		reverse color intensities.
  -rskip [roffs]	skip [roffs] columns from right
  -tskip [roffs]	skip [roffs] rows from top
  -verbose		print processing information to stderr
  -width [hsize]	use [hsize] as output image width (inches)
These options also can be used in the Print Directive to control printing.

Print Directives

The print directive allows the PostScript representation of an image to be sent to a variety of places, including printers, disk files, and programs such as ghostview. To send PostScript to a printer, use the directive:

    lpr [print options]
e.g.
    lpr -Ppscolor

To display the PostScript image in ghostview, use the directive:

    ghostview [ghostview options]
If ghostview is specified without any options, the "-" option (take the input from stdin) is assumed. Otherwise, if you wish to add options to ghostview, you also must specify the "-" option explicitly:
    ghostview -monochrome -

PostScript also can be saved in a disk file by using a filename for the print directive:

    [filename]
e.g.
    foo.ps
In general, the print directive can be thought of as the back-end of a Unix pipe-line that is receiving the PostScript image to its standard input. Thus, any command of the form:
    | [Unix command]
or
    > [Unix file]
can be used as a print directive. For example, you can print the PostScript and save it to disk simultaneously with the directive:
    | tee foo.ps | lpr -Ppscolor
Note that the "lpr" and "ghostview" directives are handled specially: the "|" symbol is added automatically as a convenience to the user.

The fits2ps command switches described above can be added to the print directive. These switches are placed before the redirection or pipe symbol. For example, to have the print command convert to grayscale, force landscape mode, add the filename as a title, and print to the printer "lps", use the following print directive:

  -mono -landscape -label "foo.fits" | lpr -Plps

When a file is printed, the print command being used is output to SAOtng's stdout, so that users can verify that the correct operation is being performed.


Last Updated June 14, 1997