InterpressConvertersDoc.tioga
Doug Wyatt, May 31, 1985 10:34:50 am PDT
Michael Plass, June 29, 1993 12:17 pm PDT
Nickell, September 18, 1985 11:11:14 am PDT
Tim Diebert: September 18, 1985 4:29:18 pm PDT
Pier, September 3, 1992 2:18 pm PDT
Eric Nickell February 19, 1986 3:38:44 pm PST
Rick Beach, March 12, 1987 8:29:01 pm PST
Eric Nickell, December 13, 1986 12:44:13 pm PST
Stone, December 16, 1986 4:39:16 pm PST
Maureen Stone, March 29, 1990 3:47:22 pm PST
Jean-Marc Frailong January 19, 1988 4:40:24 pm PST
Bloomenthal, August 19, 1991 7:13 pm PDT
Willie-Sue, July 7, 1989 4:49:14 pm PDT
Last tweaked by Mike Spreitzer on September 12, 1991 1:36 pm PDT
Arnon, March 24, 1992 5:48 pm PST
INTERPRESS CONVERTERS
CEDAR 10.1 FOR INTERNAL XEROX USE ONLY
Interpress Converters
Conversion routines to and from Interpress masters
Michael Plass, Doug Wyatt
© Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992 Xerox Corporation. All rights reserved.
NOTES
The following are implemented:
IPToCompressedIP (with aliases)
IPToPSRaster
IPToBinaryAIS (with aliases)
AISToIP (found in the AIS package)
RasterfileToIp
DitherLikeRasterfile
XLoadIp
CaptureXColormap
Snapshot
Abstract: InterpressConverters provides a collection of conversion routines between Interpress and other formats, specifically Press, AIS, and JaM. Included in this package is SnapShot, which makes an Interpress master from a framebuffer. For further raster conversions (RES, PixelArray, PixelMap, etc) see the CedarChest package ConvertRasterObject.
Created by: Doug Wyatt, Michael Plass
Maintained by: Michael Plass <Plass.pa>
Keywords: AIS format, color, conversion, fonts, Imager, Interpress, JaM, printing, Press
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Commands
Note: in the following, angle brackets surround parameter names, square brackets denote optional syntax, curly brackets denote repetition zero or more times, and underlines denote things that you actually type. USE slashed format rather than bracket format for file names.
AISToInterpress [-q] [<output> ] <input>
AISToIP [-q] [<output> ] <input>
A simple way to get an Interpress master from a gray-scale AIS file.
The AIS image is scaled to fit a standard 8.5 by 11 inch page, with a small margin.
Unless the -q switch is invoked, the command line is printed as a caption at the bottom.
CGMToInterpress [-q] [<output> ] <input>
CGMToIP [-q] [<output> ] <input>
<input> is the file name of a CGM file
<output> will be an Interpress master in the Xerox encoding
Unless the -q switch is invoked, the command line is printed as a caption at the bottom..
Very limited implementatons. This command is only tested with outputs of Zenographics Mirage on PC. Only operators which Zerographis uses are supported.
ColorAISToInterpress [-q] [<output> ] <inputRoot>
ColorAISToIP [-q] [<output> ] <inputRoot>
The corresponding command for color AIS files.
The inputRoot parameter specifies the root for the names of three color AIS files; the actual file names are derived by appending -red.ais, -green.ais, and -blue.ais to inputRoot (other popular naming conventions will work as well).
The AIS image is scaled to fit a standard 8.5 by 11 inch page, with a small margin.
Unless the -q switch is invoked, the command line is printed as a caption at the bottom.
InterpressImageExtract <inputName>
IPImageExtract <inputName>
Writes one RES (Raster Encoding Standard) file for each sampled image in the specified Interpress file. Lists the names of the output files in the CommandTool, as well as where on the pages the sampled images originated.
IPToPSRaster <IP name> <PS name> [-option]
converts an Interpress file into a raster Postscript file
options include:
res <REAL> pixels per inch (default: 300)
scale <REAL> magnification (default: 1)
height <REAL> page height (default: 11.0 inches)
width <REAL> page width (default: 8.5 inches)
trim  trim to multiple of 32 in f direction (for some printers)
landscape scan direction (default: portrait).
InterpressToCompressedInterpress [<output> ] <input> <switch> ...
IPToCompressedIP [<output> ] <input> <switch> ...
IPToCIP [<output> ] <input> <switch> ...
<input> is the file name of an Interpress master
<output> will be an Interpress master, in which each page contains a single MASKPIXEL of a Xerox/Compressed pixelarray at a (default) resolution of 300 spots per inch. Such a master is suitable for printing on a 9700 family printer (4050, 8700, 9700), but FPS servers and 8044 printers will probably choke on the large pixelarrays. Thus, at PARC, you would say
InterpressToCompressedIP temp.ip ← foo.interpress
SendIPMaster -h <machine name> temp.ip
Delete temp.ip
Do not send anything to "Warning Appearance Errors". The odds of getting good results using a standard Xerox network printer are small indeed.
At PARC, the compressed IP files are suitable for sending to any RoadRunner printer (Twinkie, Perfector, or MontBlanc), or to DocuTech (normally use IPPaper). Normally there is no advantage to compress IP before sending it to a RoadRunner printer. The DocuTech printers do quite a nice job with either 300 or 600 ppi (or spi) documents, although the compressed files can take a while to produce at 600 spi.
The possible switches are:
-lineScreen  to use line screen for halftones
-dotScreen  to use dot screen for halftones (default)
-portrait   for short-edge-feed printers
-landscape  for long-edge-feed printers (default)
-ppi <r>   to use a resolution of r pixels per inch (default -ppi 300)
-angle <degrees> half tone screen angle (default 45)
-dotsPerInch <d> use d dots per inch
InterpressToBinaryAIS <outputName> <inputName> [-Resolution <bitsPerInch>] [-PixelsPerHalftoneDot <REAL>] [-Landscape] [-AllPages] [-Trim] [-Width <REAL>] [-Height <REAL>]
IPToBinaryAIS <outputName> <inputName> [-Resolution <bitsPerInch>] [-PixelsPerHalftoneDot <REAL>] [-Landscape] [-AllPages] [-Trim] [-Width <REAL>] [-Height <REAL>]
<inputName> is the file name of an Interpress master in the Xerox encoding
<outputName> (default input.ais) will be a one bit per pixel AIS file;
[-Resolution <bitsPerInch>] specifies the resolution of the output bitmap, in spots per inch. Legal values are 72 75 150 200 254 300 400 508 600 1200. Default is 72.
[-PixelsPerHalftoneDot <real>] is the number of output pixels used to construct a halftone dot. Default is: IF resolution < 280 THEN 11.31371*0.5 ELSE 11.31371.
[-Landscape] scan direction (default: portrait).
[-AllPages] do all pages in the master, one page per ais file, with suitably generated filenames. [Not currently working; does only the first page every time.]
[-Trim] trim away "background", also trim to multiple of 32 in f direction (needed by some printers). Useful to get just the "good bits" and discard a lot of blank "border" pixels.
[-Width <inches>] width in inches of the output raster. Default is 8.5. Overridden by -Trim.
[-Height <inches>] height in inches of the output raster. Default is 11.0. Overridden by -Trim.
Example: InterpressToBinaryAIS bar.ais ← foo.ip -Resolution 300 -Trim
Old InterpressToBinaryAIS command; (DCedar) source code in InterpressToBinaryAISImpl.mesa
InterpressToBinaryAIS <input> sPixelsPerInch fPixelsPerInch pixelsPerDot screenAngle dotShape sSize fSize white
IPToBinaryAIS <input> sPixelsPerInch fPixelsPerInch pixelsPerDot screenAngle dotShape sSize fSize white
<input> is the file name of an Interpress master in the Xerox encoding
output = input.ais will be a one bit per pixel AIS files file;
<sPixelsPerInch, fPixelsPerInch> are the output resolution
<pixelsPerDot> is the number of output pixels used to construct a halftone dot
<screenAngle> is the simulated halftone screen angle (in degrees)
<dotShape> a real number in 0-1. 0.5 is a round dot, 0 and 1 are line screens at 0 and 90 degress to the screen angle, respectively. All other numbers generate elliptical dots.
<sSize, fSize> clipping height and width for the Interpress image (in inches, window located at the origin, note usual Interpress reversal of traditional x and y).
<white> Either 0 or 1. The output pixel value for white (affects the AIS photometry part)
This command allows you to simulate what a halftoning printer will produce when rendering an Interpress master. Uses ImagerPrintContext and ImagerBrick.
Example: InterpressToBinaryAIS foo.ip 300 300 7 45 0.45 4 5 0
Renders a 5 by 4 inch region of foo.ip at 300 spots per inch. The halftone screen is a nearly round dot at 45 degrees that can produce 50 gray levels and is 7 pixels on a side (7x7+1=50). Similar to what Quill would use.
Old InterpressToAIS command; (DCedar) source code in CESConvertersCommand.mesa
InterpressToAIS [<outputRoot> ] <input> {gray} {ppi: <pixels per inch>} {fppi: <pixels per inch>} {sppi: <pixels per inch>} {size: f s}
IPToAIS [<outputRoot> ] <input> {gray} {ppi: <pixels per inch>} {fppi: <pixels per inch>} {sppi: <pixels per inch>} {size: f s}
<input> is the file name of an Interpress master in the Xerox encoding
<output> without gray option, will be three AIS files: outputRoot-red.ais, outputRoot-green.ais, outputRoot-blue.ais.
<output> with gray option, will be single AIS file, Intensity encoded: outputRoot.ais.
<pixels per inch> specifies the resolution of the resulting AIS image. Defaults to 72. ppi sets both directions at once. fppi (fast, traditionally x) and sppi (slow, traditionally y) sets them separately.
<size> specifies the final size of the AIS file in inches. Defaults to 8.5 by 11. Will clip image that falls outside of the size. Use InterpressCompose or Preview to transform your interpress master.
Note that the size of each AIS file will be size.s*<pixels per inch> by size.f*<pixels per inch>. This operation images only the first page of the Interpress master. Use IPBreakup to get separate pages from a multipage master.
InterpressToJaM [<output> ] <input>
Moved to InterpressToJaM.df
InterpressToPress [<output> ] <input>
IPToPress [<output> ] <input>
<input> is the file name of an Interpress master in the Xerox encoding
<output> will be a Press file; note that all Interpress semantics are not supported by Press
InterpressToColorHalftoneAIS <input> sPixelsPerInch fPixelsPerInch dotsFile sSize fSize white
<input> is the file name of an Interpress master in the Xerox encoding
output = input.ais will be a one bit per pixel AIS files file;
<sPixelsPerInch, fPixelsPerInch> are the output resolution
<dotsFile> File describing the halftone dots for each of the 4 color separations. See DefaultDots.data
<sSize, fSize> clipping height and width for the Interpress image (in inches, window located at the origin, note usual Interpress reversal of traditional x and y).
<white> Either 0 or 1. The output pixel value for white (affects the AIS photometry part)
This command allows you to simulate what a halftoning printer will produce when rendering an Interpress master. Uses ImagerPrintContext and ImagerBrick.
Example: InterpressToBinaryAIS foo.ip 300 300 7 45 0.45 4 5 0
Renders a 5 by 4 inch region of foo.ip at 300 spots per inch. The halftone screen is a nearly round dot at 45 degrees that can produce 50 gray levels and is 7 pixels on a side (7x7+1=50). Similar to what Quill would use.
MacPaintToInterpress [-q] [<output> ] <input>
MacPaintToIP [-q] [<output> ] <input>
<input> is the file name of a MacPaint file
<output> will be an Interpress master in the Xerox encoding
Unless the -q switch is invoked, the command line is printed as a caption at the bottom.
PICTToInterpress [-q] [<output> ] <input>
PICTToIP [-q] [<output> ] <input>
<input> is the file name of a Macintosh PICT file
<output> will be an Interpress master in the Xerox encoding
Unless the -q switch is invoked, the command line is printed as a caption at the bottom.
Currently, this command only intends to convert Macintosh ColorPixelMap in given PICT file. Other QuickDraw commands (i.e. vector graphics) in a file are not supported yet. This means that you can convert PICT output of color paint applications like PixelPaint but not MacDraw.
PressToInterpress [-q] [<output> ] <input> [<version>]
PressToIP [-q] [<output> ] <input> [<version>]
<input> is the file name of a Press file
<output> will be an Interpress master in the Xerox encoding
<version> is an optional version number (i.e., 1.0) that will be placed in the header; if supplied, an attempt will be made to translate the pressfonts to Xerox corporate standard fonts.
Unless the -q switch is invoked, the command line is printed as a caption at the bottom.
SnapShot <output> color | bw
Makes an Interpress master of the color or the black and white screen.
XCFonts
This provides compatibility (sort of) for Xerox Character Code fonts like you will find in Interpress masters coming from other parts of the corporation. Run automatically with any of the above.
RasterfileToIp <output> <rasterfile name> <pixels per inch>
Makes an Interpress master from a Sun rasterfile. The rasterfile must be 8 bits deep, use the standard image encoding, and use the EQUAL←RGB colormap encoding. A rasterfile whose size in pixels is [w, h] appears in the rectangle [0, 0, w/ppi, h/ppi] in the Interpress master.
DitherLikeRasterfile <output> <IP image input> <rasterfile colormap[&size] input> <pixels per inch> [<width inches> <height inches>]
Images an Interpress master into a Sun rasterfile, using dithering. The resulting rasterfile is 8 bits deep, uses the standard image encoding, and uses the EQUAL←RGB colormap encoding. The colormap used by the dithering is taken from another Sun rasterfile. The size of the output rasterfile is either given on the command line, or the same as the size of the colormap input rasterfile. When the output's size in pixels is [w, h], it captures the rectangle [0, 0, w/ppi, h/ppi] of the image in the input Interpress master.
XLoadIp [-display <display>] <filename> <x> <y> <w> <h> [in | mm] [ -ppi <ppi> | -rSize <f> <s> | -sFrac <xf> <yf> | -scale <s> ]
Images an Interpress master into the root window of an X server. The "<x> <y> <w> <h> [in | mm]" select which region of the IP master is imaged. The image is dithered into a tile using the current contents of the default colormap. The image is scaled independently in the X and Y dimensions to fit the tile size exactly. There are five ways to specify the size of the tile.
-ppi <ppi>
The tile is the same size as the selected region of the IP master, assuming the display has <ppi> pixels per inch.
-rSize <f> <s>
The tile is <f> pixels wide and <s> pixels high.
-sFrac <xf> <yf>
The tile's width is <xf> of the screen's width, and the tile's height is <yf> of the screen's height.
-scale <s>
The tile is <s> times as big as the selected region of the IP master (using the pixels-to-millimeters conversion that the X server suggests).
default
Equivalent to -scale 1.
CaptureXColormap <output> [ <X display>]
Captures the default colormap of an X server. If the server isn't specified, the Xl default server is used. The output is a Sun rasterfile with a 0 by 0 image and an EQUAL←RGB colormap.
Note: some servers (eg, the MIT R4 server and the Sun XNews server) always answer XQueryColors requests, regardless of whether the colors are allocated; thus, CaptureXColormap for these servers will report some unallocated colors. Best use CaptureXColormap right after the server is started, in hopes that the unallocated colors will duplicated allocated ones (eg, black). You can use the "xcmap" UNIX command to visually inspect your colormap.
Snapshot <output>
Takes a full screen snapshot of the main screen and creates an Interpress master in output.