lvpostscr(3)

LIBRARY ROUTINE
lvpostscr - Format a Khoros image in Postscript, suitable for a LaserWriter

LIBRARY CALL
#include "vinclude.h"
int
lvpostscr(file, image, force, photo_neg, wflg, hflg, xflg, yflg,
            def_width, def_height, def_xoffset, def_yoffset, landscape)
FILE    *file;
struct  xvimage  *image;
int     force, photo_neg, wflg, hflg, xflg, yflg, landscape;
float   def_width, def_height, def_xoffset, def_yoffset;

INPUT

file
    file descriptor to write the output to

image
    pointer to xvimage structure to be processed

force
    flag to force output of the current page

photo_neg
    flag to indicate that photonegative output is desired

wflg
    flag to indicate that the given width is to be used rather than the computed one

hflg
    flag to indicate that the given height is to be used rather than the computed one

xflg
    flag to indicate that the given X position is to be used rather than the computed one

yflg
    flag to indicate that the given Y position is to be used rather than the computed one

def_width
    tells what the desired output width is (inches)

def_height
    tells what the desired output height is (inches)

def_xoffset
    tells what the desired X offset is (inches)

def_yoffset
    tells what the desired Y offset is (inches)

landscape
    indicates if output should be in landscape mode

OUTPUT

file
    this descriptor receives the Postscript output

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS
Fixed lvpostscr so that large bit images can be printed out Oct, 1991 added fflush statement to flush the rest of the stdout buffer. Dec 6, 1991

DESCRIPTION
lvpostscr formats an Khoros BYTE or BIT image for output on a Postcript laser printer. Such as the Apple Laserwriter. The width and height are specified in inches. The X and Y offset specifies the location of the lower left corner of the image from the lower left corner of the page. An important detail: there is a 1/8 inch wide margin all around the page that cannot be writen on even though it is legal to try to print there! [Laserwriter feature]. Note that a BYTE image is dithered INSIDE the Postscript printer!

NOTE: The output from this routine goes to the standard output! This lets one pipe the output directly to the laser printer.

Also observe that if your printer filter converts ASCII text files to Postscript (like the Adobe software), you will have to bypass the filter to get useful output. The way to do this is with a program like pscat, which bypasses the conversion.

If the input image is a pseudo colored images ( 3 map columns, and map enable FORCE) and the -s flag is true, then lvpostscr will squish the 3 map columns into 1 map column by computing the average over all 3 map columns. The image is then mapped through the map producing a grey scale image that can be sent to the postscript printer.

If the image is a 24-bit color image, or an image as specified above, and the -s flag is false, then the output is a color postscript file compatible with a QMS color postscript printer (i.e. it uses the colorimage operator). Such output files can be very large since a full 8-bit color band must be sent for each color band in the image (this means that a mapped image is essentially turned back into a 24 bit image before being sent out). It is often adviseable to use lpr -s so that networked printers don't choke on the size of the output file.

The -c option is used to allow the printing of multiple images on one output page.

SEE ALSO
vpostscr(1), intro(3), vipl(3), verror(3), vutils(3) lvln03(1), lvgamut(1), lvconvert(1)

RESTRICTIONS
vpostscr can process only BIT or BYTE images.

AUTHOR
Scott Wilson, Mark Young

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.