<<>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<>> INTERPRESS CONVERTERS CEDAR 10.1 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 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 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] [ _] AISToIP [-q] [ _] 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] [ _] CGMToIP [-q] [ _] is the file name of a CGM file 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] [ _] ColorAISToIP [-q] [ _] 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 IPImageExtract 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 [-option] converts an Interpress file into a raster Postscript file options include: res pixels per inch (default: 300) scale magnification (default: 1) height page height (default: 11.0 inches) width page width (default: 8.5 inches) trim trim to multiple of 32 in f direction (for some printers) landscape scan direction (default: portrait). InterpressToCompressedInterpress [ _] ... IPToCompressedIP [ _] ... IPToCIP [ _] ... is the file name of an Interpress master 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 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 to use a resolution of r pixels per inch (default -ppi 300) -angle half tone screen angle (default 45) -dotsPerInch use d dots per inch InterpressToBinaryAIS _ [-Resolution ] [-PixelsPerHalftoneDot ] [-Landscape] [-AllPages] [-Trim] [-Width ] [-Height ] IPToBinaryAIS _ [-Resolution ] [-PixelsPerHalftoneDot ] [-Landscape] [-AllPages] [-Trim] [-Width ] [-Height ] is the file name of an Interpress master in the Xerox encoding (default input.ais) will be a one bit per pixel AIS file; [-Resolution ] 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 ] 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 ] width in inches of the output raster. Default is 8.5. Overridden by -Trim. [-Height ] height in inches of the output raster. Default is 11.0. Overridden by -Trim. Example: InterpressToBinaryAIS bar.ais _ foo.ip -Resolution 300 -Trim <> < sPixelsPerInch fPixelsPerInch pixelsPerDot screenAngle dotShape sSize fSize white>> < sPixelsPerInch fPixelsPerInch pixelsPerDot screenAngle dotShape sSize fSize white>> << is the file name of an Interpress master in the Xerox encoding>> <> << are the output resolution>> << is the number of output pixels used to construct a halftone dot>> << is the simulated halftone screen angle (in degrees)>> << 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.>> << clipping height and width for the Interpress image (in inches, window located at the origin, note usual Interpress reversal of traditional x and y).>> << Either 0 or 1. The output pixel value for white (affects the AIS photometry part)>> <> <> <> <<>> <<>> <> InterpressToAIS [ _] {gray} {ppi: } {fppi: } {sppi: } {size: f s} IPToAIS [ _] {gray} {ppi: } {fppi: } {sppi: } {size: f s} is the file name of an Interpress master in the Xerox encoding without gray option, will be three AIS files: outputRoot-red.ais, outputRoot-green.ais, outputRoot-blue.ais. with gray option, will be single AIS file, Intensity encoded: outputRoot.ais. 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. 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* by size.f*. This operation images only the first page of the Interpress master. Use IPBreakup to get separate pages from a multipage master. InterpressToJaM [ _] Moved to InterpressToJaM.df InterpressToPress [ _] IPToPress [ _] is the file name of an Interpress master in the Xerox encoding will be a Press file; note that all Interpress semantics are not supported by Press InterpressToColorHalftoneAIS sPixelsPerInch fPixelsPerInch dotsFile sSize fSize white 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; are the output resolution File describing the halftone dots for each of the 4 color separations. See DefaultDots.data clipping height and width for the Interpress image (in inches, window located at the origin, note usual Interpress reversal of traditional x and y). 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] [ _] MacPaintToIP [-q] [ _] is the file name of a MacPaint file 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] [ _] PICTToIP [-q] [ _] is the file name of a Macintosh PICT file 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] [ _] [] PressToIP [-q] [ _] [] is the file name of a Press file will be an Interpress master in the Xerox encoding 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 _ 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 _ 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 _ [ ] 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 ] [in | mm] [ -ppi | -rSize | -sFrac | -scale ] Images an Interpress master into the root window of an X server. The " [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 The tile is the same size as the selected region of the IP master, assuming the display has pixels per inch. -rSize The tile is pixels wide and pixels high. -sFrac The tile's width is of the screen's width, and the tile's height is of the screen's height. -scale The tile is 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 [_ ] 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 Takes a full screen snapshot of the main screen and creates an Interpress master in output.