AISFileFormat: CEDAR DEFINITIONS ~ BEGIN bytesPerWord: NAT ~ 2; -- a "word" is 16 bits ("size" values below are in words!) wordsPerPage: NAT ~ 1024; -- a "page" is 1024 "words" nil: CARDINAL ~ 177777B; -- commonly used for a nil value passwordValue: CARDINAL ~ LOOPHOLE[-31574]; AttributeHeader: TYPE ~ MACHINE DEPENDENT RECORD[ password(0:0..15): CARDINAL, -- password, must equal passwordValue length(1:0..15): CARDINAL -- length in words of attribute part, including this header ]; sizeAttributeHeader: NAT ~ SIZE[AttributeHeader]; PartHeader: TYPE ~ MACHINE DEPENDENT RECORD[ type(0:0..5): PartType, -- type of attribute part length(0:6..15): [0..1777B] -- length in words, including this one ]; sizePartHeader: NAT ~ SIZE[PartHeader]; PartType: TYPE ~ MACHINE DEPENDENT { nil(0), -- no more parts raster(1), -- RasterPart follows placement(2), -- PlacementPart follows photometry(3), -- PhotometryPart follows comment(4), -- CommentPart follows (77B) }; RasterPart: TYPE ~ MACHINE DEPENDENT RECORD[ scanCount(0:0..15): CARDINAL, -- number of scan lines scanLength(1:0..15): CARDINAL, -- pixels per scan line scanDirection(2:0..15): ScanDirection, -- scanning directions samplesPerPixel(3:0..15): CARDINAL, -- number of samples codingType(4:0..15): CodingType -- method of coding ]; sizeRasterPart: NAT ~ SIZE[RasterPart]; ScanDirection: TYPE ~ CARDINAL; CodingType: TYPE ~ MACHINE DEPENDENT { nil(0), -- undefined uca(1), -- UCACoding folllows (177777B) }; UCACoding: TYPE ~ MACHINE DEPENDENT RECORD[ -- UnCompressedArray bitsPerSample(0:0..15): CARDINAL, -- number of bits for each sample wordsPerScanLine(1:0..15): CARDINAL, -- number of 16-bit words per scan line scanLinesPerBlock(2:0..15): CARDINAL, -- scan lines in each block, nil if no blocks paddingPerBlock(3:0..15): CARDINAL -- words of padding at end of block, nil if no blocks ]; sizeUCACoding: NAT ~ SIZE[UCACoding]; PlacementPart: TYPE ~ MACHINE DEPENDENT RECORD[ xLeft(0:0..15): INTEGER, -- position of lower left corner yBottom(1:0..15): INTEGER, xWidth(2:0..15): INTEGER, -- size of image area on page yHeight(3:0..15): INTEGER ]; sizePlacementPart: NAT ~ SIZE[PlacementPart]; PhotometryPart: TYPE ~ MACHINE DEPENDENT RECORD[ signal(0:0..15): SignalType _ bw, -- what type of signal is sampled sense(1:0..15): CARDINAL _ 0, -- larger sample values are lighter if sense=0, else darker scale(2:0..15): ScaleType _ nil, -- specifies the conversion between physical and sample values scaleA(3:0..31), scaleB(5:0..31), scaleC(7:0..31): Value _ [0, 0], spotType(9:0..15): SpotType _ nil, -- spot type spotWidth(10:0..15): CARDINAL _ nil, -- in units of 100*(width in pixels) spotLength(11:0..15): CARDINAL _ nil, -- in units of 100*(length in scanlines) sampleMin(12:0..15): INTEGER _ -1, -- sample range, if known sampleMax(13:0..15): INTEGER _ -1, histogramLength(14:0..15): CARDINAL _ 0 -- number of words in histogram, nil if no histogram ]; sizePhotometryPart: NAT ~ SIZE[PhotometryPart]; SignalType: TYPE ~ MACHINE DEPENDENT { bw(0), -- black and white red(1), -- red separation blue(2), -- blue separation green(3), -- green separation cyan(4), -- cyan separation magenta(5), -- magenta separation yellow(6), -- yellow separation x(7), -- x signal (CIE) y(8), -- y signal RGB(100), -- red, green, blue samples, 3 per pixel CMY(101), -- cyan, magenta, yellow samples, 3 per pixel CMYB(102), -- cyan, magenta, yellow, black samples, 4 per pixel Yxy(103), -- Y, x, y (CIE) samples, 3 per pixel comments(177776B), -- specified in comments undefined(177777B) -- undefined }; ScaleType: TYPE ~ MACHINE DEPENDENT { nil(0), -- undefined reflectance(1), -- reflectance or transmittance density(2), -- optical density comments(177776B), -- specified in comments undefined(177777B) -- undefined }; Value: TYPE ~ MACHINE DEPENDENT RECORD[ sample(0:0..15): INTEGER, -- 1000*(actual reflectance or density) level(1:0..15): CARDINAL -- corresponding digital sample value ]; SpotType: TYPE ~ MACHINE DEPENDENT { nil(0), -- undefined rectangular(1), -- spotWidth by spotLength circular(2), -- diameter=spotWidth, spotLength is undefined comments(177776B), -- specified in comments undefined(177777B) -- undefined }; histogramScale: INTEGER ~ 32767; CommentPart: TYPE ~ BCPLStringBody; sizeCommentPart: NAT ~ SIZE[CommentPart]; -- maximum BCPLStringBody: TYPE ~ PACKED ARRAY[0..256) OF CHAR; END. ÆAISFileFormat.mesa Copyright c 1984, Xerox Corporation. All rights reserved. Doug Wyatt, October 23, 1984 5:36:28 pm PDT -- length must be a multiple of wordsPerPage There may not be universal agreement on the interpretation of this value. The AIS documentation disagrees with (at least some versions of) AISFile.d. Fortunately, the two most commonly used values are unambiguous: 3 => pixels go toward the right of the page, scan lines toward the bottom 0, 8 => pixels go toward the top of the page, scan lines toward the right -- if there are blocks, wordsPerBlock = wordsPerScanLine*scanLinesPerBlock+paddingPerBlock If s is a POINTER TO BCPLStringBody, length is ORD[s[0]], text is s[1..length] ÊP˜šœ™Jšœ Ïmœ/™:Jšœ+™+—J˜JšœÏkœž ˜ Jšœž˜J˜JšœžœÏc:˜QJšœžœ Ÿ˜5J˜Jšœžœ Ÿ ˜9J˜Jšœžœžœ ˜+J˜š œžœžœž œžœ˜1JšœžœŸ%˜BJšœžœŸ;˜UJšœ,™,J˜—Jšœžœžœ˜1J˜š œ žœžœž œžœ˜,JšœŸ˜1JšœŸ&˜BJ˜—Jšœžœžœ ˜'J™šœ žœžœž œ˜$JšœŸ˜Jšœ Ÿ˜ JšœŸ˜&JšœŸ˜(Jšœ Ÿ˜"J˜J˜—J˜š œ žœžœž œžœ˜,JšœžœŸ˜5JšœžœŸ˜6Jšœ'Ÿ˜=JšœžœŸ˜8Jšœ Ÿ˜3J˜—Jšœžœžœ ˜'J™šœžœžœ˜™×J™IJ™I——J˜šœ žœžœž œ˜&JšœŸ ˜JšœŸ˜J˜ J˜—J˜š œ žœžœž œžœŸ˜@JšœžœŸ!˜CJšœžœŸ'˜LJšœžœŸ-˜SJšœžœŸ5˜XJšœZ™ZJ˜—Jšœžœžœ ˜%J˜š œžœžœž œžœ˜/JšœžœŸ ˜9Jšœžœ˜JšœžœŸ˜7Jšœž˜J˜—Jšœžœžœ˜-J˜š œžœžœž œžœ˜0Jšœ"Ÿ!˜CJšœžœŸ;˜YJšœ!Ÿ>˜_JšœB˜BJšœ#Ÿ ˜/JšœžœŸ$˜IJšœžœŸ(˜NJšœžœŸ˜J˜—J˜šœ žœžœž œ˜$JšœŸ ˜JšœŸ˜*Jšœ Ÿ.˜;JšœŸ˜+JšœŸ ˜J˜—J˜Jšœžœ ˜ J˜Jšœ žœ˜#JšœžœžœŸ ˜4J˜š œžœžœžœ žœžœ˜4Jšœ žœžœžœ™N—J˜Jšžœ˜—…—,