InterpressToTape.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Maureen Stone, July 6, 1989 7:06:00 pm PDT
Doug Wyatt, April 12, 1988 6:38:06 pm PDT
Writes an Interpress master onto in raster form on a tape.
Formats supported are Crosfield (for making color separations at Kedie Orent)
and the Optronics (for making high resolution color film images).
DIRECTORY
Rope USING [ROPE],
UnixTapeOps USING [Density],
PrintColor USING [ColorCorrection];
InterpressToTape: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
ColorCorrection: TYPE ~ PrintColor.ColorCorrection;
Common Types and Utilities
IPSpec: TYPE = REF IPSpecRep;
The resulting raster will be fDim*pixelsPerInch by sDim*pixelsPerInch
Important note on resolution: The Crosfield and Optronics formats only accept a small number of resolutions (see CrosfieldTape and OptronicsTape for more details).
inchesPerMM: REAL = 0.3937008;
mmPerInch: REAL = 25.4;
IPSpecRep: TYPE = RECORD[
name: ROPE, --name of the Interpress file
page: NAT,
pixelsPerInch: NAT, --suggested values: 300 for Crosfield, 254 for Optronics
fOrg: REAL, sOrg: REAL, -- fast origin (raster) and slow origin, in inches
fDim: REAL, sDim: REAL, -- fastDimension (raster) and slowDimension, in inches
surfaceUnitsPerPixel: NAT ← 5, -- controls averaging for ImagerSmooth; 1 for no smoothing
colorCorrection: ColorCorrection ← NIL, --default this or see PrintColorTransformations
achromatic: BOOLEANFALSE
];
TapeSpec: TYPE = REF TapeSpecRep;
Uses UnixTapeOps which currently are only effective on the single drive (drive 0) on Palain.
You must have valid credentials on Palain to use this package.
TapeSpecRep: TYPE = RECORD [
note: ROPE, --ID field. Crosfield limits it to 20 characters, Optronics to 512
tapeNumber: NAT, --another form of ID
serverName: ROPE, --make it "Palain"
drive: NAT ← 0, --should always be 0 for Palain
density: UnixTapeOps.Density ← GCR6250,
tapeSize: NAT ← 2400
];
Format: TYPE = {crosfield, optronics};
Sizes: TYPE = RECORD[name: ROPE, size: REAL]; --size is in feet of tape
DefaultTapeSpec: PROC [name: ROPE, tapeNumber: NAT] RETURNS[TapeSpec];
Convenience procedure
DefaultIPSize: PROC [name: ROPE, page: NAT ← 1, tol: REAL ← 0.02] RETURNS [fOrg, sOrg, fDim, sDim: REAL];
Renders the IP file through ImagerMaskCapture and returns the size to within a tolerance specified in inches. The bigger the tolerance the faster this will run. The returned box is guaranteed to be big enough. It's good to leave a little extra space around these images.
SizeFromIPSpecs: PROC[files: LIST OF IPSpec, format: Format, tapeSpec: TapeSpec] RETURNS[sizes: LIST OF Sizes, total: REAL];
Tells you whether the IP files listed will fit on the specified tape.
Converters
Writes the files specified on the tape in specified format format. List cannot be longer than 80, a generous limit given the typical file size.
WriteTape: PROC [files: LIST OF IPSpec, format: Format, tapeSpec: TapeSpec];
For building up Crosfield Tapes a file at a time
InitCrosfieldTape: PROC [files: LIST OF IPSpec, tapeSpec: TapeSpec, rewindOnClose: BOOLEAN];
Must include correct FileSpecs for every file that may appear on the tape.
AddToCrosfieldTape: PROC[tapeSpec: TapeSpec, fileNumber: NAT, file: IPSpec, inPosition, rewindOnClose: BOOLEAN];
File numbers start at 1. Files must be added in the order specified in the master directory.
tapeSpec should match the one used in the call to InitCrosfieldTape.
If inPosition, assumes the tape is in the correct position for the new file.
If rewindOnClose, will rewind before closing the tape
WillNotFit: SIGNAL;
Use SizeFromIPSpecs to determine how to prune the files list.
As generating tapes and getting them processed takes a long time, it is important to be sure the correct bits are being written. Preview is used for checking position and windowing only. WriteAIS allows the more experience user to examine the CMYK or RGB density bytes produced by the different formats. For both routines, the the AIS files names will be generated by concatinating the nameSuffix with the root of the file name in the IPSpec. Typical use is to put all the AIS files in the same working directory.
It is inconvenient to examine AIS files at the high resolutions used by the tape formats.
reduceResolution reduces the resolution in the IPSpec by the indicated fraction.
Preview: PROC [files: LIST OF IPSpec, wd: ROPENIL, reduceResolution: REAL ← 0.25];
This routine previews the IPSpec to be sure it is accurately windowed by making three RGB intensity files. The colorCorrection field of the IPSpec is ignored.
WriteAIS: PROC [files: LIST OF IPSpec, format: Format, wd: ROPENIL, reduceResolution: REAL ← 0.25];
Uses exactly the same code for rasterization as WriteTape but puts the bytes in 3 or 4 AIS files. This is CMYK negative files for Crosfield format, and RGB density files (will look negative) for Optronics. Use Preview to produce files easily viewed for proofing.
END.