Also Known As: CT, LW, BM, PG, and TX
| Type | Raster (CT, LW), Bitmap (BM), Metafile (PG), Text (TX) |
| Colors | 1-bit (BM), 32-bit (CT, LW, and PG) |
| Compression | None (CT, TX, BM, and PG), RLE (LW) |
| Maximum Image Size | 4Gx4G |
| Multiple Images Per File | No (CT, LW, and BM), Yes (PG) |
| Numerical Format | ASCII |
| Originator | Scitex Corporation |
| Platform | Scitex workstations |
| Supporting Applications | Adobe Photoshop (CT only) |
| See Also | None |
Usage
The Scitex formats are designed the meet all the file format
needs of an electronic publishing system.
Comments
The only HandShake format to see wide usage outside of Scitex
Systems is the Scitex CT format. CT files are used primarily to store
CMYB image data and are commonly created by Adobe Photoshop.
The Scitex formats are used by the Scitex color electronic prepress and visual communications systems. All five Scitex formats are part of the HandShake Foreign File Transfer Protocol. HandShake is a standard defining the data storage formats and data interchange protocols used between Scitex and non-Scitex systems. HandShake has been used by Scitex since 1986.
Contents:
File Organization
File Details
For Further Information
The five Scitex formats are:
The most well-known of these formats outside of Scitex systems is the Scitex CT format. Several years ago Scitex CT was included as one of the many formats supported by Adobe's Photoshop application. It has since become a popular format for storing CMYB truecolor raster data. Scitex LW is also commonly used for storing graphical data with 256 or fewer colors. LW is also the only HandShake format that supports any type of data compression. Scitex BM is used exclusively for storing two-color data.
Scitex TX is a simple format used to store typesetting data. Scitex PG is a metafile that stores both CT and LW pictures and vector objects in a page layout format.
The Scitex formats use only five data types: ASCII, BYTE, integer, long integer, and floating point. Of these five types, only the BYTE data type is what you might consider a conventional representation of data. All other data types are expressed as strings to eliminate the problems of differing byte-ordering conventions (big- and little-endian) between systems, and simplify the process of interchanging data between systems.
BYTE data types are 8-bit unsigned characters, as commonly described in this book. ASCII are strings of 7-bit ASCII characters. Scitex strings, however, are never NULL-terminated. Integers are a string of six ASCII characters. The first character indicates the sign ("+" or "-"), and the remaining five characters are the integer value, left-padded with zeros. For example, the value -10 would be stored as "-000010", and the value 32767 as "+32767". Long integers are stored as a 12-character ASCII string with the first character specifying the sign and the remaining 11 characters representing the left-zero-padded value.
Float values are stored as 14-character ASCII strings. The first character is the sign ("+" or "-"), the second character is the point ("."), characters 3 to 10 are the value, character 11 is the exponent symbol ("E"), character 12 is the exponent sign ("+" or "-"), and characters 13 and 14 are the exponent value. For example, the value 0.00643 would be stored as "+.64300000E-02", and the value -4321.421 as "-.43214210+E04".
To simplify the code examples, all of these data types are represented as BYTE arrays. The specific Scitex data types can be recognized by the length of the arrays and by comments in the code:
BYTE ByteValue; /* Scitex BYTE */
BYTE AsciiString[80]; /* Scitex 80-character ASCII string */
BYTE IntegerValue[6]; /* Scitex Integer */
BYTE LongIntValue[12]; /* Scitex Long Integer */
BYTE FloatValue[14]; /* Scitex Floating Point */
A HandShake file will contain one or two headers depending upon how the file is stored. Files stored on disk or magnetic tape will contain two headers. The first header, called the Control Block, is 256 bytes in length and contains information identifying the file's name, type, and size. For files stored on disk, the Control Block is followed by 768 bytes of unused space used to pad the block out to the next 1024-byte boundary.
The format of the Control Block is the same for both disk and tape files:
typedef struct _FileControlBlock
{
BYTE Name[80]; /* File name */
BYTE FileType[2]; /* File type identifier */
BYTE BlockSize[12]; /* Maximum size of data blocks in bytes */
BYTE Reserved[12]; /* Reserved field */
BYTE Count[1]; /* Sequence number */
BYTE Padding[149]; /* Reserved field */
} FILECONTROLBLOCK;
Name is the name of the file (but not the path) stored as an ASCII string.
FileType is a two-byte code that indicates the type of data stored in the file. The defined codes for this field are "PG", "CT", "LW", "BM", and "TX".
BlockSize is a long integer that indicates the maximum number of bytes in each physical data block for files stored on HandShake magnetic tapes, or the maximum number of data bytes in each message using the HandShake on-line transfer protocol. This value is always an even number. This field has no meaning in disk files.
Reserved is a field 12 bytes in length and set to zero. The field is reserved for future use by Scitex systems.
Count is the sequence number of the tape. A byte value of 0 indicates the first tape; 1 indicates the 2nd tape; 2 indicates the 3rd tape, and so on. This field is not used in disk files.
Padding extends the File Control Record to a 256-byte boundary. The bytes of this field are set to zero.
Following the Control Block (and the boundary padding for disk files) is a second header called the Parameters Block. This header stores information used to interpret the graphical and/or textual data stored in the file. The Parameters Block appears in all HandShake files and is always 256-bytes in size. In disk files the Parameters Block is also followed by 768 bytes of unused space used to pad the block out to the next 1024-byte boundary.
Following the Control and Parameters Blocks will be the graphical data. In LW and BM files the data will be preceded by a Color Definitions Table. The size of this table will be 18 bytes per color used in the graphical data. For BM file the table is always 36 bytes (18 * 2) in length. For LW files using 256 colors the size of the table will be 4608 bytes (18 * 256). Figure Scitex-1 illustrates the internal location of the data blocks with all five types of HandShake files stored on disk.
HandShake files may be stored on magnetic tape using either the 1600 BPI PE or 6250 BPI GCR encoding format. Each file stored on tape is preceded by an End-Of-File (EOF) marker. The last file on the tape is marked by two consecutive EOF markers and an End-Of-Tape (EOT) marker. The layout of these files is shown in Figure Scitex-2.
The EOT marker is a physical metallic strip near the end of magnetic tapes and are used as a signal that the tape is about to end. There may be a very large gap between the double EOF markers (signaling the end of the data on the tape) and the EOT. In the case of a single file split across two tapes, the EOT would actually appear during the last data block and before the double EOFs. The reading program should be able to tell from the data read if there is more data for the file on a continuation tape. The use of the EOT is therefore only important for the writer as a signal that a continuation tape needs to be used. This is standard practice for "unlabeled" ANSI or IBM-mainframe format tapes.
If files are stored on multiple tapes, then the value of the Count field in the Control Block of each file is used as a sequencing number. Files stored on the first tape have a Count value of 0; files stored on the second tape have a Count value of 1, and so on.
The HandShake specification includes online transfer protocols for transferring HandShake files over GP-IB or RS-232 links. Because CT, BM, PG, and LW files tend to be very large, RS-232 links are almost only used for text (TX) files. The online protocols define all aspects of the file transfer. Other transfer protocols, such as ZMODEM, FTP, and AppleTalk, may be used to transfer disk HandShake files between systems supporting them.
When using the HandShake online transfer protocol, no Control Block is sent; its information is included in the protocol itself. The Parameter Block is sent as a single 256-byte message. If the receiver is writing a received HandShake file to disk, the program must create the appropriate Control Block on disk and pad the Control and Parameter Blocks to 1024 bytes.
If other transfer protocols are used to transfer HandShake files, this processing will not be required, because the original Control and Parameter Blocks will be sent in their entirety. It may seem by reading the HandShake specification that a disk file need not have a Control Block. In fact, HandShake files stored on disks always have a Control Block. The on-line protocol is often used without actually writing a HandShake file to disk; the receiver may convert it to internal formats during the transfer. The HandShake on-line protocol is designed with this usage in mind.
The following sections describe the Parameters Block and data stored method used in each of the five Scitex HandShake file formats.
Scitex CT files store uncompressed, CMYB truecolor raster data. CT files contain a Control Block, a Parameters Block, and the image data.
| Control Block |
| Parameters Block |
| Data |
The Parameters Block is 256-bytes in length and has the following format:
typedef struct _CtParametersBlock
{
BYTE UnitsOfMeasurement; /* Units of measurement (0 mm, 1 inches) */
BYTE NumColorSeparations; /* Number of color separations in picture */
BYTE SeparationsBitMask[2]; /* Bit mask of separations */
BYTE HeightInUnits[14]; /* Height of picture in units */
BYTE WidthInUnits[14]; /* Width of picture in units */
BYTE HeightInPixels[12]; /* Height of picture in pixels */
BYTE WidthInPixels[12]; /* Width of picture in pixels */
BYTE ScanDirection; /* Orientation of source on scanner */
BYTE Reserved[199]; /* Reserved (always 0) */
} CTPARAMETERSBLOCK;
UnitsOfMeasurement is the measurement unit used by the HeightInUnits and WidthInUnits fields. This value may be 0 (millimeters) or 1 (inches).
NumColorSeparations is the number of color separations stored in the image data. This value may be in the range of 1 to 16. Only the CMYB color model is currently supported in the HandShake format.
SeparationsBitMask is a 2-byte field used to indicate the type of data stored in the CT file. The bitfield is defined as follows:
| Bit 0 | Cyan |
| Bit 1 | Magenta |
| Bit 2 | Yellow |
| Bit 3 | Black |
| Bits 4:15 | Undefined (always 0) |
The specific bit(s) are set depending upon the type of separation data stored. For example, a CMYB file would store a value of 000Fh (bits 0:3); a CMY file would store a value of 0007h (bits 0:2), and a file only containing a yellow separation would store a value of 0004h (bit 2). Only the data for the separations defined by this field is actually stored in the CT file.
HeightInUnits and WidthInUnits are Scitex floating point values describing the height and width of the image in terms of the units specified in the UnitsOfMeasurement field.
HeightInPixels and WidthInPixels are Scitex long integer values describing the height and width of the image in pixels.
ScanDirection is a bitmap indicating the position of the image source on the scanner. The bitfields are defined as follows:
| Bit 0 | 0 = Top to bottom, 1 = Bottom to top |
| Bit 1 | 0 = Left to right, 1 = Right to left |
| Bit 2 | 0 = No rotation, 1 = 90 degree counter-clockwise rotation |
| Bits 3:7 | Undefined (always 0) |
The eight possible values for the ScanDirection field are described as such (the default is 0):
| Value | Bit Pattern | Scan Direction |
|---|---|---|
| 0 | 0000 0000 | Top to bottom, left to right, no rotation (default) |
| 1 | 0000 0001 | Bottom to top, left to right, no rotation |
| 2 | 0000 0010 | Top to bottom, right to left, no rotation |
| 3 | 0000 0011 | Bottom to top, right to left, no rotation |
| 4 | 0000 0100 | Top to bottom, left to right, 90 degree rotation |
| 5 | 0000 0101 | Bottom to top, left to right, 90 degree rotation |
| 6 | 0000 0110 | Top to bottom, right to left, 90 degree rotation |
| 7 | 0000 0111 | Bottom to top, right to left, 90 degree rotation |
Reserved is a 199-byte field used for future expansion of the Scitex CT parameters block. This field is typically set to 0.
Scitex CT images are typically four-separation, CMYB, line-interleaved raster data. The color separations are always stored by scan line and in a Cyan-Magenta-Yellow-Black order. A color or pixel value may be up to 16 separations (128-bits) in size. Separations 1 through 4 are defined to be, in order, Cyan, Magenta, Yellow, and Black. Separations 5 through 16 are reserved for future expansion of the format, as shown below.
| 1st Color Separation (Cyan) |
| 2nd Color Separation (Magenta) |
| 3rd Color Separation (Yellow) |
| 4th Color Separation (Black) |
| 5th Color Separation |
| ... |
| 16th Color Separation |
Each row of Scitex CT image data is stored by color separation. The first separation's data for a row is followed by the second, and so forth up to the number of separations specified by NumColorSeparations. Only the data for the separations defined by the SeparationsBitMask field is actually stored in the CT file.
Each pixel may contain up to sixteen separation components and each component is one BYTE in size. A CMYB pixel will contain four components and be a total of 32-bits in size. But remember, the data is stored not by pixel, but instead by separation. If rows contains an odd number of bytes, then a zero padding byte will be added to the end of each separation to preserve WORD alignment.
For example, let's assume we have a CMYB image that contains three rows of four pixels. For each row all of the cyan pixels components are stored first, the magenta pixel components stored second, the yellow pixel components stored third, and the black pixel components are stored last (Figure Scitex-3).
It is important to note that the NumColorSeparations field in the header only stores the number of separations in the image data, and does not indicate what data is stored in the separations. For example, a CT file containing only one separation might be storing cyan, magenta, yellow, or black data in the one separation. The SeparationsBitMask field is used to determine the separation data stored in the file. When a bit is set to 1 the specified separation is present. Separation data is always stored in the same fixed order, and only the actual separation data is stored in the file (no data or "filler" is present for separations not used).
The component value of each separation is an indication of a percentage of the intensity of that color. A component value of 0 represents a fully (100%) dark dot, while a value of 255 represents a fully (0%) light dot. The raster image data itself is not compressed.
Scitex LW files store color-mapped images containing up to 255 colors. Each color is described as a 16-color separation. LW files are composed of a Control Block, Parameters Block, a Color Definitions Table (color map), and the image data (shown below).
| Control Block |
| Parameters Block |
| Color Definitions Table |
| Data |
The LW file Parameters Block is 256-bytes in length and has the following format:
typedef struct _LwParametersBlock
{
BYTE UnitsOfMeasurement; /* Units of measurement (0 mm, 1 inches) */
BYTE NumColorSeparations; /* Number of color separation in picture */
BYTE SeparationsBitMask[2]; /* Bit mask of separations */
BYTE HeightInUnits[14]; /* Height of picture in units */
BYTE WidthInUnits[14]; /* Width of picture in units */
BYTE HeightInPixels[12]; /* Height of picture in pixels */
BYTE WidthInPixels[12]; /* Width of picture in pixels */
BYTE NumberOfColors; /* Number of entries in color table */
BYTE ScanDirection; /* Orientation of source on scanner */
BYTE Reserved[198]; /* Reserved (always 0) */
} LWPARAMETERSBLOCK;
UnitsOfMeasurement is the measurement unit used by the HeightInUnits and WidthInUnits fields. This value may be 0 (millimeters) or 1 (inches).
NumColorSeparations is the number of color separations stored in the image data. This value may be in the range of 1 to 16. Only the CMYB color model is currently supported in the HandShake format.
SeparationsBitMask is a 2-byte field used to indicate the type of data stored in the LW file. The bitfield is defined as follows:
| Bit 0 | Cyan |
| Bit 1 | Magenta |
| Bit 2 | Yellow |
| Bit 3 | Black |
| Bits 4:15 | Undefined (always 0) |
The specific bit(s) are set depending upon the type of separation data stored. For example, a CMYB file would store a value of 000Fh (bits 0:3); a CMY file would store a value of 0007h (bits 0:2), and a file only containing a yellow separation would store a value of 0004h (bit 2). Only the data for the separations defined by this field is actually stored in the LW file.
HeightInUnits and WidthInUnits are Scitex floating point values describing the height and width of the image in terms of the units specified in the UnitsOfMeasurement field.
HeightInPixels and WidthInPixels are Scitex long integer values describing the height and width of the image in pixels.
NumberOfColors specifies the number of different color areas (number of entries in the color table) in the picture. This value is in the range of 1 to 255. 0 is not a valid value.
ScanDirection is a bitmap indicating the position of the image source on the scanner. See the description of this header field in the Scitex CT image file format section.
Reserved is a 198-byte field used for future expansion of the Scitex LW header. This field is typically set to 0.
The Color Definitions Table stores 1 to 255 colors used by the LW image data. Each color may be described as up to 16 color separations. The raster data are index values into this array. This table contains one entry per color stored in the following format:
typedef struct _LwColorDefinitions
{
struct _Colors
{
BYTE ColorIndex; /* Index of color entry */
BYTE Reserved; /* Padding (always 0) */
BYTE ColorValue[16]; /* Color separations for entry */
} Colors[NumberOfColors];
} LWCOLORDEFINITIONS;
ColorIndex is the numerical index of this color entry. This value is in the range of 1 to 255. 0 is not a legal value.
Reserved is an unused field that is always set to 0.
ColorValue is a 16-element array that contains the 16-color separations defined by this table entry. Each element holds a value describing one color separation. The bits set in the SeparationsBitMask header field indicate which array elements have meaning for the file.
LW image data is always run-length encoded using a simple algorithm. Runs of contiguous pixels of identical color values are encoded as two-byte codes. The first byte is the run value, and indicates the entry in the color definitions table that describes the color of the pixel run. The second byte is the run count, and indicates the number of pixels in the run. Both of these values may be in the range of 1 to 255. Runs longer than 255 pixel must be encoded as consecutive RLE codes.
Each row of encoded pixel data begins and ends with a two-byte RLE code with a run value and a run count of 0. These beginning-of-row and end-of-row markers are used by the LW file reader to identify the starting and ending points of each row.
Figure Scitex-4 illustrates the RLE codes used to encode an image 320 pixels in width. The first row contains three colors and encodes to four run codes. The second row contains two colors, encodes to three run codes, and shows the encoding of a run greater than 255 pixels in length.
Scitex BM files store two-color image data. A BM file is composed of a Control Block, a Parameters Block, a Color Definitions Table (color map), and finally the image data (shown below).
| Control Block |
| Parameters Block |
| Color Definitions Table |
| Data |
The BM file Parameters Block is 256-bytes in length and has the following format:
typedef struct _BmParametersBlock
{
BYTE UnitsOfMeasurement; /* Units of measurement (0 mm, 1 inches) */
BYTE NumColorSeparations; /* Number of color separations in picture */
BYTE SeparationsBitMask[2]; /* Bit mask of separations */
BYTE HeightInUnits[14]; /* Height of picture in units */
BYTE WidthInUnits[14]; /* Width of picture in units */
BYTE HeightInPixels[12]; /* Height of picture in pixels */
BYTE WidthInPixels[12]; /* Width of picture in pixels */
BYTE SourceState; /* Original state of the source image */
BYTE Reserved[199]; /* Reserved (always 0) */
} BMPARAMETERSBLOCK;
UnitsOfMeasurement is the measurement unit used by the HeightInUnits and WidthInUnits fields. This value may be 0 (millimeters) or 1 (inches).
NumColorSeparations is the number of color separations stored in the image data. This value may be in the range of 1 to 16. Only CMYB are currently supported in the HandShake format.
SeparationsBitMask is a 2-byte field used to indicate the type of data stored in the BM file. The bitfield is defined as follows:
| Bit 0 | Cyan |
| Bit 1 | Magenta |
| Bit 2 | Yellow |
| Bit 3 | Black |
| Bits 4:15 | Undefined (always 0) |
The specific bit(s) are set depending upon the type of separation data stored. For example, a CMYB file would store a value of 000Fh (bits 0:3); a CMY file would store a value of 0007h (bits 0:2), and a file only containing a yellow separation would store a value of 0004h (bit 2). Only the data for the separations defined by this field is actually stored in the BM file.
HeightInUnits and WidthInUnits are Scitex floating point values describing the height and width of the image in terms of the units specified in the UnitsOfMeasurement field.
HeightInPixels and WidthInPixels are Scitex long integer values describing the height and width of the image in pixels.
SourceState specifies the original state of the source image. Valid values are 0 (screened) and 1 (linework).
Reserved is a 199-byte field used for future expansion of the Scitex BM header. This field is typically set to 0.
The Color Definitions Table stores the two colors used by the BM image data. Each color may be described as up to 16 color separations. This table contains two 18-byte entries in the following format:
typedef struct _BmColorDefinitions
{
struct _Colors
{
BYTE ColorIndex; /* Index of color entry */
BYTE Reserved; /* Padding (always 0) */
BYTE ColorValue[16]; /* Color separations for entry */
} Colors[2];
} BMCOLORDEFINITIONS;
ColorIndex is the numerical index of this color entry. This value is 0 for table entry zero and 1 for table entry one.
Reserved is an unused field that is always set to 0.
ColorValue is a 16-element array that contains the 16 color separations defined by this table entry. Each element holds a value describing one color separation. The bits set in the SeparationsBitMask header field indicate which array elements have meaning for the file.
BM files contain 1-bit per pixel, uncompressed data. Data is stored eight pixels per byte and the length of each row is always rounded up to the nearest 16-bit boundary. Extra pixels at the end of each row are always set to 0. The most-significant bit in each byte is the first pixel.
The value of each pixel is used as an index into the color definition table. A 0 pixel value indexes to the 0th table entry, and a 1 pixel value indexes to the 1st table entry.
Figure Scitex-5 illustrates a row of BM data 24 pixels in length. Bits 0:23 are the actual image data, and bits 24:31 are padding pixels to extend the row to the nearest 16-bit boundary.
Scitex TX files are used to store textual data and processing commands for specific typesetting languages. They are composed of a Control Block, a Parameters Block, and typesetting data (shown below).
| Control Block |
| Parameters Block |
| Text Data |
The TX file Parameters Block is 256-bytes in length and has the following format:
typedef struct _TxParametersBlock
{
BYTE LanguageType[2]; /* Text command language */
BYTE SizeOfTextData[12]; /* Size of text data in bytes */
BYTE Reserved[242]; /* Reserved (always 0) */
} TXPARAMETERSBLOCK;
LanguageType is a two-character code used to indicate the format of the text stored in the TX file. Valid values for this field are "ST" (Scitex Typesetting Language), "AP" (APS Autologic Input Command Language), and "LN" (Linotype CORA).
SizeOfTextData is a Scitex long integer value that stores the total size of the text data in bytes. If the size is unknown this value will be -1 ("-00000000001").
Reserved is a 242-byte field used for future expansion of the Scitex TX header. This field is typically set to 0.
The text data that follows the header will conform to the data format indicated by the value of the LanguageType field in the header. Refer to the Scitex HandShake Foreign File Transfer Protocol document for more information on typesetting languages supported. The CORA format is no longer supported by Scitex systems.
Page files are metafiles storing both raster images and vector drawings. They are used to describe the layout of drawings and pictures on a page. In addition to Scitex systems, there are many non-Scitex page layout systems which can create PG files. These files are typically transferred to Scitex Whisper systems for execution, additional processing, and output.
Page files contain a Control Block, a Parameters Block, and a collection of one or more page entries. Each page entry may be either a shape or a picture. Shapes entries are vector drawings of lines, rectangles, ellipses, and polygons. Picture entries are continuous tone (CT) or linework (LW) pictures that may be displayed in whole or through a viewing window. Figure Scitex-6 illustrates the basic layout of a PG file.
Entries are drawn on the display in the order that they are stored in the file. Entry one is drawn first, followed by entries two, three, and so on. Entries may be overlapped by changing their position and the order in which they are drawn. Newer entries will be layered on top of older entries. The position of each entry on the page is given in width and height (X and Y) coordinates from the top left corner of the page.
Rectangle and ellipse shapes, and both CT and LW picture entries, may be rotated. The angle of rotation is always measured in degrees. A positive angle of rotation indicates a counter-clockwise rotation; a negative angle of rotation indicates a clockwise rotation. The axis of rotation is at the top left corner of a rectangle or picture and in the center of the ellipse. The height and width of an entry are determined before the entry is rotated. For example, if a rectangle two inches wide and four inches high is rotated 90 degrees, the height and width are considered to be unchanged.
Rectangle, ellipse, and polygon shapes may optionally contain frames. A frame is an inward extension of the shape. It can be used to create decorative elements or to create windows through which another picture element (CT or LW) can be placed. A frame is defined by a thickness and a color value. The thickness defines the distance of the inner border of the frame from the inner border of the previous frame or, for the first frame, from the outline of the shape. In the case of ellipses and rectangles, the frame thickness may differ in the height and width dimensions. For polygons, the frame border is always the same orthogonal distance from the previous frame's border or the shape's defining lines.
A shape can be transparent (hollow) or solid (not hollow). For a solid shape, the shape's color is displayed. For a transparent shape, the innermost framed portion of the shape is transparent and any underlying elements are visible. A transparent shape must have at least one frame, otherwise it would have no effect. For example, a transparent rectangle with a frame effectively places a colored frame around the underlying elements.
The PG file Parameters Block is 256-bytes in length and has the following format:
typedef struct _PgParametersBlock
{
BYTE UnitsOfMeasurement; /* Units of measurement (0 mm, 1 inches) */
BYTE NumColorSeparations; /* Number of color separations in picture */
BYTE SeparationsBitMask[2]; /* Bit mask of separations */
BYTE HeightInUnits[14]; /* Height of picture in units */
BYTE WidthInUnits[14]; /* Width of picture in units */
BYTE HeightInPixels[12]; /* Height of picture in pixels */
BYTE WidthInPixels[12]; /* Width of picture in pixels */
BYTE NumberOfEntries[6]; /* Total number of entries in the page */
BYTE BackgroundColor[16]; /* Background color of the page */
BYTE PageFlag; /* 0 = single page, 1 = double page */
BYTE Padding; /* Alignment padding (always 0) */
BYTE WidthOfLeftPage[14]; /* Width of left page on a double page */
BYTE Reserved[162]; /* Reserved (always 0) */
} PGPARAMETERSBLOCK;
UnitsOfMeasurement is the measurement unit used by the HeightInUnits and WidthInUnits fields. This value may be 0 (millimeters) or 1 (inches).
NumColorSeparations is the number of color separations stored in the image data. This value may be in the range of 1 to 16. Only the CMYB color model is currently supported in the HandShake format.
SeparationsBitMask is a 2-byte field used to indicate the type of data stored in the PG file. The bitfield is defined as follows:
| Bit 0 | Cyan |
| Bit 1 | Magenta |
| Bit 2 | Yellow |
| Bit 3 | Black |
| Bits 4:15 | Undefined (always 0) |
The specific bit(s) are set depending upon the type of separation data stored. For example, a CMYB file would store a value of 000Fh (bits 0:3); a CMY file would store a value of 0007h (bits 0:2), and a file only containing a yellow separation would store a value of 0004h (bit 2). Only the data for the separations defined by this field is actually stored in the PG file.
HeightInUnits and WidthInUnits are Scitex floating point values describing the height and width of the image in terms of the units specified in the UnitsOfMeasurement field.
HeightInPixels and WidthInPixels are Scitex long integer values describing the height and width of the image in pixels.
NumberOfEntries is a Scitex integer value indicating the total number of shape and picture entries in the page.
BackgroundColor is the background color of the page. The color value is described as a 16-byte color separation.
PageFlag indicates if the page is a single page (value of 0) or a double page (value of 1). Double pages are no longer supported by Scitex systems, although other systems implementing PG may still support this feature.
Padding is a single byte of alignment padding with the value of 0.
WidthOfLeftPage is a Scitex floating point value indicating the width of the left page in terms of the units specified in the UnitsOfMeasurement field. This field is only used if PageFlag is equal to 1 indicating a double page.
Reserved is a 162-byte field used for future expansion of the Scitex PG header. This field is typically set to 0.
A line shape is defined by two or more connected points on a bitmap or grid. Line segments between two points are allowed to overlap other line segments of the same line. Line entries never contain frame data. Each line shape entry has the following, variably sized, format:
typedef struct _PgLineEntry
{
BYTE EntryType; /* Type of entry (always 3) */
BYTE ShapeType; /* Type of shape (always 6) */
BYTE NumberOfBlocks; /* Number of 256-bytes blocks used by entry */
BYTE LineEdgeShape; /* 0 = rounded, 1 = straight */
BYTE ColorOfShape[16]; /* Color of shape */
BYTE EntrySeprBitMask[2]; /* Bit mask of separations for entry */
BYTE LineThickness[14]; /* Thickness of line */
BYTE NumberOfPoints[6]; /* Number of points in the line */
struct _Points
{
BYTE PointHeightCoord[14]; /* Height offset of point from page origin */
BYTE PointWidthCoord[14]; /* Width offset of point from page origin */
} Points[NumberOfPoints];
} PGLINEENTRY;
EntryType is the type of data stored in this entry. For shape entries this value is always 3.
ShapeType is the type of shape. For line shapes this value is always 6.
NumberOfBlocks is the number of 256 byte blocks that the data for this entry occupies. If the number of points that describe the line occupy more than 256 bytes, the block(s) following this entry shall store the data until all points and frames are defined. The last block will be padded out to an even 256 bytes in size.
LineEdgeShape indicates if the ends of the line are straight (value of 1) or rounded (value of 0).
ColorOfShape is color of the polygon described as a 16-element color separation.
EntrySeprBitMask is the bitmask describing the data stored in the ColorOfShape field. This field has the same format as the SeparationsBitMask field in the PG header.
LineThickness is a Scitex floating point value that specifies the thickness of the line described in the type of units indicated in the UnitsOfMeasurement field in the PG header.
NumberOfPoints is a Scitex integer that indicates the number of points used to describe the line. This value is also the number of elements in the Points array.
The Points array stores the coordinates of each point in the line. One coordinate is stored per element of the array. The PointHeightCoord field of each element stores the Y value of the point and the PointWidthCoord field stores the X value of the point.
A polygon is nearly identical to a line with the exceptions that polygons are always closed, and none of the line segments that make up a polygon may overlap (intersect). Polygons are therefore ideal for creating closed shapes, such as triangles, trapezoids, and parallelograms. Polygon entries may also contain frame data. Each polygon shape has the following, variably sized, format:
typedef struct _PgPolygonEntry
{
BYTE EntryType; /* Type of entry (always 3) */
BYTE ShapeType; /* Type of shape (always 5) */
BYTE NumberOfBlocks; /* Number of 256-bytes blocks used by entry */
BYTE Padding; /* Alignment padding (always 0) */
BYTE ColorOfShape[16]; /* Color of shape */
BYTE EntrySeprBitMask[2]; /* Bit mask of separations for entry */
BYTE NumberOfPoints[6]; /* Number of points in the line */
struct _Points
{
BYTE PointHeightCoord[14]; /* Height offset of point from page origin */
BYTE PointWidthCoord[14]; /* Width offset of point from page origin */
} Points[NumberOfPoints];
BYTE NumberOfFrames; /* Number of frames */
BYTE Hollow; /* 1 = transparent, 0 = solid */
struct _Frames
{
BYTE ColorOfFrame[16]; /* Color of frame */
BYTE FrameSeprBitMask[2]; /* Bit mask of separations for frame */
BYTE WidthOfFrame[14]; /* Width of frame */
} Frames[NumberOfFrames];
} PGPOLYGONENTRY;
EntryType is the type of data stored in this entry. For shape entries this value is always 3.
ShapeType is the type of shape. For polygon shapes this value is always 5.
NumberOfBlocks is the number of 256 byte blocks that the data for this entry occupies. If the number of points and frames that describe the polygon occupy more than 256 bytes, the block(s) following this entry shall store the data until all points and frames are defined. The last block will be padded out to an even 256 bytes in size.
ColorOfShape is color of the polygon described as a 16-element color separation.
EntrySeprBitMask is the bitmask describing the data stored in the ColorOfShape field. This field has the same format as the SeparationsBitMask field in the PG header.
NumberOfPoints is a Scitex integer that indicates the number of points used to describe the polygon. This value is also the number of elements in the Points array.
The Points array stores the coordinates of each point in the polygon. One coordinate is stored per element of the array as a Scitex floating point value. The PointHeightCoord field of each element stores the Y value of the point and the PointWidthCoord field stores the X value of the point. These coordinates are described in the type of units indicated in the UnitsOfMeasurement field in the PG header.
NumberOfFrames is a Scitex integer that indicates the number of frames used to describe the shape. This value will be in the range of 0 (no frames) to 10.
Hollow indicates that the portion of the shape within its frames is solid (value of 0) or transparent (value of 1).
The following entries are repeated once per NumberOfFrames times:
An ellipse shape is used to draw both ellipses and circles. Ellipse entries may contain frame data. Each ellipse shape has the following, variably sized, format:
typedef struct _PgEllipseEntry
{
BYTE EntryType; /* Type of entry (always 3) */
BYTE ShapeType; /* Type of shape (always 3) */
BYTE NumberOfBlocks; /* Number of 256-bytes blocks used by entry */
BYTE Padding; /* Alignment padding (always 0) */
BYTE RotationAngle[14]; /* Rotation angle of shape */
BYTE ColorOfShape[16]; /* Color of shape */
BYTE EntrySeprBitMask[2]; /* Bit mask of separations for entry */
BYTE HeightOffset[14]; /* Height offset of center from page origin */
BYTE WidthOffset[14]; /* Width offset of center from page origin */
BYTE HeightDiameter[14]; /* Height diameter of shape */
BYTE WidthDiameter[14]; /* Width diameter of shape */
BYTE NumberOfFrames; /* Number of frames */
BYTE Hollow; /* 1 = transparent, 0 = solid */
struct _Frames
{
BYTE ColorOfFrame[16]; /* Color of frame */
BYTE FrameSeprBitMask[2]; /* Bit mask of separations for frame */
BYTE HeightOfFrame[14]; /* Height of frame thickness */
BYTE WidthOfFrame[14]; /* Width of frame thickness */
} Frames[NumberOfFrames];
} PGELLIPSEENTRY;
EntryType is the type of data stored in this entry. For shape entries this value is always 3.
ShapeType is the type of shape. For ellipse shapes this value is always 3.
NumberOfBlocks is the number of 256 byte blocks that the data for this entry occupies. If the number of frames that describe the ellipse occupy more than 256 bytes (only possible if there are more than three frames), the block(s) following this entry shall store the data until all points are defined. The last block will be padded out to an even 256 bytes in size.
Padding is a single byte of alignment padding with the value of 0.
RotationAngle is a Scitex floating point values used to describe the rotation angle of the ellipse shape. The axis of rotation is the center of the ellipse.
ColorOfShape is color of the ellipse described as a 16-element color separation.
EntrySeprBitMask is the bitmask describing the data stored in the ColorOfShape field. This field has the same format as the SeparationsBitMask field in the PG header.
HeightOffset and WidthOffset are the coordinates of the center of the ellipse shape. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
HeightDiameter and WidthDiameter is the height and width of the ellipse shape. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
NumberOfFrames is a Scitex integer that indicates the number of frames used to describe the shape. This value will be in the range of 0 (no frames) to 10.
Hollow indicates that the portion of the shape within its frames is solid (value of 0) or transparent (value of 1).
The following entries are repeated once per NumberOfFrames times:
A rectangle shape is used to draw both rectangles and squares. Rectangle entries may contain frame data. Each rectangle shape has the following, variably sized, format:
typedef struct _PgRectangleEntry
{
BYTE EntryType; /* Type of entry (always 3) */
BYTE ShapeType; /* Type of shape (always 2) */
BYTE NumberOfBlocks; /* Number of 256-bytes blocks used by entry */
BYTE Padding; /* Alignment padding (always 0) */
BYTE RotationAngle[14]; /* Rotation angle of shape */
BYTE ColorOfShape[16]; /* Color of shape */
BYTE EntrySeprBitMask[2]; /* Bit mask of separations for entry */
BYTE HeightOffset[14]; /* Height offset of top left corner from page origin */
BYTE WidthOffset[14]; /* Width offset of top left corner from page origin */
BYTE Height[14]; /* Height of rectangle thickness */
BYTE Width[14]; /* Width of rectangle thickness */
struct _Corners
{
BYTE CornerType; /* Corner type */
BYTE Padding; /* Alignment padding (always 0) */
BYTE CornerHeight[14]; /* Height of corner */
BYTE CornerWidth[14]; /* Width of corner */
} Corners[4];
BYTE NumberOfFrames; /* Number of frames */
BYTE Hollow; /* 1 = transparent, 0 = solid */
struct _Frames
{
BYTE ColorOfFrame[16]; /* Color of frame */
BYTE FrameSeprBitMask[2]; /* Bit mask of separations for frame */
BYTE HeightOfFrame[14]; /* Height of frame */
BYTE WidthOfFrame[14]; /* Width of frame */
} Frames[NumberOfFrames];
} PGRECTANGLEENTRY;
EntryType is the type of data stored in this entry. For shape entries this value is always 3.
ShapeType is the type of shape. For rectangle shapes this value is always 2.
NumberOfBlocks is the number of 256 byte blocks that the data for this entry occupies. If the number of points and frames that describe the rectangle occupy more than 256 bytes (only possible if there are frames, and even a single frame will cause an overflow), the block(s) following this entry shall store the data until all points are defined. The last block will be padded out to an even 256 bytes in size.
Padding is a single byte of alignment padding with the value of 0.
RotationAngle is a Scitex floating point values used to describe the rotation angle of the rectangle shape. The axis of rotation is the at the upper-left corner of the rectangle.
ColorOfShape is color of the rectangle described as a 16-element color separation.
EntrySeprBitMask is the bitmask describing the data stored in the ColorOfShape field. This field has the same format as the SeparationsBitMask field in the PG header.
HeightOffset and WidthOffset are the coordinates of the top-left corner of the rectangle shape. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
Height and Width is the height and width of the rectangle shape. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
Corners is a 4-element array that stores the following fields that describe the four corners of the rectangle shape. The corner data in the array are stored in the order of top-left, top-right, bottom-left, and bottom-right.
CornerType is the style of the corner. Valid values are 0 (regular right angle corner), 1 (straight beveled corner), 2 (convex rounded corner), and 3 (concave corner).
Padding is a single byte of alignment padding with the value of 0.
CornerHeight and CornerWidth are Scitex floating point values that store the height and width of the corner. These values are only useful for CornerType values of 1, 2, and 3.
NumberOfFrames is a Scitex integer that indicates the number of frames used to describe the shape. This value will be in the range of 0 (no frames) to 10.
Hollow indicates that the portion of the shape within its frames is solid (value of 0) or transparent (value of 1).
The following entries are repeated once per NumberOfFrames times:
Continuous Tone (CT) pictures may be placed in a page file as part of the page layout. CT pictures may be displayed on the page directly (the entire CT image is visible), or through a window (only specific area(s) of the CT image is visible). The window (viewable area of the CT image) is defined by either a shape stored as a separate entry in the PG file, or by Line Work (LW) color areas defined in one or more separate LW files used as windows. The LW files are reference by their entry number within the PG file. The LW file entry contains the name of the LW file itself.
The CT picture entry will have one of two header formats depending on whether the CT picture is placed directly or through a window. The header format of a directly placed CT entry is as follows:
typedef struct _ContinuousTonePictureEntryDirect
{
BYTE EntryType; /* Type of entry (1 = no window, 2 = window) */
BYTE Padding; /* Alignment padding (always 0) */
BYTE NameOfPicture[80]; /* Name of picture */
BYTE HeightOffset[14]; /* Height offset of top left corner from page origin */
BYTE WidthOffset[14]; /* Width offset of top left corner from page origin */
BYTE Height[14]; /* Height of picture */
BYTE Width[14]; /* Width of picture */
BYTE RotationAngle[14]; /* Rotation angle of picture */
BYTE Reserved[104]; /* Reserved (always 0) */
} CTPICTUREENTRYDIRECT;
EntryType is the type of data stored in this entry. For directly placed CT picture entries this value is 1. For CT picture entries viewed through a window this value is 2.
Padding is a single byte of alignment padding with the value of 0.
Name is an 80-byte Scitex string that stores the name of the picture.
HeightOffset and WidthOffset are the coordinates of the upper-left corner of the picture on the page. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
Height and Width is the height and width of the picture. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
RotationAngle is a Scitex floating point value used to describe the rotation angle of the picture. The axis of rotation is the upper-left corner of the picture.
The header format of a CT entry placed through a window adds the WindowEntryNumber and TransparentAreas fields:
typedef struct _ContinuousTonePictureEntryDirectWindow
{
BYTE EntryType; /* Type of entry (1 = no window, 2 = window) */
BYTE Padding; /* Alignment padding (always 0) */
BYTE NameOfPicture[80]; /* Name of picture */
BYTE HeightOffset[14]; /* Height offset of top left corner from page origin */
BYTE WidthOffset[14]; /* Width offset of top left corner from page origin */
BYTE Height[14]; /* Height of picture */
BYTE Width[14]; /* Width of picture */
BYTE RotationAngle[14]; /* Rotation angle of picture */
BYTE WindowEntryNumber; /* Entry that contains frame or color areas */
BYTE TransparentAreas[32]; /* Transparent areas of window */
BYTE Reserved[71]; /* Reserved (always 0) */
} CTPICTUREENTRYWINDOW;
WindowEntryNumber contains the number of the entry that contains the shape whose frame is used as a window, or the entry number of the LW entry whose color area(s) are used as windows to the CT file.
TransparentAreas defines the transparent areas of the shape or LW file which is used as a window. If the window is a shape, only one frame can be defined as a window for the CT file. A value of 0 indicates that the inner, unframed area of the shape is the window. A value ranging from 1 to 10 indicates the number of the frame in the shape to use as a window. The remaining 31 elements will be 0 and are not used. If the windows are LW color areas, up to 32 color areas (color table entries) may be defined in this array. Each color area value will be in the range of 1 to 255. Unused array elements are set to 0.
If it is necessary to use more than 32 LW color areas as windows for the same CT file, up to seven more entries can be defined for the CT, each specifying the same LW file to be placed through and up to 32 more color areas to be used as windows. This method allows up to 256 (8 * 32) color areas to be windows for the picture. Different color areas of the LW can be used as windows for different pictures files by adding CT or LW entries for the various picture files with references to the different color areas of the same LW file.
Reserved is a 71-byte field used to pad the CT picture entry out to 256 bytes in length. This field is typically set to 0.
Line Work (LW) pictures may be placed in a page file as part of the page layout. LW pictures may be displayed on the page directly (the entire LW image is visible), or through a window (only specific areas of the LW image are visible). The window (viewable area of the LW image) is defined by either a shape stored as a separate entry in the PG file, or by Line Work (LW) color areas defined in one or more separate LW files used as windows. The LW files are reference by their entry number within the PG file. The entry of the LW file being used contains the name of the LW file itself.
The LW picture entry will have one of two header formats depending on whether the LW picture is placed directly or through a window. The header format of a directly placed LW entry is as follows:
typedef struct _LineWorkPictureEntryDirect
{
BYTE EntryType; /* Type of entry (5 = no window, 6 = window) */
BYTE Padding; /* Alignment padding (always 0) */
BYTE NameOfPicture[80]; /* Name of picture */
BYTE EntrySeprBitMask[2]; /* Bit mask of separations for entry */
BYTE HeightOffset[14]; /* Height offset of top left corner from page origin */
BYTE WidthOffset[14]; /* Width offset of top left corner from page
BYTE Height[14]; /* Height of picture */
BYTE Width[14]; /* Width of picture */
BYTE RotationAngle[14]; /* Rotation angle of picture */
BYTE Reserved[102]; /* Reserved (always 0) */
} LWPICTUREENTRYDIRECT;
EntryType is the type of data stored in this entry. For directly placed LW picture entries this value is 5. For LW picture entries viewed through a window this value is 6.
Padding is a single byte of alignment padding with the value of 0.
Name is an 80-byte Scitex string that stores the name of the picture.
EntrySeprBitMask is the bitmask describing the separation data stored in the file. This field has the same format as the SeparationsBitMask field in the PG header.
HeightOffset and WidthOffset are the coordinates of the upper-left corner of the picture on the page. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
Height and Width are the height and width of the picture respectively. These values are stored in the type of units indicated in the UnitsOfMeasurement field in the PG header.
RotationAngle is a Scitex floating point value used to describe the rotation angle of the picture. The axis of rotation is the upper-left corner of the picture.
Reserved is a 102-byte field used to pad the LW entry out to 256 bytes in length. This field is typically set to 0.
The header format of an LW entry placed through a window adds the WindowEntryNumber and TransparentAreas fields and removes the EntrySeprBitMask field:
typedef struct _LineWorkPictureEntryWindow
{
BYTE EntryType; /* Type of entry (5 = no window, 6 = window) */
BYTE Padding; /* Alignment padding (always 0) */
BYTE NameOfPicture[80]; /* Name of picture */
BYTE HeightOffset[14]; /* Height offset of top left corner from page origin */
BYTE WidthOffset[14]; /* Width offset of top left corner from page origin */
BYTE Height[14]; /* Height of picture */
BYTE Width[14]; /* Width of picture */
BYTE RotationAngle[14]; /* Rotation angle of picture */
BYTE WindowEntryNumber; /* Entry that contains frame or color areas */
BYTE TransparentAreas[32]; /* Transparent areas of window */
BYTE Reserved[71]; /* Reserved (always 0) */
} LWPICTUREENTRYWINDOW;
WindowEntryNumber stores the number of the entry that contains the shape whose frame is used as a window, or the entry number of the LW entry whose color area(s) are used as windows to the LW file.
TransparentAreas defines the transparent areas of the shape or LW file which is used as a window. If the window is a shape, only one frame can be defined as a window for the LW file. A value of 0 indicates that the inner, unframed area of the shape is the window. A value ranging from 1 to 10 indicates the number of the frame in the shape to use as a window. The remaining 31 elements will be 0 and are not used. If the windows are LW color areas, up to 32 color areas (color table entries) may be defined in this array. Each color area value will be in the range of 1 to 255. Unused array elements are set to 0.
If it is necessary to use more than 32 LW color areas as windows for the same LW file, up to seven more entries can be defined for the LW, each specifying the same LW file to placed through and up to 32 more color areas to be used as windows. This method allows up to 256 (8 * 32) color areas to be windows for the picture. Different color areas of the LW can be used as windows for different pictures files by adding CT or LW entries for the various picture files with references to the different color areas of the same LW file.
Reserved is a 71-byte field used to pad the LW entry out to 256 bytes in length. This field is typically set to 0.
Scitex Corporation Ltd. develops, manufactures, markets and integrates electronic prepress systems, including workstations, scanners, printers, digital cameras, network servers, and telecommunication systems.
Scitex is headquartered in Israel and has subsidiaries in the United States, Japan, Europe, the Pacific Rim, Africa, and the Middle East. For a listing of all Scitex offices please consult the Scitex Web page, or make an inquiry via email. Their Web site has up-to-date addresses and phones numbers for major offices worldwide and the ability to have messages and questions routed appropriately.
Email: info@scitex.com
WWW: http://www.scitex.com/
The Scitex formats and protocols are described in the following document:
HandShake Foreign File Transfer Protocol, Scitex Corporation, Ltd., Revision A: April 1988, Document No. 788-37898A, Catalog No. 399Z37898
Copyright © 1996, 1994 O'Reilly & Associates, Inc. All Rights Reserved.