home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / xieproto.txt < prev    next >
Text File  |  2001-06-27  |  292KB  |  6,615 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. X Image Extension Protocol
  8.  
  9.  
  10.  
  11.  
  12. Publication Description:
  13.  
  14. This document describes the protocol of the X WINDOW SYSTEM IMAGE EXTENSION.
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. Version 5.02
  30.  
  31. X Consortium Standard
  32.  
  33. X Version 11, Release 6.3
  34.  
  35. December 16, 1996
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. Copyright ⌐ 1988, 1989, 1990, 1991, 1992  Digital Equipment Corporation
  67.  
  68. Copyright ⌐ 1990, 1991, 1992, 1993, 1994  X Consortium, Inc.
  69.  
  70. Copyright ⌐ 1992, 1993, 1994  AGE Logic, Inc.
  71.  
  72.  
  73. Permission to use, copy, modify, distribute, and sell this documentation for any purpose
  74. is hereby granted without fee, provided that the above copyright notices and this permis-
  75. sion notice appear in all copies. Digital, the X Consortium, and AGE Logic make no
  76. representations about the suitability for any purpose of the information in this document.
  77. This documentation is provided as is without express or implied warranty.
  78.  
  79.  
  80.  
  81. Contents
  82. Contents        iii
  83. Preface x
  84. Related Documents       x
  85. Participants    xi
  86. Authors:        xi
  87. Contributors:   xi
  88. Revision History        xi
  89. Organization    xii
  90. Introduction    xii
  91. Protocol Parameter Types and Syntax     xii
  92. Protocol Requests and Replies   xii
  93. Pipeline Elements       xii
  94. Events and Errors       xii
  95. Techniques      xii
  96. Service Classes xii
  97. Protocol Encodings      xii
  98. Acknowledgments xiii
  99. Introduction    1-1
  100. Scope and Purpose       1-1
  101. Terminology     1-1
  102. Techniques      1-1
  103. Service Classes 1-1
  104. Specification Syntax    2-1
  105. General Syntax  2-1
  106. Request Syntax  2-2
  107. Requests without a Reply:       2-2
  108. Requests with a Reply:  2-2
  109. Syntax of Photo Elements        2-3
  110. Photo Elements: 2-3
  111. Syntax of Events        2-4
  112. Events generated by Photo Elements:     2-4
  113. Syntax of Errors        2-4
  114. Core X errors   2-4
  115. XIE non-Photoflo errors:        2-4
  116. XIE Photoflo related errors:    2-4
  117. Syntax of Protocol Encodings    2-5
  118. Requests        2-5
  119. Replies 2-5
  120. PhotoElements   2-5
  121. Events  2-6
  122. Errors  2-6
  123. Parameter Types 3-1
  124. XIE and Core X Types    3-1
  125. Techniques      3-1
  126. Definitions     3-2
  127. XieTypAlignment 3-2
  128. XieTypArithmeticOp      3-2
  129. XieTypColorAllocTechnique       3-3
  130. XieTypColorList 3-3
  131. XieTypCompareOp 3-3
  132. XieTypConstant  3-4
  133. XieTypConstrainTechnique        3-5
  134. XieTypConvertFromRGBTechnique   3-5
  135. XieTypConvertToRGBTechnique     3-5
  136. XieTypConvolveTechnique 3-6
  137. XieTypDataClass 3-6
  138. XieTypDataStream        3-6
  139. XieTypDataType  3-6
  140. XieTypDecodeTechnique   3-7
  141. XieTypDitherTechnique   3-7
  142. XieTypEncodeTechnique   3-8
  143. XieTypExecutable        3-8
  144. XieTypExportNotify      3-9
  145. XieTypExportState       3-9
  146. XieTypFloat     3-9
  147. XieTypGamutTechnique    3-10
  148. XieTypGeometryTechnique 3-10
  149. XieTypHistogramData     3-11
  150. XieTypHistogramShape    3-11
  151. XieTypInterleave        3-11
  152. XieTypLevels    3-12
  153. XieTypLUT       3-12
  154. XieTypMathOp    3-12
  155. XieTypMatrix    3-12
  156. XieTypOrientation       3-13
  157. XieTypPhotoElement      3-14
  158. XieTypPhotoflo  3-14
  159. XieTypPhotofloOutcome   3-14
  160. XieTypPhotofloState     3-15
  161. XieTypPhotomap  3-15
  162. XieTypPhotospace        3-15
  163. XieTypPhototag  3-15
  164. XieTypProcessDomain     3-16
  165. XieTypRectangle 3-16
  166. XieTypROI       3-16
  167. XieTypServiceClass      3-17
  168. XieTypTechniqueGroup    3-17
  169. XieTypTechniqueRec      3-18
  170. XieTypTile      3-18
  171. XieTypTripletoftype     3-18
  172. XieTypWhiteAdjustTechnique      3-19
  173. Resources       4-1
  174. Overview        4-1
  175. Binding Resources to Photoflos  4-1
  176. ColorList resources     4-1
  177. LUT, Photomap, and ROI resources        4-1
  178. Resource destruction    4-2
  179. Synchronizing resource access   4-2
  180. Capability Acquisition  4-3
  181. QueryImageExtension     4-3
  182. Technique Acquisition   4-4
  183. QueryTechniques 4-4
  184. ColorList       4-5
  185. CreateColorList 4-5
  186. DestroyColorList        4-5
  187. PurgeColorList  4-6
  188. QueryColorList  4-6
  189. LUT     4-7
  190. CreateLUT       4-7
  191. DestroyLUT      4-7
  192. Photomap        4-8
  193. CreatePhotomap  4-8
  194. DestroyPhotomap 4-8
  195. QueryPhotomap   4-9
  196. ROI     4-10
  197. CreateROI       4-10
  198. DestroyROI      4-10
  199. Pipelined Processing    5-1
  200. What is a Photoflo?     5-1
  201. Two kinds of Photoflos  5-2
  202. Multi-client Photoflos  5-2
  203. Photoflo States 5-3
  204. Flo'ing Data to a Resource      5-3
  205. Name space      5-4
  206. CreatePhotospace        5-4
  207. DestroyPhotospace       5-4
  208. Immediate Photoflos     5-5
  209. ExecuteImmediate        5-5
  210. Stored Photoflos        5-6
  211. CreatePhotoflo  5-6
  212. DestroyPhotoflo 5-6
  213. ExecutePhotoflo 5-7
  214. ModifyPhotoflo  5-8
  215. RedefinePhotoflo        5-8
  216. Sending Data to the Server      5-9
  217. PutClientData   5-9
  218. Retrieving Data from the Server 5-10
  219. GetClientData   5-10
  220. Status  5-11
  221. QueryPhotoflo   5-11
  222. Synchronization 5-12
  223. Await   5-12
  224. Termination     5-12
  225. Abort   5-12
  226. Import Elements 6-1
  227. Overview        6-1
  228. Element categories      6-1
  229. Multi-source images     6-1
  230. Events generated        6-1
  231. Import from Client      6-1
  232. ImportClientLUT 6-2
  233. ImportClientPhoto       6-3
  234. ImportClientROI 6-4
  235. Import from Resource    6-5
  236. ImportDrawable  6-5
  237. ImportDrawablePlane     6-6
  238. ImportLUT       6-7
  239. ImportPhotomap  6-8
  240. ImportROI       6-9
  241. Process Elements        7-1
  242. Overview        7-1
  243. Limiting the Process    7-1
  244. Process Selected Bands  7-1
  245. Process Intersecting Pixels     7-1
  246. Process Selected Pixels 7-2
  247. Data Types      7-2
  248. Process Categories      7-3
  249. Process Definitions     7-3
  250. Arithmetic      7-4
  251. BandCombine     7-5
  252. BandExtract     7-6
  253. BandSelect      7-7
  254. Blend   7-8
  255. Compare 7-9
  256. Constrain       7-11
  257. ConvertFromIndex        7-12
  258. ConvertFromRGB  7-13
  259. ConvertToIndex  7-14
  260. ConvertToRGB    7-15
  261. Convolve        7-16
  262. Dither  7-17
  263. Geometry        7-18
  264. Logical 7-20
  265. MatchHistogram  7-22
  266. Math    7-23
  267. PasteUp 7-24
  268. Point   7-25
  269. Unconstrain     7-26
  270. Export Elements 8-1
  271. Element categories      8-1
  272. Export to Client        8-1
  273. Events generated        8-1
  274. ExportClientHistogram   8-2
  275. ExportClientLUT 8-3
  276. ExportClientPhoto       8-4
  277. ExportClientROI 8-5
  278. Export to Resource      8-6
  279. ExportDrawable  8-6
  280. ExportDrawablePlane     8-7
  281. ExportLUT       8-8
  282. ExportPhotomap  8-9
  283. ExportROI       8-10
  284. Events and Errors       9-1
  285. Events  9-1
  286. ColorAlloc      9-1
  287. DecodeNotify    9-2
  288. ExportAvailable 9-2
  289. ImportObscured  9-3
  290. PhotofloDone    9-3
  291. Resource Errors 9-4
  292. Photoflo errors 9-5
  293. Techniques      A-1
  294. Standard and Private Techniques A-1
  295. Technique numbers       A-1
  296. Technique names A-1
  297. Default Techniques      A-2
  298. Technique parameters    A-2
  299. Technique information   A-2
  300. Color Allocation Techniques     A-3
  301. Constrain Techniques    A-4
  302. Convert From RGB        A-5
  303. Convert To RGB  A-6
  304. Convolution Edge Techniques     A-8
  305. Decode Techniques       A-9
  306. Dithering Techniques    A-13
  307. Encode Techniques       A-14
  308. Gamut Compression Techniques    A-18
  309. Geometry Techniques     A-19
  310. Histogram Shapes        A-27
  311. White Point Adjustment Techniques       A-28
  312. Service Class   B-1
  313. Full    B-1
  314. DIS     B-1
  315. Service Class Summary   B-2
  316. Protocol Encodings      C-1
  317. Extension Name  C-1
  318. Types   C-1
  319. Requests and Replies    C-9
  320. Import Elements C-15
  321. Process Elements        C-17
  322. Export Elements C-22
  323. Technique Parameters    C-24
  324. Events  C-32
  325. Errors  C-34
  326. Figures and Tables
  327. Figure 1-1   Service Classes defined in this document   1-2
  328. Figure 4-1   Creating and populating a new Photomap     4-1
  329. Figure 4-2   Process image from Photomap a, place result into Photomap b        4-2
  330. Figure 4-3   Process image from Photomap a "in-place\   4-2
  331. Figure 5-1   Photoflo element input and output connections      5-1
  332. Figure 5-2   Example Photoflo   5-2
  333. Figure 5-3   Photoflo states    5-3
  334. Figure 7-1   Combining two sources using a control plane  Logical:  NoOp        7-2
  335. Figure 7-2   A sample geometric transform: crop and scale       7-18
  336. Figure 7-3   Background fill used for pixels beyond the edge    7-19
  337. Figure 7-4   Point's algorithm for computing combined LUT indices       7-25
  338. Figure A-1   Diagram of the ErrorDiffusion algorithm    A-13
  339. Figure A-2   Effect of sampling technique when scaling to a lower pixel density A-20
  340. Figure A-3   Illustration of an output pixel mapping back to the input image    A-21
  341. Figure A-4   Sequence producing an antialiased image using a low-pass filter    A-22
  342. Figure B-1   DIS sources, operators, and destinations   B-1
  343.  
  344. Table 3-1   Technique naming and numbering conventions  3-1
  345. Table 3-2   Treatment of floating point parameters passed through the protocol  3-4
  346. Table 5-1   Examples of two element Photoflo usage      5-3
  347. Table 6-1   Relationship between LUT class and image class      6-2
  348. Table 7-1   Compare parameter and DataClass dependencies        7-9
  349. Table 9-1   XIE Error codes     9-4
  350. Table 9-2   Photoflo error subcodes     9-5
  351. Table B-1   Types itemized by ServiceClass      B-2
  352. Table B-2   Techniques itemized by ServiceClass B-4
  353. Table B-3   Requests itemized by ServiceClass   B-5
  354. Table B-4   Import elements itemized by ServiceClass    B-6
  355. Table B-5   Process elements itemized by ServiceClass   B-6
  356. Table B-6   Export elements itemized by ServiceClass    B-6
  357. Table B-7   Events itemized by ServiceClass     B-7
  358. Table B-8   Errors itemized by ServiceClass     B-7
  359.  
  360.  
  361.  
  362. Preface
  363. The X architecture was a major step towards defining open, interactive application display services. X
  364. pried apart the tightly coupled, private interconnect that has existed between application and display
  365. subsystem by specifying a minimal, structured service set.
  366. To retain a consistent, minimal core service set and yet accommodate evolving application require-
  367. ments, X provides a method for extending the core protocol with additional domain specific requests.
  368. This document defines an X extension for the imaging domain.  It is the fifth version of the X Image
  369. Extension Protocol proposal and, as prior readers will immediately recognize, it is a lineal descendent
  370. of the other four.
  371. Because the purpose of this document is to provide a clear, concise articulation of the protocol, ex-
  372. pository materials have been pared to a bare minimum.  It is assumed that the reader has a measure of
  373. conceptual knowledge about imaging.
  374. Readers who lack familiarity with the X Window System are encouraged to begin with a selection
  375. from the related documents given below.
  376. Related Documents
  377.   X Window System (Scheifler & Gettys)
  378. The complete reference to Xlib, X protocol (and extension conventions), ICCCM, XLFD.
  379. Digital Press
  380.   X Protocol Reference Manual (Nye, editor)
  381. The Definitive Guides to the X Window System, Volume 0.
  382. OReilly & Associates, Inc.
  383.   The X Window System Server (Israel & Fortune)
  384. Guide to the X sample server: architecture, porting and tuning, writing extensions.
  385. Digital Press
  386.   XIE Sample Implementation Architecture (Shelley, Verheiden & Fahy)
  387. An overview of the architecture of the XIE sample implementation.
  388. AGE Logic, Inc.
  389.   XIElib Specification (Rogers)
  390. Reference pages for the XIE client library functions.
  391. AGE Logic, Inc.
  392.  
  393. Participants
  394. Authors:
  395. Robert NC Shelley       Digital Equipment Corporation
  396. Robert W. Scheifler     X Consortium, Inc.
  397. Ben Fahy        Visionary Software, Inc.
  398. Jim Fulton      Network Computing Devices, Inc.
  399. Keith Packard   Network Computing Devices, Inc.
  400. Joe Mauro       Digital Equipment Corporation
  401. Richard Hennessy        Avid Technology, Inc.
  402. Tom Vaughan     Digital Equipment Corporation
  403. Contributors:
  404. Gary Grebus     Digital Equipment Corporation
  405. Larry Hare      NetManage, Inc.
  406. Peter Kaczowka  Hewlett-Packard Co.
  407. Jeffrey Siegal  Congruent Corporation
  408. Al Tabayoyon    North Valley Research, Inc.
  409. John Weber      Big Time Software, Inc.
  410. Revision History
  411. rev v1.0        August 1, 1988 first protocol draft
  412. rev v2.0        April 12, 1989 major changes based upon consortia review
  413. rev v2.1        November 1, 1989 changes based upon FT1 implementation
  414. rev v2.2        March 15, 1990 changes based upon FT2 implementation (pipes)
  415. rev v3.0        October 1, 1990 changes in preparation for consortia review
  416. rev v4.0        June 1, 1991 changes based upon consortia technical review
  417. rev v4.08       May 29, 1992 preliminary imagework review copy
  418. rev v4.09       June 9, 1992 imagework review copy for meeting at San Jose
  419. rev v4.10       September 10, 1992 pre-review of encodings and contributions
  420. rev v4.11       October 31, 1992 imagework review with initial definition of DIS
  421. rev v4.12       December 23, 1992 initial Public Review copy
  422. rev v4.13       May 19, 1993 changes made during Alpha phase of sample implementation
  423. rev v4.14       October 20, 1993 changes made during Beta phase of sample implementation
  424. rev v4.15       December 15, 1993 changes made prior to final release of sample implementation
  425. rev V5.0        January 10, 1994 final draft
  426. rev V5.0        April 18, 1994 cosmetic cleanup prior to releasing X11 R6
  427. rev v5.01       July 5,1996 incorporate Digital Press edits
  428. rev v5.02       December 16, 1996, incorporate additional Digital Press edits and X11 R6.3
  429.  
  430. Organization
  431. This document is organized into the following chapters and appendices:
  432. Introduction
  433. Chapter 1       Explains the purpose of the X Image Extension (XIE).
  434. Protocol Parameter Types and Syntax
  435. Chapter 2       Defines protocol syntax (how the protocol is encoded on the wire).
  436. Chapter 3       Defines types for protocol parameters.
  437. Protocol Requests and Replies
  438. Chapter 4       Describes the resources used by the XIE  protocol and library.
  439. Chapter 5       Describes pipelines, client data transport, and pipeline utility requests.
  440. Pipeline Elements
  441. Chapter 6       Describes pipeline elements used for data import.
  442. Chapter 7       Describes the general processing elements used in pipelines.
  443. Chapter 8       Describes pipeline elements used for data export.
  444. Events and Errors
  445. Chapter 9       Describes events and errors returned from XIE.
  446. Techniques
  447. Appendix A      Describes the XIE standard techniques and their parameters.
  448. Service Classes
  449. Appendix B      Summarizes required, optional, and excluded items for each XIE service class.
  450. Protocol Encodings
  451. Appendix C      Provides the complete protocol encoding for all XIE: types, requests, replies, ele-
  452. ments, techniques, events, and errors.
  453.  
  454. Acknowledgments
  455. We are all indebted to Digital Equipment Corporation where the X Image Extension was originally
  456. conceived.  They persevered through numerous protocol reviews and revisions and provided the ini-
  457. tial sample implementations.  Their efforts contributed greatly towards promoting XIE into the Public
  458. Review process.
  459. This document evolved from original specifications authored by Joe Mauro.  We hope that it still
  460. shows some of his architectural strength and elegance.  The majority of the current document
  461. (through version 4.11) was authored by Bob Shelley while employed at Digital.  Subsequent revisions
  462. were made at AGE Logic.
  463. The current view of pipelines emerged almost completely intact from a single, terse email message
  464. from Bob Scheifler and Keith Packard.
  465. The need for robust geometric transforms was first promoted by Ben Fahy.  We are grateful that he
  466. has provided us with detailed documentation for the basic geometry element and several retrospective
  467. sampling algorithms.
  468. While one could debate that XIE is too big or too small, we can thank Jim Fulton for spearheading
  469. the effort to define a smaller gentler XIE, the Document Imaging Subset.
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493. almost blank
  494.  
  495.  
  496.  
  497.  
  498.  
  499. xiv
  500.  
  501.  
  502.  
  503. 1
  504. Introduction
  505. Scope and Purpose
  506. This document specifies the X wire protocol for the X Image Extension (XIE).  It defines the syntax,
  507. structure, and semantics of XIE protocol elements.  It does not contain background material on im-
  508. aging concepts that the protocol extension enables, nor does it contain any language specific bindings.
  509. Terminology
  510. This specification contains a certain amount of descriptive terminology that is commonly used within
  511. the image processing community.  There is also parametric terminology that is used to describe the
  512. parameter types recognized by the core X protocol and the image extension protocol.  The image ex-
  513. tension protocol types are defined in this document.
  514. Techniques
  515. For some XIE operations, there are several recognized algorithms or techniques that offer varying
  516. tradeoffs between quality of results and performance.  Also, in some cases, different techniques are
  517. required due to an image's class or content.  To accommodate some flexibility in this area, such XIE
  518. operations accept a technique parameter.  A description of the techniques specified in this document
  519. can be found in Appendix A.  Individual implementations may extend XIE's capabilities by providing
  520. additional techniques to provide for particular market needs.
  521. Service Classes
  522. For some environments, such as simple document image viewing, the full set of services provided by
  523. XIE may include features that are not needed by the target applications. In such situations
  524. (particularly for entry-level monochrome displays), server implementors may wish to provide only a
  525. subset of the full XIE protocol.
  526. Subsets are arranged in a nested hierarchy of service classes.  Each service class includes all of the
  527. features of any subsets that it surrounds (similar to the layers of an onion).  Thus, applications written
  528. to use a given subset of the protocol will function correctly when running on servers that implement
  529. an enveloping service class.
  530.  
  531. This version of the XIE protocol defines two class: the full protocol (Full), and a document imaging
  532. subset (DIS).  Future versions of the XIE protocol may define additional service classes.
  533.  
  534. Figure 1-1   Service Classes defined in this document
  535. For a complete list of types, techniques, protocol requests, pipeline elements, events, and errors that
  536. are included in DIS,  see Appendix B.
  537.  
  538. Introduction   1-1
  539.  
  540.  
  541. 2
  542. Specification Syntax
  543. This section presents syntactic conventions that are adhered to throughout this specification.
  544. General Syntax
  545. In general, the extension package follows the X11 protocol syntax conventions. Additions to this
  546. syntax are as follows:
  547. *       The syntax ( . . . ) encloses a set of alternative values.
  548. *       The syntax [ . . . ] encloses a set of structure components.
  549. *       Within definitions the following prefixes are used:
  550.         XieReq: Protocol request/reply  (for example,  XieReqCreatePhotoflo)
  551.         XieFlo: Photoflo element        (for example,  XieFloConvolve)
  552.         XieEvn: Protocol event  (for example,  XieEvnPhotofloDone)
  553.         XieErr: Protocol error  (for example,  XieErrPhotospace)
  554.         XieTyp: Protocol type   (for example,  XieTypProcessDomain)
  555.         XieVal: Alternative value       (for example, XieValBandByPixel)
  556. *       Outside of definitions the prefixes are generally not used:
  557.         Alternative values are italicized and bold      (for example,  BandByPixel)
  558.         All others are capitalized and bold     (for example,  CreatePhotoflo)
  559. *       Core X types are displayed in upper-case        (for example, COLORMAP, WINDOW)
  560.  
  561. Request Syntax
  562. Requests without a Reply:
  563. XieReqRequestName
  564. arg-1: type-1           1st argument for RequestName
  565.  . . .
  566. arg-N: type-N   N-th argument for RequestName
  567. Errors: none or list of errors specific to RequestName (for example,  FloID)
  568. Events: none or list of events generated by RequestName (for example, PhotofloDone)
  569. Overview        Describes the basic function of the request.
  570. Parameters      Lists the parameters and gives a brief description of each.
  571. Semantics       Interrelationships between input data, parameters, and output results.
  572. Errors  Table of errors that can be generated and their causes,  for example:
  573. Error   Cause
  574. error-1 Circumstances that generate error-1
  575. . . .
  576. error-N Circumstances that generate error-N
  577. Requests with a Reply:
  578. XieReqRequestName
  579. arg-1: type-1           1st argument for RequestName
  580.  . . .
  581. arg-N: type-N   N-th argument for RequestName
  582. *
  583. result-1: type-1        1st reply result from RequestName
  584.  . . .
  585. result-M: type-M        M-th reply result from RequestName
  586. Errors: none or list of errors specific to RequestName (for example,  Photomap)
  587. Events: none or list of events generated by RequestName (for example,  EventName)
  588. Overview        Describes the basic function of the request.
  589. Parameters      Lists the parameters and gives a brief description of each.
  590. Reply data      Lists the parameters and gives a brief description of each.
  591. Semantics       Interrelationships between input data, parameters, and output results.
  592. Errors  Table of errors that can be generated and their causes, for example:
  593. Error   Cause
  594. error-1 Circumstances that generate error-1
  595. . . .
  596. error-N Circumstances that generate error-N
  597. Syntax of Photo Elements
  598. PhotoElements occur within XIE pipelines (see following chapters for clarification).  The syntax of
  599. these elements is as follows:
  600. Photo Elements:
  601. XieFloElementName
  602. src-1: src-type-1       1st source for ElementName (if required)
  603.  . . .
  604. src-N: src-type-N       N-th source for ElementName (if required)
  605. param-1: param-type-1   1st parameter for ElementName
  606.  . . .
  607. param-M: param-type-M   M-th parameter for ElementName
  608. Errors: none or list of errors specific to ElementName (for example,  FloAlloc)
  609. Events: none or list of events generated by ElementName (for example,  ExportAvail
  610.         able)
  611. Attributes      Table of PhotoElement output attributes, for example:
  612. Attribute       Value
  613. class   DataClass of output data
  614.                 SingleBand      achromatic or index
  615.                 TripleBand      trichromatic
  616. type    DataType:
  617.                 Constrained     quantization levels is levels (integer data)
  618.                 Unconstrained   quantization levels is unknown (may be float data)
  619. width   Width  of output data (in pixels per band)
  620. height  Height of output data (in pixels per band)
  621. levels  Depends on type:
  622.                 Constrained     number of quantization levels (per band)
  623.                 Unconstrained   unknown
  624. Overview        Describes the basic function of the photo element.
  625. Parameters      Lists the parameters and gives a brief description of each.
  626. Semantics       Interrelationships between input data, parameters, and output results.
  627. Errors  Table of errors that can be generated and their causes, for example:
  628. Error   Cause
  629. error-1 Circumstances that generate error-1
  630. . . .
  631. error-N Circumstances that generate error-N
  632.  
  633. Syntax of Events
  634. Events generated by Photo Elements:
  635. XieEvnEventName
  636. instance: XieTypExecutable      < Photoflo instance generating EventName >
  637. phototag: XieTypPhototag        < event Phototag (0 for general Photoflo event) >
  638. type: CARD16            < element type (0 for general Photoflo
  639. event) >
  640. value-1: type-1 < 1st value returned by EventName >
  641.  . . .
  642. value-N: type-N < N-th value returned by EventName >
  643. Overview        Description of the event.
  644. Values returned Description of the values returned.
  645. Syntax of Errors
  646. Errors can be associated with core X11 resources or XIE resources.  In the case of XIE specific error
  647. conditions, a distinction is made between errors related to a Photoflo and those that are not.
  648. Core X errors
  649. Normal X errors (with XIE major/minor opcodes) are used where appropriate (for example,  Alloc).
  650. XIE non-Photoflo errors:
  651. XieErrName
  652. xie-error: XieErrName           < error code of Name, offset from first-error >
  653. resource-id: XID                < resource to blame, for example, Photomap >
  654. detail                  < 21 bytes available for additional error detail >
  655. Overview        Description of the error.
  656. Values returned Description of the values returned.
  657. XIE Photoflo related errors:
  658. XieErrFloName
  659. flo-error: XieErrName           < error code for Flo, offset from first-error >
  660. flo-id:CARD32           < executable flo-id>
  661. flo-code: XieErrFloName < specific error type >
  662. name-space: CARD32              < executable name-space>
  663. phototag: CARD16                < erring Phototag (0 for general Photoflo error) >
  664. type: CARD16            < element type (0 for general Photoflo er-
  665. ror) >
  666. detail                  < 12 bytes available for additional error detail >
  667.  
  668. Overview        Description of the error.
  669. Values returned Description of the values returned.
  670. Syntax of Protocol Encodings
  671. Requests
  672. # of Bytes      Value   Description
  673. 1       CARD8   XIE major opcode
  674. 1       CARD8   XIE minor opcode
  675. 2       CARD16  Request length (total bytes divided by 4)
  676. N               Parameters required by the minor opcode
  677. < 4             Pad (if required)
  678. Requests consist of four (4) bytes of header followed by zero (0) or more additional bytes of data.  If
  679. additional bytes of data are needed the entire request is padded to a multiple of four (4) bytes.  The
  680. common fields (major/minor opcode and length) are not included in XieReq request definitions.
  681. Bytes not used by a specific minor opcode are not guaranteed to be zero.
  682. Replies
  683. # of Bytes      Value   Description
  684. 1       1       Reply
  685. 1               Available for reply data
  686. 2       CARD16  Sequence number of corresponding request
  687. 4       CARD32  Reply length (extra data bytes divided by 4)
  688. 24              Available for reply data
  689. N               Extra data beyond standard reply packet
  690. < 4             Pad (if required)
  691. Replies consist of thirty-two (32) bytes followed by zero (0) or more extra bytes of data.  If extra bytes
  692. of data are needed the entire reply is padded to a multiple of four (4) bytes.  The common fields
  693. (Reply, sequence number, and length) are not included in XieReq reply definitions.  Bytes not used by
  694. the reply from a specific request are not guaranteed to be zero.
  695. PhotoElements
  696. # of Bytes      Value   Description
  697. 2       CARD16  Element type
  698. 2       CARD16  Element length (bytes divided by 4)
  699. multiple of 2   XieTyp(Phototag|Tile)   Element's data source(s) (if required)
  700. N               Parameters as required by element type
  701. < 4             Pad (if required)
  702. A photo element consists of four (4) bytes of header followed by zero (0) or more bytes of element in-
  703. put connection definitions and by zero (0) or more bytes or additional data.  The entire element defi-
  704. nition is padded to a multiple of four (4) bytes.  The common fields (element type and element length)
  705. are not included in XieFlo element definitions.  Bytes not used by a specific element type are not
  706. guaranteed to be zero.
  707. Note: PhotoElements are not protocol requests but, rather, subpackets within another protocol request (that is, ExecuteImmediate,
  708. CreatePhotoflo, ModifyPhotoflo, or RedefinePhotoflo).
  709. Events
  710. # of Bytes      Value   Description
  711. 1       CARD8   XIE event code
  712. 1       <varies>        <event-specific>
  713. 2       CARD16  Sequence number
  714. 4       TIMESTAMP       Time
  715. 24      <varies>        <event-specific>
  716. Events consist of thirty-two (32) bytes.  The common fields (event code, sequence number, and time)
  717. are not included in XieEvn definitions.  Bytes not used by a specific event code are not guaranteed to
  718. be zero.
  719. Errors
  720. # of Bytes      Value   Description
  721. 1       0       Error
  722. 1       CARD8   XIE error code
  723. 2       CARD16  Sequence number
  724. 4       <varies>        <error-specific (often a resource-id)>
  725. 2       CARD16  Minor opcode
  726. 1       CARD8   Major opcode
  727. 21      <varies>        <error-specific>
  728. Errors consist of thirty-two (32) bytes.  Bytes not used by the specific error code are not guaranteed to
  729. be zero.
  730.  
  731. Protocol Specification Syntax 2-1
  732.  
  733.  
  734. 3
  735. Parameter Types
  736. XIE and Core X Types
  737. X Image Extension types are defined in this section.  All XIE parameters are defined as being either one
  738. of the extension types or one of the core protocol types.  XIE makes use of the following core protocol
  739. types (defined in the X11 core protocol specification):
  740. BITMAP  BOOL    CARD8   CARD16
  741. CARD32  CHAR2B  COLORMAP        DRAWABLE
  742. EVENT   GCONTEXT        INT8    INT16
  743. INT32   PIXMAP  STRING8 TIMESTAMP
  744. VISUAL  WINDOW  XID*
  745. *  XID is used to refer to the core X11 type defined as the identifier for a resource.
  746. Techniques
  747. Several standard techniques are defined in this document.  Each is assigned a technique number and a de-
  748. scriptive name string.  XIE can also be extended with private techniques that are implementation depend-
  749. ent.  Private technique numbers are generated dynamically.  Private technique name strings include the
  750. name of the organization that defined the technique.  The organization name is encompassed by _
  751. (underscore) characters.  Technique naming and numbering conventions are summarized in Table 3-1.
  752.  
  753.  
  754. standard technique
  755. private technique
  756. name
  757. <standard-technique-name>
  758. example: ERROR-DIFFUSION
  759. _<organization-name>_<private-technique-name>
  760. example: _PHOTOCO_SQUASH-BITS
  761. number
  762. MS bit is zero (range: 0 - 32767)
  763. MS bit is one (range: 32768 - 65535)
  764. Table 3-1   Technique naming and numbering conventions
  765. The technique number is supplied to pipeline elements to specify the desired technique.  Numbers for
  766. standard techniques can be hard-coded, whereas numbers for private techniques must be obtained using
  767. the QueryTechniques protocol request.
  768.  
  769. For more information on techniques and a description of the techniques defined in this document, see Appendix A.  For a list of techniques
  770. itemized by ServiceClass, see Appendix B.  Numbers assigned to standard techniques are encoded in Appendix C.
  771. Definitions
  772. XieTypAlignment
  773. Alignment defines the valid pixel and scanline alignments allowed for image data transported through the
  774. protocol stream.  The server's Alignment attribute is returned by the QueryImageExtension protocol re-
  775. quest.
  776. XieTypAlignment { XieValAlignable, XieValArbitrary }
  777. *       Alignable       Specifies data units must fit evenly within a byte, or they must fill a byte, or fill a multiple
  778.         of bytes (that is, pixels may be 1, 2, 4, 8, 16, 24*, or 32* bits in the protocol stream).
  779. *       Arbitrary       Specifies data units may fall at any bit address (that is, 10 bit packed pixels are acceptable in
  780.         the protocol stream).
  781. *       XIE supports pixels up to sixteen (16) bits per band for both SingleBand and TripleBand data.  In addition, SingleBand data are
  782. supported up to the depth of the deepest DRAWABLE supported by the server.
  783.  
  784.  
  785. XieTypArithmeticOp
  786. ArithmeticOp defines the valid operations for the Arithmetic process element.
  787. XieTypArithmeticOp      {       XieValAdd,
  788.         XieValSub, XieValSubRev,
  789.         XieValMul,
  790.         XieValDiv, XieValDivRev,
  791.         XieValMin, XieValMax,
  792.         XieValGamma }
  793.                 Monadic Dyadic
  794. *       Add     src1 + constant src1 + src2
  795. *       Sub     src1 - constant src1 - src2
  796. *       SubRev  constant - src1 src2 - src1
  797. *       Mul     src1 * constant
  798. *       Div     src1 / constant
  799. *       DivRev  constant / src1
  800. *       Min     minimum( src1, constant )       minimum( src1, src2 )
  801. *       Max     maximum( src1, constant )       maximum( src1, src2 )
  802. *       Gamma   If src1 is Constrained:
  803.                     (levels - 1) * ((src1 / (levels - 1))constant)
  804.         If src1 is Unconstrained:
  805.                     src1constant
  806.  
  807.  
  808. XieTypColorAllocTechnique
  809. ColorAllocTechnique defines the recognized color allocation techniques used by the ConvertToIndex
  810. element.
  811. XieTypColorAllocTechnique       {       XieValDefault,
  812. XieValColorAlloc_AllocAll,
  813. XieValColorAlloc_Match,
  814. XieValColorAlloc_Requantize }
  815. *       Default
  816. ColorAlloc_AllocAll     ALLOC-ALL
  817. ColorAlloc_Match        MATCH
  818. ColorAlloc_Requantize   REQUANTIZE
  819. private-technique-number        private-name-string
  820. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  821. nique.
  822.  
  823. XieTypColorList
  824. ColorList is the type for the XIE resource used to store COLORMAP allocations made by the ConvertTo-
  825. Index element.  A ColorList is a permanent resource and, as such, must be created and destroyed by the
  826. client.  A ColorList contains a counted list of the pixel indices that were allocated and the resource-id of
  827. the COLORMAP from which they were allocated.
  828. XieTypColorList XID
  829.  
  830. XieTypCompareOp
  831. CompareOp defines the operators for the Compare element.
  832. XieTypCompareOp {       XieValLT,       XieValLE,
  833. XieValEQ,       XieValNE,
  834. XieValGT,       XieValGE }
  835. *       LT              src1 <  src2 or  src1 < constant
  836. *       LE              src1 ú src2 or  src1 ú constant
  837. *       EQ      src1 = src2 or  src1 = constant
  838. *       NE      src1 ╣ src2 or  src1 ╣ constant
  839. *       GT              src1 > src2 or  src1 > constant
  840. *       GE      src1 │ src2 or  src1 │ constant
  841.  
  842. XieTypConstant
  843. Constant is typically used to supply per-band constant values.  All constants are passed as floats.  When a
  844. constant is to be used as a substitute for a Constrained image pixel, the constant is rounded to the nearest
  845. integer, and then hard-clipped to the range of levels that applies to the pixel for which it is a substitute.  In
  846. most other cases the constant is used as is (that is, as a float).
  847. XieTypConstant  XieTypTripletofXieTypFloat
  848.  
  849. Element Op/arg/Tech     Type    Usage   If Constrained ╝
  850.  
  851. Arithmetic      Add     Constant        Pixel value when monadic        round/hard-clip
  852.         Sub     Constant        Pixel value when monadic        round/hard-clip
  853.         SubRev  Constant        Pixel value when monadic        round/hard-clip
  854.         Min     Constant        Pixel value when monadic        round/hard-clip
  855.         Max     Constant        Pixel value when monadic        round/hard-clip
  856.         Mul     Constant        Multiplicand    Use as is
  857.         Div     Constant        Divisor Use as is
  858.         DivRev  Constant        Dividend        Use as is
  859.         Gamma   Constant        Exponent        Use as is
  860.  
  861. BandExtract     coefficients    Constant        Multipliers     Use as is
  862.         bias    Float   Final offset    Use as is
  863.  
  864. Blend   constant        Constant        Pixel value when monadic        round/hard-clip
  865.         alpha-constant  Float   Constant alpha value    Use as is
  866.  
  867. Compare constant        Constant        Pixel value when monadic        round/hard-clip
  868.  
  869. Constrain       ClipScale       Constant        Scale src levels to dst levels  Use as is
  870.  
  871. Convert From/To RGB     CIElab  Matrix  Conversion matrix       Use as is
  872.         CIElabShift     Constant        White-point     Use as is
  873.         CIEXYZ  Matrix  Conversion matrix       Use as is
  874.         YCbCr   Constant        Luma values and bias    Use as is
  875.         YCC     Constant        Luma values     Use as is
  876.         YCC     Float   Scale   Use as is
  877.  
  878. ConvertToIndex  Match   Float   Match-limit, gray-limit Use as is
  879.  
  880. Convolve        kernel  LISTofFloat     Convolution kernel      Use as is
  881.         Constant        Constant        Edge pixel value        round/hard-clip
  882.  
  883. Geometry        a,b,c,d,tx,ty   Float   Coefficients [6]        Use as is
  884.         constant        Constant        Fill pixel value        round/hard-clip
  885.         Gaussian        Float   Sigma, normalize        Use as is
  886.  
  887. Logical constant        Constant        Pixel value when monadic        round/hard-clip
  888.  
  889. MatchHistogram  Gaussian        Float   Mean, sigma     Use as is
  890.         Hyperbolic      Float   Constant        Use as is
  891.  
  892. PasteUp constant        Constant        Fill pixel value        round/hard-clip
  893.  
  894. Table 3-2   Treatment of floating point parameters passed through the protocol
  895.  
  896. XieTypConstrainTechnique
  897. ConstrainTechnique defines various methods of constraining data.  These techniques are applied by the
  898. Constrain element.
  899. XieTypConstrainTechnique        {       XieValConstrain_ClipScale,
  900. XieValConstrain_HardClip }
  901. Constrain_ClipScale     CLIP-SCALE
  902. Constrain_HardClip      HARD-CLIP
  903. private-technique-number        private-name-string
  904.  
  905. XieTypConvertFromRGBTechnique
  906. ConvertFromRGBTechnique defines the trichromatic colorspaces known to the ConvertFromRGB
  907. element.
  908. XieTypConvertFromRGBTechnique   {       XieValConvertFromRGB_CIELab,
  909. XieValConvertFromRGB_CIEXYZ,
  910. XieValConvertFromRGB_YCbCr,
  911. XieValConvertFromRGB_YCC }
  912. ConvertFromRGB_CIELab   CIELAB
  913. ConvertFromRGB_CIEXYZ   CIEXYZ
  914. ConvertFromRGB_YCbCr    YCbCr
  915. ConvertFromRGB_YCC      YCC
  916. private-technique-number        private-name-string
  917.  
  918. XieTypConvertToRGBTechnique
  919. ConvertToRGBTechnque defines the trichromatic colorspaces known to the ConvertToRGB element.
  920. XieTypConvertToRGBTechnique     {       XieValConvertToRGB_CIELab,
  921. XieValConvertToRGB_CIEXYZ,
  922. XieValConvertToRGB_YCbCr,
  923. XieValConvertToRGB_YCC }
  924. ConvertToRGB_CIELab     CIELAB
  925. ConvertToRGB_CIEXYZ     CIEXYZ
  926. ConvertToRGB_YCbCr      YCbCr
  927. ConvertToRGB_YCC        YCC
  928. private-technique-number        private-name-string
  929.  
  930. XieTypConvolveTechnique
  931. ConvolveTechnique provides various methods of handling edge conditions in the Convolve element.
  932. This technique determines what pixel values are used when Convolve requires data beyond the image
  933. bounds.
  934. XieTypConvolveTechnique {       XieValDefault,
  935. XieValConvolve_Constant,
  936. XieValConvolve_Replicate }
  937. *       Default
  938. Convolve_Constant       CONSTANT
  939. Convolve_Replicate      REPLICATE
  940. private-technique-number        private-name-string
  941. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  942. nique.
  943.  
  944. XieTypDataClass
  945. DataClass defines the class of data being transported over the wire.
  946. XieTypDataClass {       XieValSingleBand,
  947. XieValTripleBand }
  948. *       SingleBand      Specifies index data (for example, ZPixmap format COLORMAP indices) or
  949. achromatic data (bitonal or gray-scale).
  950. *       TripleBand      Specifies nonindex trichromatic data (RGB or other supported colorspaces).
  951.  
  952. XieTypDataStream
  953. DataStream is a segmented stream of data units that are transported in either direction through the proto-
  954. col stream.  Segments of image data are transported as an arbitrary number of unsigned bytes, whereas all
  955. other types of data (for example, lookup table entries, rectangles, histogram counts, and so on) must be
  956. transported as one or more complete aggregates.  The status, indicating the eventual end of data, is sup-
  957. plied in the associated protocol request or reply.  The interpretation of the data stream is determined by
  958. parameters specified to the PhotoElement accepting or generating the data.
  959. XieTypDataStream                LISTofCARD8
  960.  
  961. XieTypDataType
  962. DataType defines the limits and processing model for the data.
  963. XieTypDataType  {       XieValConstrained,
  964. XieValUnconstrained }
  965. *       Constrained     Specifies pixels are integer values and are limited to the range [0, levels-1].
  966. *       Unconstrained   Specifies pixels may be any arbitrary value.
  967.  
  968. XieTypDecodeTechnique
  969. DecodeTechnique defines the techniques that can be used to interpret uncompressed image data or decode
  970. compressed images.
  971. XieTypDecodeTechnique   {       XieValDecode_UncompressedSingle,
  972. XieValDecode_UncompressedTriple,
  973. XieValDecode_CCITT-G31D,
  974. XieValDecode_CCITT-G32D,
  975. XieValDecode_CCITT-G42D,
  976. XieValDecode_JPEG-Baseline,
  977. XieValDecode_JPEG-Lossless,
  978. XieValDecode_TIFF-2,
  979. XieValDecode_TIFF-PackBits }
  980. Decode_UncompressedSingle       UNCOMPRESSED-SINGLE
  981. Decode_UncompressedTriple       UNCOMPRESSED-TRIPLE
  982. Decode_CCITT-G31D       CCITT-G31D
  983. Decode_CCITT-G32D       CCITT-G32D
  984. Decode_CCITT-G42D       CCITT-G42D
  985. Decode_JPEG-Baseline    JPEG-BASELINE
  986. Decode_JPEG-Lossless    JPEG-LOSSLESS
  987. Decode_TIFF-2   TIFF-2
  988. Decode_TIFF-PackBits    TIFF-PACKBITS
  989. private-technique-number        private-name-string
  990.  
  991. XieTypDitherTechnique
  992. DitherTechnique defines the techniques that can be used to dither an image.
  993. XieTypDitherTechnique   {       XieValDefault,
  994. XieValDither_ErrorDiffusion,
  995. XieValDither_Ordered }
  996. *       Default
  997. Dither_ErrorDiffusion   ERROR-DIFFUSION
  998. Dither_Ordered  ORDERED
  999. private-technique-number        private-name-string
  1000. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  1001. nique.
  1002.  
  1003. XieTypEncodeTechnique
  1004. EncodeTechnique defines the techniques that can be used to compress an image or format it as uncom-
  1005. pressed data.
  1006. XieTypEncodeTechnique   {       XieValEncode_ServerChoice,
  1007. XieValEncode_UncompressedSingle,
  1008. XieValEncode_UncompressedTriple,
  1009. XieValEncode_CCITT-G31D,
  1010. XieValEncode_CCITT-G32D,
  1011. XieValEncode_CCITT-G42D,
  1012. XieValEncode_JPEG-Baseline,
  1013. XieValEncode_JPEG-Lossless,
  1014. XieValEncode_TIFF-2,
  1015. XieValEncode_TIFF-PackBits }
  1016. Encode_ServerChoice     (not returned by QueryTechniques)
  1017. Encode_UncompressedSingle       UNCOMPRESSED-SINGLE
  1018. Encode_UncompressedTriple       UNCOMPRESSED-TRIPLE
  1019. Encode_CCITT-G31D       CCITT-G31D
  1020. Encode_CCITT-G32D       CCITT-G32D
  1021. Encode_CCITT-G42D       CCITT-G42D
  1022. Encode_JPEG-Baseline    JPEG-BASELINE
  1023. Encode_JPEG-Lossless    JPEG-LOSSLESS
  1024. Encode_TIFF-2   TIFF-2
  1025. Encode_TIFF-PackBits    TIFF-PACKBITS
  1026. private-technique-number        private-name-string
  1027.  
  1028. XieTypExecutable
  1029. Executable is the type used to identify a specific Photoflo instance.
  1030. XieTypExecutable
  1031. [       name-space      ServerIDSpace   or      XieTypPhotospace
  1032.         flo-id  XieTypPhotoflo  or      CARD32
  1033. ]
  1034. Name-space identifies the execution domain used for a Photoflo.  Flo-id identifies a particular instance of
  1035. a Photoflo.
  1036. For stored Photoflos name-space is always ServerIDSpace (the value zero) and flo-id is the Photo-
  1037. flo's resource-id.
  1038. For immediate Photoflos name-space is a Photospace resource-id and flo-id  is a 32-bit value that
  1039. uniquely identifies the instance of the Photoflo within name-space.
  1040.  
  1041. XieTypExportNotify
  1042. ExportNotify is used by ExportClient elements to control how ExportAvailable events are sent to
  1043. the client.
  1044. XieTypExportNotify      {       XieValDisable
  1045. XieValFirstData
  1046. XieValNewData }
  1047. *       Disable Specifies no events are sent.
  1048. *       FirstData       Specifies a single event is sent when the first data is available.
  1049. *       NewData Specifies an event is sent each time the amount of available data changes from zero to nonz-
  1050. ero.
  1051.  
  1052. The end of data is signaled by a final flag in the GetClientData reply that is returned when the last segment of data is retrieved.
  1053.  
  1054. XieTypExportState
  1055. ExportState is a status value returned from an ExportClient element in a reply to the corresponding
  1056. GetClientData protocol request.
  1057. XieTypExportState       {       XieValExportDone,
  1058. XieValExportMore,
  1059. XieValExportEmpty,
  1060. XieValExportError }
  1061. *       ExportDone      Specifies all data has been retrieved.
  1062. *       ExportMore      Specifies more data currently is available.
  1063. *       ExportEmpty     Specifies no more data is available at this time.
  1064. *       ExportError     Specifies an error condition prevents data availability.
  1065.  
  1066. XieTypFloat
  1067. Float specifies data is in the IEEE single-precision format as described in ANSI/IEEE  Standard 754-
  1068. 1985, IEEE Standard for Binary Floating-Point Arithmetic.  Float is used only for constant parameter
  1069. values, matrix coefficients, and so on but never for transported image data.  The byte order of each Float
  1070. is dealt with in the same manner as other numeric values; it is determined at core protocol connection
  1071. setup time.
  1072.  
  1073. XieTypGamutTechnique
  1074. GamutTechnique defines the gamut compression techniques used by ConvertToRGB to deal with con-
  1075. verted colors that lie outside the gamut of the RGB space.
  1076. XieTypGamutTechnique    {       XieValDefault,
  1077. XieValGamut_None,
  1078. XieValGamut_ClipRGB }
  1079. *       Default
  1080. Gamut_None      NONE
  1081. Gamut_ClipRGB   CLIP-RGB
  1082. private-technique-number        private-name-string
  1083. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  1084. nique.
  1085.  
  1086. XieTypGeometryTechnique
  1087. GeometryTechnique defines the retrospective image resampling techniques used by the Geometry ele-
  1088. ment.
  1089. XieTypGeometryTechnique {       XieValDefault,
  1090. XieValGeometry_Antialias,
  1091. XieValGeometry_AntialiasByArea,
  1092. XieValGeometry_AntialiasByLowpass,
  1093. XieValGeometry_BilinearInterpolation,
  1094. XieValGeometry_Gaussian,
  1095. XieValGeometry_NearestNeighbor }
  1096. *       Default
  1097. Geometry_Antialias      ANTIALIAS
  1098. Geometry_AntialiasByArea        ANTIALIAS-BY-AREA
  1099. Geometry_AntialiasByLowpass     ANTIALIAS-BY-LOWPASS
  1100. Geometry_BilinearInterpolation  BILINEAR-INTERPOLATION
  1101. Geometry_Gaussian       GAUSSIAN
  1102. Geometry_NearestNeighbor        NEAREST-NEIGHBOR
  1103. private-technique-number        private-name-string
  1104. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  1105. nique.
  1106.  
  1107. XieTypHistogramData
  1108. HistogramData defines the organization of histogram entries created by the ExportClientHistogram
  1109. element.
  1110. XieTypHistogramData
  1111. [       value   CARD32
  1112.         count   CARD32
  1113. ]
  1114.  
  1115. XieTypHistogramShape
  1116. HistogramShape defines the various match-histogram shape techniques that can be requested in the
  1117. MatchHistogram element.
  1118. XieTypHistogramShape    {       XieValHistogram_Flat,
  1119. XieValHistogram_Gaussian,
  1120. XieValHistogram_Hyperbolic }
  1121. Histogram_Flat  FLAT
  1122. Histogram_Gaussian      GAUSSIAN
  1123. Histogram_Hyperbolic    HYPERBOLIC
  1124. private-technique-number        private-name-string
  1125.  
  1126. XieTypInterleave
  1127. Interleave defines the way in which bands of TripleBand data may be interleaved.
  1128. XieTypInterleave        {       XieValBandByPixel,
  1129. XieValBandByPlane }
  1130. *       BandByPixel     Specifies the data for all bands are interleaved on a per-pixel basis and transmitted as a sin-
  1131. gle data plane (for example, for RGB data red, green, and blue values for a given pixel are
  1132. immediately followed by the red, green, and blue values for the next pixel). BandByPixel is
  1133. similar to the core protocol ZPixmap format.
  1134. *       BandByPlane     Specifies the data for each band are transmitted as separate data planes (for example, for
  1135. RGB data all red data are transmitted in one plane, all green data in a separate plane, and all
  1136. blue data in another plane).
  1137.  
  1138. Interleave is generally used in conjunction with Orientation, which would define the order of the interleaved bands.
  1139.  
  1140. XieTypLevels
  1141. Levels describes the potential dynamic range for the quantization levels associated with each band of an
  1142. image.
  1143. XieTypLevels    XieTypTripletofCARD32
  1144.         Note: for Constrained image data a value of zero (0) represents 232 (4,294,967,296) levels.
  1145.  
  1146. XieTypLUT
  1147. LUT is the type for the XIE server resource used to hold arrays that map one set of values to another. The
  1148. arrays are one-dimensional, and the resource holds either one or three arrays.  The ImportClientLUT and
  1149. ImportLUT elements are used to import LUT data into a Photoflo, the Point element uses the data, the
  1150. ExportLUT element is used to (re)populate the LUT resource, and the ExportClientLUT element is pro-
  1151. vided to facilitate sending the LUT data back to the client.
  1152. XieTypLUT       XID
  1153.  
  1154. XieTypMathOp
  1155. MathOp defines the valid mathematical operations that can be invoked through the Math element.  The
  1156. MathOp is applied to each input pixel value to determine the output pixel value.
  1157. XieTypMathOp    {       XieValExp,      XieValLn,
  1158. XieValLog2,     XieValLog10,
  1159. XieValSquare,   XieValSqrt }
  1160. *       Exp     Exponential
  1161. *       Ln              Natural logarithm
  1162. *       Log2    Logarithm base 2
  1163. *       Log10   Logarithm base 10
  1164. *       Square  Square
  1165. *       Sqrt    Square root
  1166.  
  1167. XieTypMatrix
  1168. Matrix is a 3 x 3 matrix of floats that is used by some of the colorspace conversion techniques (for exam-
  1169. ple, conversion between RGB and CIE colorspaces).
  1170. XieTypMatrix    XieTypTripletofXieTypConstant
  1171.  
  1172. XieTypOrientation
  1173. Orientation defines the transmission order of image data units through the protocol stream.
  1174. XieTypOrientation       {       XieValLSFirst, XieValMSFirst }
  1175. Note: in the examples that follow, the order of bytes in the DataStream should be read from left to right.
  1176.  
  1177. encoded-order   Specifies the order of bits within bytes of encoded (compressed) data.
  1178. Example:  Showing 2 bytes (within each byte the first encoded bit is 0, last is bit 7)
  1179.  
  1180. LSFirst
  1181. MSFirst
  1182.  
  1183. 76543210  76543210
  1184. 01234567  01234567
  1185. fill-order      When multiple pixels are put in the same byte, or a pixel spans multiple bytes, fill-
  1186. order specifies whether the pixels (or parts of a pixel) are packed into the most or least
  1187. significant bits of a byte first.
  1188. Example:        Showing 8 2-bit pixels (aa, bb, cc, and so on),  and 2 10-bit pixels: aaaaaaaaaa and
  1189. bbbbbbbbbb)
  1190.  
  1191. LSFirst
  1192. MSFirst
  1193.  
  1194. ddccbbaa  hhggffee
  1195. aabbccdd  eeffgghh
  1196.  
  1197. aaaaaaaa  bbbbbbaa  xxxxbbbb
  1198. aaaaaaaa  aabbbbbb  bbbbxxxx
  1199. pixel-order     For pixels that span a byte boundary, pixel-order specifies whether the most or least
  1200. significant bits of the pixel are put into the DataStream first.  Any pad bits that are
  1201. present between pixels always follow the pixel data (that is, pad bits are not considered
  1202. to be either LS-bits or MS-bits of the pixel data).
  1203. Example:        Showing 2 10-bit pixels, each with 2 bits of pad  (within each pixel the LS-bits are 0 and
  1204. a, the MS-bits are 9 and j, the pad bits are p)
  1205. fill-order
  1206. LSFirst (pixel-order)
  1207. MSFirst (pixel-order)
  1208. LSFirst
  1209. 76543210  dcbapp98  ppjihgfe
  1210. 98765432  jihgpp10  ppfedcba
  1211. MSFirst
  1212. 76543210  98ppdcba  jihgfepp
  1213. 98765432  10ppjihg  fedcbapp
  1214. band-order      Definition: at the protocol level, the least significant band of trichromatic data is the
  1215. first band mentioned in the common name of the colorspace (for example, red is the
  1216. least significant band of RGB data).
  1217.         For BandByPixel data, band-order specifies whether this band is put in the least or
  1218. most significant bits of a pixel.
  1219.  
  1220. LSFirst
  1221. MSFirst
  1222.  
  1223. B1B0G2G1G0R2R1R0
  1224. R2R1R0G2G1G0B1B0
  1225.         For BandByPlane data, band-order specifies whether this band corresponds with the
  1226. least significant or most significant image plane.  Each plane is transported as a sepa-
  1227. rate DataStream.
  1228. band
  1229. LSFirst
  1230. MSFirst
  1231. 0
  1232. R7R6R5R4R3R2R1R0
  1233. B7B6B5B4B3B2B1B0
  1234. 1
  1235. G7G6G5G4G3G2G1G0
  1236. G7G6G5G4G3G2G1G0
  1237. 2
  1238. B7B6B5B4B3B2B1B0
  1239. R7R6R5R4R3R2R1R0
  1240.         For all other instances where a triplet of per-band information is conveyed  through the
  1241. protocol (levels, constants, and so on), the first element of the triplet  corresponds with
  1242. the least significant band as defined above.
  1243. XieTypPhotoElement
  1244. PhotoElement, or just element, is a generic type used for import, process, or export elements in a Pho-
  1245. toflo.  The syntax of a generic element was described in Chapter 2.  The actual element definitions are
  1246. found in Chapters 6, 7, and 8.
  1247.  
  1248. XieTypPhotoflo
  1249. Photoflo is the type for the XIE server resource that is used to represent a sequence of image processing
  1250. operations. Stored Photoflos are permanent resources. As such, they must be created and destroyed by
  1251. the client.
  1252. XieTypPhotoflo  XID
  1253. For immediate Photoflos, see type Photospace and the ExecuteImmediate protocol request.
  1254.  
  1255. XieTypPhotofloOutcome
  1256. PhotofloOutcome is returned by the PhotofloDone event and indicates the reason why the Photoflo left
  1257. the Active state.
  1258. XieTypPhotofloOutcome   {       XieValFloSuccess,
  1259. XieValFloError,
  1260. XieValFloAbort }
  1261. *       FloSuccess      Specifies the Photoflo completed normally.
  1262. *       FloError        Specifies the Photoflo terminated due to an error condition.
  1263. *       FloAbort        Specifies the Photoflo was aborted by the client.
  1264.  
  1265. XieTypPhotofloState
  1266. PhotofloState identifies the current execution state of a Photoflo.
  1267. XieTypPhotofloState     {       XieValInactive,
  1268. XieValActive,
  1269. XieValNonexistent }
  1270. *       Inactive        Specifies the state of a stored Photoflo prior to execution, after an error or abort, or after
  1271. execution completes. Inactive stored Photoflos can be modified and redefined.
  1272. *       Active  Specifies the state of a stored or immediate Photoflo during execution.
  1273.                 Specifies a Photoflo remains Active until:
  1274.                          All export elements have finished their task, and
  1275.                          All data exported for the client have been retrieved, or
  1276.                          An error prevents further progress, or
  1277.                          The client issues an abort request
  1278. *       Nonexistent     Specifies the state of a Photoflo that does not exist (never existed or has been destroyed).
  1279.  
  1280. XieTypPhotomap
  1281. Photomap is the type for the XIE resource used to store image data in the server.  A Photomap is a per-
  1282. manent resource that can be created and destroyed by the client.  ImportPhotomap is used to import per-
  1283. manent image data into a Photoflo.  ExportPhotomap is used to (re)populate the resource.
  1284. XieTypPhotomap  XID
  1285.  
  1286. XieTypPhotospace
  1287. Photospace is the type for the XIE resource used to define a XIE name space within which immediate
  1288. Photoflos may be executed. A Photospace is a permanent resource and as such must be created and de-
  1289. stroyed  by the client.
  1290. XieTypPhotospace        XID
  1291.  
  1292. XieTypPhototag
  1293. Phototag is the position or index of a PhotoElement within a list of elements used to specify a Photoflo.
  1294. The first element in the list has a Phototag value of one (1).  A Phototag value of zero (0) is reserved for
  1295. special purposes, such as, indicating an optional element input that is not connected or indicating Photo-
  1296. flo errors that are not specific to an element.
  1297. XieTypPhototag          CARD16
  1298. XieTypProcessDomain
  1299. ProcessDomain is a substructure inserted in many PhotoElement definitions.  It is used to restrict the
  1300. element's processing to a subset of the source data pixels.  A ProcessDomain can be either a list-of-
  1301. rectangles or a control-plane.
  1302. XieTypProcessDomain
  1303. [       offset-x        INT32
  1304. offset-y        INT32
  1305. domain  XieTypPhototag
  1306. ]
  1307. Offset-x and offset-y specifies the spatial registration between the element's data source(s) and the
  1308. ProcessDomain (that is, offset relative to the origin of the source(s)).  Domain is the Phototag of the ele-
  1309. ment providing the ProcessDomain data.
  1310. If the value zero (0) is specified for domain, processing is not restricted by the processing domain; other-
  1311. wise, domain references an element outputting a list-of-rectangles or image data that is used as a control-
  1312. plane.
  1313. If domain is a list-of-rectangles, processing is restricted to the intersection of the data source(s) and any
  1314. rectangle within the list (offset-x and offset-y are added to the x and y of each rectangle).
  1315. If domain is a source of Constrained, SingleBand, bi-level image data (that is, a control-plane), process-
  1316. ing is restricted to the intersection of the data source(s) and nonzero locations within domain.
  1317. ProcessDomain is not supported by DIS but is included in the subset because the Point element takes a
  1318. ProcessDomain as a parameter (in this case domain must be zero).
  1319.  
  1320. XieTypRectangle
  1321. Rectangle describes a rectangle used in XieTypROI.
  1322. XieTypRectangle
  1323. [       x       INT32
  1324. y       INT32
  1325. width   CARD32
  1326. height  CARD32
  1327. ]
  1328. X and y are the coordinates of the upper left hand corner of the rectangle within the ProcessDomain (the
  1329. domains x,y offset is also added to these coordinates to position the rectangle relative to the image being
  1330. processed).  Width and height are the extent of the rectangle.
  1331.  
  1332. XieTypROI
  1333. ROI (Rectangles-Of-Interest) is the XIE resource used to contain a list-of-rectangles (input for a
  1334. ProcessDomain).  A ROI resource is a permanent resource and, as such, must be created and destroyed
  1335. by the client.  ImportClientROI and ImportROI elements are used to import a list-of-rectangles into a
  1336. Photoflo, the ExportROI element is used to (re)populate an ROI resource, and the ExportClientROI
  1337. element is provided to facilitate sending rectangles back to the client *.
  1338. XieTypROI       XID
  1339. *       The list-of-rectangles that can be retrieved by the client need not be identical to the original list that was received from the client, but it
  1340. must be logically equivalent.
  1341. XieTypServiceClass
  1342. ServiceClass defines the recognized image processing service sets supported by this X Image Extension
  1343. standard.
  1344. XieTypServiceClass      { XieValFull, XieValDIS }
  1345. *       Full    Specifies supports the entire XIE protocol as defined in this document.
  1346. *       DIS     Specifies upports the Document Image Subset, a proper subset of Full XIE.
  1347. An itemized list of XIE types, techniques, protocol requests, elements, events, and errors that are included in each ServiceClass can be
  1348. found in Appendix B.
  1349.  
  1350. XieTypTechniqueGroup
  1351. TechniqueGroup defines the standard technique group names that can be queried using the QueryTech-
  1352. niques protocol request.
  1353. XieTypTechniqueGroup    {       XieValDefault,
  1354. XieValAll,
  1355. XieValColorAlloc,
  1356. XieValConstrain,
  1357. XieValConvertFromRGB,
  1358. XieValConvertToRGB,
  1359. XieValConvolve,
  1360. XieValDecode,
  1361. XieValDither,
  1362. XieValEncode,
  1363. XieValGamut,
  1364. XieValGeometry,
  1365. XieValHistogram,
  1366. XieValWhiteAdjust }
  1367. *       Default Specifies select all default techniques.
  1368. *       ColorAlloc      Specifies select color allocation techniques.
  1369. *       Constrain       Specifies select techniques for constraining data.
  1370. *       ConvertFromRGB  Specifies select colorspace conversion techniques (for conversion from the RGB color-
  1371. space).
  1372. *       ConvertToRGB    Specifies elect colorspace conversion techniques (for conversion to the RGB colorspace).
  1373. *       Convolve        Specifies select techniques for handling convolution edge conditions.
  1374. *       Decode  Specifies select image decoding (decompression) techniques.
  1375. *       Dither  Specifies select dithering techniques.
  1376. *       Encode  Specifies select image encoding (compression) techniques.
  1377. *       Gamut   Specifies select colorspace conversion gamut compression techniques.
  1378. *       Geometry        Specifies select geometric sampling techniques.
  1379. *       Histogram       Specifies select match-histogram shapes.
  1380. *       WhiteAdjust     Specifies select colorspace conversion white point adjustment techniques.
  1381.  
  1382. If a vendor defined an additional private technique group, it could be discovered by querying for All groups.
  1383. XieTypTechniqueRec
  1384. TechniqueRec defines the information that is returned for each technique in the reply to a QueryTech-
  1385. niques protocol request.
  1386. XieTypTechniqueRec
  1387. [       needs-parameters        BOOL
  1388. group   XieTypTechniqueGroup
  1389. number  CARD16
  1390. speed   CARD8
  1391. name    STRING8
  1392. ]
  1393. Needs-parameters indicates that a technique requires additional parameters; or if false, the technique ei-
  1394. ther takes no parameters or its parameters are optional.  Group identifies which group the technique be-
  1395. longs to.  Number is the numeric identifier assigned to the technique *.  Speed represents the server's view
  1396. of the speed of this technique relative to the other techniques in the same group (0 is the slowest, and 255
  1397. is the fastest).  Name is the XIE compliant technique name string.
  1398. * Numbers assigned to standard techniques are encoded in Appendix C.
  1399.  
  1400. XieTypTile
  1401. Tile defines a source data tile for the PasteUp element.
  1402. XieTypTile
  1403. [       src     XieTypPhototag
  1404. dst-x   INT32
  1405. dst-y   INT32
  1406. ]
  1407. Src is the Phototag of the element supplying source data.  Dst_x, dst_y specify the coordinates where the
  1408. tile belongs in the output data.
  1409.  
  1410. XieTypTripletoftype
  1411. Tripletof is a generic type used to define a fixed sized array of 3 items* of the specified type.
  1412. XieTypTripletof [ v0, v1, v2 : (of type) ]
  1413. *       Tripletof is usually used to describe per-band attributes and parameters.  When dealing with SingleBand images, the value zero must
  1414. be used for the nonexistent bands.
  1415. XieTypWhiteAdjustTechnique
  1416. WhiteAdjustTechnique defines the white point adjustment techniques that can be used when converting
  1417. to or from the RGB colorspace.
  1418. XieTypWhiteAdjustTechnique      {       XieValDefault,
  1419. XieValWhiteAdjust_None,
  1420. XieValWhiteAdjust_CIELabShift }
  1421. *       Default
  1422. WhiteAdjust_None        NONE
  1423. WhiteAdjust_CIELabShift CIELAB-SHIFT
  1424. private-technique-number        private-name-string
  1425. *       The server is required to support the Default technique that is bound to one of the standard techniques defined above or a private tech-
  1426. nique.
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449. almost blank
  1450.  
  1451. Protocol Parameter Types   3-17
  1452.  
  1453.  
  1454. 4
  1455. Resources
  1456. Overview
  1457. XIE resources are extension server objects created by the client that contain information used by the
  1458. extension in carrying out various protocol requests.  There are protocol requests to create and destroy
  1459. each resource type.  Resource identifiers are generated by the client as defined by the core protocol.
  1460. All XIE resources are reference counted.
  1461. Binding Resources to Photoflos
  1462. Each resource that is referenced from a Photoflo is bound to the Photoflo (and its reference count is
  1463. incremented) when the Photoflo becomes Active.
  1464. ColorList resources
  1465. A ColorList is purged of previous allocations when a Photoflo begins execution and is populated
  1466. with new allocations (via ConvertToIndex) as the Photoflo proceeds.  A ColorList can only be refer-
  1467. enced by one Active Photoflo at a time.  The ColorList's reference count is decremented when the
  1468. Photoflo is no longer Active.
  1469. LUT, Photomap, and ROI resources
  1470. These XIE resources consist of two parts: one part contains the resource-id; the other part holds at-
  1471. tributes and data.  Figure 4-1 pictures the first part as a handle and the second part as a bucket.  Upon
  1472. resource creation only the handle exists.  The bucket is created when the Photoflo (referencing the
  1473. handle via an ExportResource element) becomes Active.  The handle and bucket are joined when
  1474. the Photoflo successfully completes.  Conceptually each part contains a separate reference count.
  1475.  
  1476. Figure 4-1   Creating and populating a new Photomap
  1477. In the case of ImportResource elements, the handle and bucket are both bound to the Photoflo
  1478. when it first becomes Active (initialization).  For ExportResource elements, only the handle is
  1479. bound at this time, and a new bucket is created to hold the forthcoming data.  This buckets attributes
  1480. are derived from the ExportResource element.
  1481. If an export handle is already connected to a bucket, the old bucket remains with its handle until suc-
  1482. cessful Photoflo completion.  Thus, the old bucket is preserved if the Photoflo terminates due to an
  1483. error condition or if an Abort request is received from the client.
  1484. The new bucket is filled with data as the Photoflo proceeds.  When the Photoflo successfully com-
  1485. pletes, old buckets can be freed if they have no other references, and the waiting handle is joined to
  1486. the new bucket.  This is illustrated in figure 4-2.
  1487.  
  1488. Figure 4-2   Process image from Photomap a, place result into Photomap b
  1489. This model also allows pseudo in-place operations, such as, that illustrated in figure 4-3.  Here an im-
  1490. age is imported from a Photomap, processed, and then the result is exported back to the same Pho-
  1491. tomap.  Note that upon completion the old handle is moved to the new bucket, and the old bucket is
  1492. destroyed.
  1493. irs
  1494. Figure 4-3   Process image from Photomap a in-place
  1495. Resource destruction
  1496. When a destroy request is received the resource-id is immediately disassociated from the resource and
  1497. the resource's reference count(s) is(are) decremented.  For each reference count that goes to zero, the
  1498. associated resources are freed (for example, memory or colors).
  1499. Synchronizing resource access
  1500. If multiple Photoflos reference the same resource, the client must synchronize access to the resource
  1501. (for example, Await completion of the Photoflo writing the resource before beginning execution of a
  1502. Photoflo reading from the resource).  Core resources can be volatile, requiring the client to maintain
  1503. the data integrity of the resource while the Photoflo is active.
  1504. Capability Acquisition
  1505. QueryImageExtension
  1506. XieReqQueryImageExtension
  1507. client-major-version: CARD16
  1508. client-minor-version: CARD16
  1509. *
  1510. server-major-version: CARD16
  1511. server-minor-version; CARD16
  1512. service-class: XieTypServiceClass
  1513. alignment: XieTypAlignment
  1514. unconstrained-mantissa: CARD16
  1515. unconstrained-max-exp: INT32
  1516. unconstrained-min-exp: INT32
  1517. constrained-levels: LISTofCARD32
  1518. Errors: Alloc
  1519. Events: none
  1520. QueryImageExtension returns information about the XIE server's capabilities.  Each client should
  1521. use QueryImageExtension to establish version compatibility between client and server prior to
  1522. making any other XIE request.  If a client fails first to establish the desired version using Query-
  1523. ImageExtension, the behavior of other requests is undefined (which generally means that the server
  1524. will use the version number of its own choice).
  1525. Client-major-version and client-minor-version specify which version of the XIE protocol the client
  1526. would like to use.  If the client can support multiple versions, the highest version should be given.
  1527. The server-major-version and server-minor-version specify the version of the XIE protocol that the
  1528. server expects from the client. If the server supports the version requested by the client, this version
  1529. number will be returned.  If the client has requested a higher version than is supported by the server,
  1530. the server's highest version will be returned.  Otherwise, if the client has requested a lower version
  1531. than is supported by the server, the server's lowest version will be returned.  It is the client's responsi-
  1532. bility to decide whether or not it can match the servers version of the protocol.
  1533. Service-class specifies the ServiceClass supported by the XIE server .  Alignment specifies the image
  1534. data alignment restrictions of the server (that is, the alignment of pixels  and scanlines).
  1535. The following parameters convey the approximate range and granularity of Unconstrained data in
  1536. the XIE server.  For servers that represent Unconstrained data using floating point, unconstrained-
  1537. mantissa returns the number of bits in the servers floating point format (including the sign bit).  If
  1538. the server uses fixed point, unconstrained-mantissa is zero.  Unconstrained-max-exp returns the larg-
  1539. est value n such that 2n - 1 is representable in the servers Unconstrained data format.  Uncon-
  1540. strained-min-exp returns the smallest (most negative) value n such that 2n is representable in the
  1541. servers Unconstrained data format.
  1542. Constrained-levels provides a hint about how the XIE server might process Constrained data most
  1543. efficiently.  Constrained-levels returns a list of levels that are recommended for Constrained data
  1544. by the server.  (a value of zero means 232 levels).
  1545. Error   Cause
  1546. Alloc   Insufficient resources
  1547.  
  1548. Technique Acquisition
  1549. QueryTechniques
  1550. XieReqQueryTechniques
  1551. technique-group: XieTypTechniqueGroup
  1552. *
  1553. technique-information: ListofXieTypTechniqueRec
  1554. Errors: Alloc, Value
  1555. Events: none
  1556. QueryTechniques returns information about the standard and private techniques that are supported
  1557. by the server.  The server may be queried for All techniques, all Default techniques, or a group of
  1558. techniques that are functionally similar (for example, all Geometry techniques).
  1559. Technique-group specifies the group of techniques for which the server is to return information.
  1560. Technique-information is a list of TechniqueRec entries that are returned in arbitrary order.  Each
  1561. entry contains the following information:
  1562. needs-parameters        If true, indicates that the technique requires additional parameters; if
  1563. false, the technique takes no parameters, or it has parameters that
  1564. are optional.  If parameters are optional, they must be totally omit-
  1565. ted, or they must all be supplied.
  1566. group   Identifies which group the technique belongs to.
  1567. number  The numeric identifier assigned to the technique (MS bit is zero for
  1568. standard techniques or one for private techniques).
  1569. speed   The server's assessment of the speed of this technique relative to
  1570. other techniques in the same group (0 :== slowest, 255 :== fastest).
  1571. name    The XIE compliant technique name string of the form:
  1572.   <STANDARD-TECHNIQUE-NAME> or
  1573. _<ORGANIZATION-NAME>_<PRIVATE-TECHNIQUE-NAME>
  1574. The technique number is supplied to pipeline elements to specify a desired algorithm or technique.
  1575. While numbers for standard techniques can be hard-coded (for example, defined in an include file),
  1576. numbers for private techniques must be obtained using the QueryTechniques protocol request prior
  1577. to their use.
  1578. Error   Cause
  1579. Alloc   Insufficient resources
  1580. Value   Unknown technique-group
  1581. A complete description of each technique and its parameters is given in Appendix A.  A summary of standard techniques itemized by
  1582. service class can be found in Appendix B. Numbers assigned to standard techniques are encoded in Appendix C.
  1583.  
  1584. ColorList
  1585. CreateColorList
  1586. XieReqCreateColorList
  1587. color-list: XieTypColorList
  1588. Errors: Alloc, IDChoice
  1589. Events: none
  1590. CreateColorList creates an unpopulated server resource that can be used to store the list of colors
  1591. allocated by a ConvertToIndex element.  The COLORMAP allocations that are recorded in a Col-
  1592. orList belong to the client that executed the Photoflo that populated the resource (this is not neces-
  1593. sarily the same client that created the ColorList).  A ColorList cannot be the target of more than one
  1594. Active Photoflo at a time.
  1595. Color-list is the client supplied ColorList identifier to be assigned to this resource.
  1596. Color-list is populated (or repopulated) with new COLORMAP allocations via a ConvertToIndex ele-
  1597. ment as the Photoflo executes.  The contents of color-list may be queried using QueryColorList.
  1598. The client may explicitly purge all allocated cells from color-list using PurgeColorList.  The client
  1599. may cause an implicit deallocation of cells from color-list by making it the target of a Photoflo and
  1600. commencing its execution.  An implicit purge also takes place if the COLORMAP referenced by color-
  1601. list is freed or if the client that owns the cells exits (that is, the client that populated color-list).
  1602. Color-list can be destroyed using DestroyColorList.
  1603. Error   Cause
  1604. Alloc   Insufficient resources
  1605. IDChoice        Invalid color-list
  1606.  
  1607.  
  1608. DestroyColorList
  1609. XieReqDestroyColorList
  1610. color-list: XieTypColorList
  1611. Errors: ColorList
  1612. Events: none
  1613. DestroyColorList disassociates the resource-id from color-list and decrements its reference count.  If
  1614. there are no other references, it frees colors held in color-list and, then, destroys the ColorList iden-
  1615. tified by color-list.
  1616. Error   Cause
  1617. ColorList       Invalid color-list
  1618.  
  1619. PurgeColorList
  1620. XieReqPurgeColorList
  1621. color-list: XieTypColorList
  1622. Errors: Access, ColorList
  1623. Events: none
  1624. PurgeColorList frees the colors from the ColorList identified by color-list.
  1625. Error   Cause
  1626. Access  Attempt to purge colors when color-list is being written by a Photoflo
  1627. ColorList       Invalid color-list
  1628.  
  1629.  
  1630. QueryColorList
  1631. XieReqQueryColorList
  1632. color-list: XieTypColorList
  1633. *
  1634. colormap: COLORMAP
  1635. colors: LISTofCARD32
  1636. Errors: Alloc, ColorList
  1637. Events: none
  1638. QueryColorList returns a list of colors allocated by a ConvertToIndex element.
  1639. Color-list is the ColorList resource to be queried.  Colormap is the COLORMAP from which the col-
  1640. ors were allocated.  Colors is the list of allocated COLORMAP indices.  When there are no colors in
  1641. color-list, the value zero (0) is returned for colormap, and the list of colors is of length zero.
  1642. Error   Cause
  1643. Alloc   Insufficient resources
  1644. ColorList       Invalid color-list
  1645. Notes:
  1646. *       The COLORMAP was originally supplied by the client as a ConvertToIndex parameter.
  1647. *       The returned colors are owned by the server and, therefore, should not be freed via core X protocol requests (for example,
  1648. FreeColors)
  1649. *       The allocated colors can be freed by:
  1650.          Issuing a PurgeColorList or DestroyColorList request
  1651.          Commencing execution of a Photoflo that targets color-list
  1652.          Freeing colormap
  1653.          Shutting down the client that populated color-list
  1654.  
  1655. LUT
  1656. CreateLUT
  1657. XieReqCreateLUT
  1658. lut: XieTypLUT
  1659. Errors:: Alloc, IDChoice
  1660. Events: none
  1661. CreateLUT creates a server resource that is used as a lookup table by the Point element.  A lookup
  1662. table consists of one or three single dimension arrays, each long enough to contain an entry for all
  1663. possible pixels values in the image data to which the Point element will be applied.
  1664. Lut is the client supplied LUT identifier to be assigned to this resource.
  1665. The LUT is populated (or repopulated) with lookup table entries after the successful execution of a
  1666. Photoflo containing an ExportLUT element that targets lut.  Lookup table data can be imported into
  1667. a Photoflo using an ImportLUT element. These data can be used by Point, and they can be exported
  1668. to the client with the aid of an ExportClientLUT element.
  1669. Lut can be destroyed using DestroyLUT.
  1670. Error   Cause
  1671. Alloc   Insufficient resources
  1672. IDChoice        Invalid lut
  1673. A LUT can be populated with a simple ExecuteImmediate( ImportClientLUT, ExportLUT ) Photoflo.  PutClientData is then
  1674. used to transport the lookup table entries.  See ImportClientLUT and Point for further information on LUTs
  1675.  
  1676.  
  1677. DestroyLUT
  1678. XieReqDestroyLUT
  1679. lut: XieTypLUT
  1680. Errors: LUT
  1681. Events: none
  1682. DestroyLUT disassociates the resource-id from lut and decrements its reference count.  If there are
  1683. no other references, it destroys the LUT identified by lut.
  1684. Error   Cause
  1685. LUT     Invalid lut
  1686.  
  1687. Photomap
  1688. CreatePhotomap
  1689. XieReqCreatePhotomap
  1690. photomap: XieTypPhotomap
  1691. Errors: Alloc, IDChoice
  1692. Events: none
  1693. Attribute       Value
  1694. class   Undefined (see text)
  1695. type    Undefined (see text)
  1696. width   Undefined (see text)
  1697. height  Undefined (see text)
  1698. levels  Undefined (see text)
  1699. CreatePhotomap creates a server resource that is used to store image data.  Photomap data may be
  1700. rendered for display or used as input to control or modify the rendition of another image.
  1701. Photomap is the client supplied Photomap identifier to be assigned to this resource.  Photomap at-
  1702. tributes are defined when a Photoflo containing an ExportPhotomap element populates photomap
  1703. with data.
  1704. The Photomap is populated (or repopulated) with image data after the successful execution of a Pho-
  1705. toflo containing an ExportPhotomap element that targets photomap.  Photomap data can be im-
  1706. ported into a Photoflo for rendition or control purposes using an ImportPhotomap element. It can
  1707. also be exported back to the client with the aid of an ExportClientPhoto element.  Photomap attrib-
  1708. utes can be queried using QueryPhotomap.  Photomap can be destroyed using DestroyPhotomap.
  1709. Error   Cause
  1710. Alloc   Insufficient resources
  1711. IDChoice        Invalid photomap
  1712. A Photomap can be populated with a simple ExecuteImmediate(ImportClientPhoto, ExportPhotomap) Photoflo.  PutClient-
  1713. Data is then used to transport the image data.  See ImportClientPhoto and ExportPhotomap and their associated techniques for
  1714. more information regarding the format of image data.
  1715. DestroyPhotomap
  1716. XieReqDestroyPhotomap
  1717. photomap: XieTypPhotomap
  1718. Errors: Photomap
  1719. Events: none
  1720. DestroyPhotomap disassociates the resource-id from photomap and decrements its reference count.
  1721. If there are no other references, it destroys the Photomap identified by photomap.
  1722. Error   Cause
  1723. Photomap        Invalid photomap
  1724. QueryPhotomap
  1725. XieReqQueryPhotomap
  1726. photomap: XieTypPhotomap
  1727. *
  1728. populated: BOOL
  1729. data-type: XieTypDataType
  1730. data-class: XieTypDataClass
  1731. width: XieTypTripletofCARD32
  1732. height: XieTypTripletofCARD32
  1733. levels: XieTypLevels
  1734. decode: XieTypDecodeTechnique
  1735. Errors: Alloc, Photomap
  1736. Events: none
  1737. QueryPhotomap returns the queriable attributes of a Photomap.
  1738. Photomap is the Photomap to be queried.
  1739. Populated is a Boolean that indicates that photomap has been populated with attributes and data.  If
  1740. populated is false, all remaining fields contain zeros.  Data-type shows whether the number of quan-
  1741. tization levels is valid (Constrained) or unknown (Unconstrained).  Data-class is the class of image
  1742. data (that is, SingleBand or TripleBand).  Width and height are the dimensions of the image data in
  1743. pixels (per band).  Levels is the potential dynamic range or number of quantization levels (per band).
  1744. Decode is the DecodeTechnique that will be required to interpret or decompress the data.
  1745. If data-type is  Unconstrained, the returned values for levels are zeros.  If data-class is SingleBand,
  1746. width, height, and levels for unused bands are returned as zeros.
  1747. Error   Cause
  1748. FloAlloc        Insufficient resources
  1749. Photomap        Invalid photomap
  1750.  
  1751. ROI
  1752. CreateROI
  1753. XieReqCreateROI
  1754. roi: XieTypROI
  1755. Errors: Alloc, IDChoice
  1756. Events: none
  1757. CreateROI creates a server ROI (Rectangles-Of-Interest) resource.  A ROI resource may be im-
  1758. ported into a Photoflo and used in conjunction with a ProcessDomain specification to restrict proc-
  1759. essing to a subset of image data.  The ROI, when populated, will contain a list-of-rectangles (of type
  1760. Rectangle).
  1761. Roi is the client supplied ROI identifier to be assigned to this resource.
  1762. The ROI is populated (or re-populated) with a list-of-rectangles after the successful execution of a
  1763. Photoflo containing an ExportROI element that targets roi.  An ROI resource does not have any
  1764. queriable attributes.
  1765. ROI data can be imported into a Photoflo using an ImportROI element.  This data, which is  used
  1766. by several of the PhotoElements defined in chapters 7 and 8, can also be exported back to the client
  1767. with the aid of an ExportClientROI element.
  1768. Roi can be destroyed using DestroyROI.
  1769. Error   Cause
  1770. Alloc   Insufficient resources
  1771. IDChoice        Invalid roi
  1772. An ROI can be populated with a simple ExecuteImmediate ( ImportClientROI, ExportROI ) Photoflo.  PutClientData is then
  1773. used to transport the list-of-rectangles.
  1774. If the client uses ExportClientROI to retrieve a list-of-rectangles from the server, the number of rectangles and the content of the
  1775. list that is returned may differ from original list that was obtained from the client, but its contents will be logically equivalent.
  1776.  
  1777.  
  1778. DestroyROI
  1779. XieReqDestroyROI
  1780. roi: XieTypROI
  1781. Errors: ROI
  1782. Events: none
  1783. DestroyROI disassociates the resource-id from roi and decrements its reference count.  If there are no
  1784. other references, it destroys the ROI identified by roi.
  1785. Error   Cause
  1786. ROI     Invalid roi
  1787.  
  1788.  
  1789.         ServiceClasses defined in this document include: Full XIE and DIS.
  1790.  
  1791.  
  1792. Resources   4-10
  1793.  
  1794.  
  1795. 5
  1796. Pipelined Processing
  1797. What is a Photoflo?
  1798. A Photoflo is a directed acyclic graph. Each node has zero or more input connections and zero or one
  1799. output connection.  A node specifies the source for an input by identifying another upstream node.  A
  1800. node's output connection can be used as a source for any number of downstream input connections.  A
  1801. Photoflo is permitted to have taps and multiple final destinations.
  1802. The protocol representation of a Photoflo is a list of elements.  Because the entire list is sent to the
  1803. server as a single protocol request, the total length of the list, including its protocol header, must fit
  1804. within a maximum size protocol message (see, maximum-request-length, established by X11 connec-
  1805. tion setup).
  1806. Each element of the Photoflo is identified by its position in the list. This position, or index, is called a
  1807. Phototag.  The first element in the list is index one (1).  The order of elements in the list does not
  1808. have to match the Photoflo topology because there is no implicit coupling of output N to input N+1.
  1809. The source for each element's input connections are explicitly specified using the Phototags of up-
  1810. stream elements.
  1811. There are three types of elements.  Import elements bring data into the Photoflo from external re-
  1812. sources or the client, have one output connection, and no input connections.  Process elements per-
  1813. form some operation on the data (for example, convolution), have one or more input connections, and
  1814. exactly one output connection.  Export elements emit data from the Photoflo to external resources or
  1815. to the client, have one input connection, and no output connections.  A Photoflo should include at
  1816. least one import element and one export element to be useful.
  1817.  
  1818.  
  1819. Import
  1820. Process
  1821. Export
  1822. Number of input connections
  1823. none
  1824. one or more
  1825. one
  1826. Number of output connections
  1827. one
  1828. one
  1829. none
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835. Figure 5-1   Photoflo element input and output connections
  1836. All data external to the Photoflo (internal server data and client data) are accessed through import
  1837. and export elements.  Therefore, for purposes of Photoflo definition and modification, X and XIE re-
  1838. source-ids are considered element parameters rather than element sources or destinations. No element
  1839. is permitted to reference a Photoflo for any reason.  It is also an error to specify an export element as
  1840. an input to any element.
  1841. Figure 5-2 illustrates several capabilities of Photoflo construction.  An RGB image is imported from
  1842. the client.  This image is saved in a Photomap for later reuse.  The blue band is selected and trans-
  1843. lated (to correct registration).  This result is exported back to the client.  A BandCombine element
  1844. associates a single band imported from a Photomap (the red band), with the green band selected from
  1845. the initial RGB image, and the reregistered blue band.  The combined image is then converted to in-
  1846. dex data and exported to a PIXMAP and to a WINDOW.  The color allocation results are saved in a
  1847. ColorList.
  1848.  
  1849. Figure 5-2   Example Photoflo
  1850. Two kinds of Photoflos
  1851. There are stored Photoflos and immediate Photoflos.  Stored Photoflos persist beyond execu-
  1852. tion and may be modified or totally redefined prior to subsequent executions. Immediate Photoflos
  1853. are ephemeral  a single protocol request defines and begins its execution; then, it is automatically
  1854. destroyed upon completion.  Services common to both types of Photoflos are:
  1855. *       Event notification
  1856. *       Error notification
  1857. *       Put data: send data from the client into a Photoflo
  1858. *       Get data: return data exported from a Photoflo back to the client
  1859. *       Query: return information about the Photoflo
  1860. *       Await: block future client requests until the Photoflo completes
  1861. *       Abort: terminate Photoflo execution prematurely
  1862. Multi-client Photoflos
  1863. A stored Photoflo can be executed by a client other than the client that created it.  It is also possi-
  1864. ble that the Photoflo may reference resources that belong to other clients, and data may be supplied
  1865. and retrieved by various clients.  The following rules apply when multiple clients are involved in the
  1866. execution of a Photoflo:
  1867. *       Errors that stem from executing Photoflo elements are sent to the client executing the Photoflo.
  1868. *       Errors that stem from executing client data put or get requests go to the client executing the request.
  1869. *       Colors recorded in a ColorList resource belong to the client executing the Photoflo.
  1870. *       PhotofloDone events are sent to the client executing the Photoflo.
  1871. *       Multiple clients can Await completion of a given Photoflo.
  1872. Photoflo States
  1873. Stored Photoflos enter the Inactive state upon creation and transition to the Active state when exe-
  1874. cution is requested.  Immediate Photoflos are both created and made Active by the execute request.
  1875. A Photoflo remains Active until all ImportClient elements have received a final flag, all export
  1876. elements have finished their task, and all data exported for the client have been retrieved, or an error
  1877. prevents further progress, or the client issues an Abort request.  After execution stored Photoflos
  1878. return to the Inactive state, whereas immediate Photoflos are destroyed (become Nonexistent).
  1879. The client may destroy a stored Photoflo at any time.
  1880.         Stored Photoflo Immediate Photoflo
  1881.  
  1882. Figure 5-3   Photoflo states
  1883. Flo'ing Data to a Resource
  1884. Besides image rendition and display, immediate or stored Photoflos are also used to populate
  1885. XIE resources with data and attributes.  Some form of processing may be applied to the data, but in
  1886. the simplest case, a two element import/export Photoflo is generally sufficient.
  1887. Also all types of ephemeral client data may be imported and used directly by a Photoflo, without the
  1888. necessity of first storing it in an XIE resource.  For example, simple transport of an image
  1889. (compressed or uncompressed) to a WINDOW is expected.
  1890. Import element  Export element  purpose
  1891. ImportClientPhoto       ExportPhotomap  Populate a Photomap resource
  1892. ImportClientLUT ExportLUT       Populate a LUT resource (lookup table)
  1893. ImportClientROI ExportROI       Populate a ROI resource (list-of-rectangles)
  1894. ImportClientPhoto       ExportDrawablePlane     Display a bitonal image in a WINDOW
  1895. ImportClientPhoto       ExportDrawable  Display a COLORMAP index image in a WINDOW
  1896. ImportPhotomap  ExportDrawablePlane     Copy an existing bitonal image to a PIXMAP
  1897. Table 5-1   Examples of two element Photoflo usage
  1898. Name space
  1899. For requests that only apply to stored Photoflos (Create, Modify, Redefine, Execute, and Destroy),
  1900. the Photoflo is identified solely by its resource-id.  For all other requests, events, and errors that ref-
  1901. erence a Photoflo, the Photoflo is identified using type Executable, which is a tupple identifying the
  1902. name-space and flo-id of the Photoflo.
  1903. Name-space for stored Photoflos is always ServerIDSpace (the value zero), and flo-id is the
  1904. Photoflo's resource-id.
  1905. Name-space for immediate Photoflos is a Photospace resource-id, and flo-id  is a 32-bit value that
  1906. uniquely identifies the instance of this Photoflo.
  1907. CreatePhotospace
  1908. XieReqCreatePhotospace
  1909. name-space: XieTypPhotospace
  1910. Errors: Alloc, IDChoice
  1911. Events: none
  1912. CreatePhotospace defines a name-space in which immediate Photoflos may be executed.  Any
  1913. client that needs to instantiate immediate Photoflos must create at least one Photospace.
  1914. Name-space is the resource-id for a new Photospace that can be used to accommodate immediate
  1915. Photoflos instantiated by this client.
  1916. Error   Cause
  1917. Alloc   Insufficient resources
  1918. IDChoice        Invalid name-space
  1919. DestroyPhotospace
  1920. XieReqDestroyPhotospace
  1921. name-space: XieTypPhotospace
  1922. Errors: Photospace
  1923. Events: none
  1924. DestroyPhotospace will destroy a Photospace.  Prior to destroying the Photospace, all Photoflos that
  1925. are currently Active in the Photospace will be aborted, exported data pending client retrieval will be
  1926. freed, and the Photoflos will be destroyed.
  1927. Name-space is the Photospace to be destroyed.
  1928. Error   Cause
  1929. Photospace      Invalid name-space
  1930.  
  1931. Immediate Photoflos
  1932. ExecuteImmediate
  1933. XieReqExecuteImmediate
  1934. instance: XieTypExecutable
  1935. notify: BOOL
  1936. element-list: LISTofXieTypPhotoElement
  1937. Errors: FloAlloc, FloID, FloElement, Flo . . .
  1938. Events: PhotofloDone
  1939. ExecuteImmediate defines and begins execution of an immediate Photoflo.  Execution is asyn-
  1940. chronous.  The Photoflo is destroyed after execution completes and all data exported for the client
  1941. have been retrieved.  It is legal to have multiple unique instances of immediate Photoflos (and
  1942. stored Photoflos) Active concurrently.
  1943. Instance specifies the Photospace/flo-id tupple by which this Photoflo will be identified in other re-
  1944. quests, events, or errors.  Notify specifies whether a PhotofloDone event should be sent upon comple-
  1945. tion.  Element-list defines the import, process, and export elements to be executed.
  1946. If any clients have blocked themselves during the execution of the Photoflo (see Await), they will be-
  1947. come unblocked when photoflo's state changes from Active to Nonexistent.  If notify is true, a Photo-
  1948. floDone event is also generated by this transition.  Finally, this instance is destroyed.
  1949. Error   Cause
  1950. FloAlloc        Insufficient resources
  1951. FloID   Invalid Executable instance
  1952. FloElement      Invalid element-type(s) in element-list
  1953. Flo . . .       See element descriptions for errors detected by elements in element-list
  1954.  
  1955. See ExecutePhotoflo for a general outline of the execution phases of a Photoflo.
  1956.  
  1957. Stored Photoflos
  1958. The following requests are used to: create, modify, redefine, execute, and destroy stored Photoflos.
  1959. In these requests the Photoflo instance is identified only by its resource-id.  However, errors and
  1960. events generated due to these requests identify the instance using type Executable (the name-space is
  1961. ServerIDSpace and the flo-id is the Photoflo's resource-id).
  1962. CreatePhotoflo
  1963. XieReqCreatePhotoflo
  1964. photoflo: XieTypPhotoflo
  1965. element-list: LISTofXieTypPhotoElement
  1966. Errors: Alloc, IDChoice, FloAlloc, FloElement, Flo . . .
  1967. Events: none
  1968. CreatePhotoflo creates a stored Photoflo resource, defines its complete contents, and sets it in the
  1969. Inactive state.
  1970. Photoflo is a new resource-id by which this Photoflo will be identified in other requests, events, or er-
  1971. rors.  Element-list defines the import, process, and export elements to be stored for execution.
  1972. Although resources and parameters are specified at creation, no action is taken to validate them at
  1973. that time.  CreatePhotoflo will only store the Photoflo's definition and parameter validation is de-
  1974. layed until an execute request is received.
  1975. Error   Cause
  1976. Alloc   Insufficient resources for photoflo
  1977. IDChoice        Invalid photoflo
  1978. FloAlloc        Insufficient resources for element-list
  1979. FloElement      Invalid element-type(s) in element-list
  1980. Flo . . .       See element descriptions for errors detected by elements in element-list
  1981. DestroyPhotoflo
  1982. XieReqDestroyPhotoflo
  1983. photoflo: XieTypPhotoflo
  1984. Errors: Photoflo
  1985. Events: none
  1986. DestroyPhotoflo will destroy a stored Photoflo.  If photoflo was Active, it is aborted, and all ex-
  1987. ported data that are pending client retrieval are freed prior to destroying photoflo.
  1988. Photoflo is the Photoflo to be destroyed.
  1989. Error   Cause
  1990. Photoflo        Invalid photoflo
  1991. See also Abort, which terminates a Photoflos execution without destroying it.
  1992. ExecutePhotoflo
  1993. XieReqExecutePhotoflo
  1994. photoflo: XieTypPhotoflo
  1995. notify: BOOL
  1996. Errors: Photoflo, FloAccess, FloAlloc
  1997. Events: PhotofloDone
  1998. ExecutePhotoflo changes a stored Photoflo to the Active state.  Execution is asynchronous.  The
  1999. Photoflo returns to the Inactive state when execution completes and all data exported for the client
  2000. have been retrieved.  It is legal to have multiple stored Photoflos (and immediate Photoflos)
  2001. Active concurrently.
  2002. Photoflo is the Photoflo to be executed.  Notify specifies whether a PhotofloDone event should be
  2003. sent upon completion.
  2004. Conceptually, Photoflo execution is broken into at least three phases :
  2005. 1.      Initialization:
  2006. a.      The Photoflo state is set Active.
  2007. b.      Bind external inputs (XIE reference counts are incremented).
  2008. c.      Imported attributes are propagated downstream.
  2009. d.      Attributes and element parameter values are validated.
  2010. e.      Lookup external destinations.
  2011. f.      Create receptors for data to be exported to XIE resources.2
  2012. 2.      Execution:
  2013. a.      Data from server resources, if any, is pulled into the Photoflo.
  2014. b.      Data from the client, if any, is pushed into the Photoflo (PutClientData).
  2015. c.      Processed data is exported to server resources as required.2
  2016. d.      Processed data is made available for client retrieval (GetClientData).
  2017. 3.      Completion:
  2018. a.      Unbind external inputs.
  2019. b.      Join exported data with associated XIE resources2 and unbind remaining resources.
  2020. c.      Report any error that occurred.
  2021. d.      If notify is true, send a PhotofloDone event.
  2022. e.      If Await has been requested, unblock client execution.
  2023. f.      The Photoflo state is set Inactive.
  2024. If an error occurs during any phase, the client is notified and the Photoflo is terminated.  Other
  2025. events can be sent by individual elements as specified in their descriptions.
  2026. Error   Cause
  2027. Photoflo        Invalid photoflo
  2028. FloAccess       Attempt to execute photoflo when it is already Active
  2029. FloAlloc        Insufficient resources
  2030. Flo . . .       See element descriptions for errors detected by photoflo elements
  2031. ModifyPhotoflo
  2032. XieReqModifyPhotoflo
  2033. photoflo: XieTypPhotoflo
  2034. start: XieTypPhototag
  2035. element-list: LISTofXieTypPhotoElement
  2036. Errors: Photoflo, FloAlloc, FloElement, FloSource, Flo . . .
  2037. Events: none
  2038. ModifyPhotoflo allows element parameters of a stored Photoflo to be modified.
  2039. Photoflo is the Photoflo to be modified.  Start specifies the Phototag where element replacement is to
  2040. begin.  Element-list is a sequential list of elements that will replace existing elements.
  2041. ModifyPhotoflo allows parameter modification only.  No topological changes are allowed.  Elements
  2042. cannot be deleted, inserted, or appended.
  2043. Error   Cause
  2044. Photoflo        Invalid photoflo
  2045. FloAccess       Attempt to change photoflo while it is Active
  2046. FloAlloc        Insufficient resources
  2047. FloElement      Attempt to change element-type(s) in element-list
  2048. Attempt to append additional element(s) to photoflo
  2049. FloSource       Invalid start
  2050. Attempt to change Phototag input connections in element-list
  2051. Flo . . .       See element descriptions for errors detected by elements in element-list
  2052. Multiple ModifyPhotoflo requests can be sent in order to  edit individual elements, but, for greater efficiency and particularly when
  2053. repetitive modify/execute requests are expected, elements can be grouped such that a single ModifyPhotoflo can perform multiple
  2054. element modifications.
  2055. RedefinePhotoflo
  2056. XieReqRedefinePhotoflo
  2057. photoflo: XieTypPhotoflo
  2058. element-list: LISTofXieTypPhotoElement
  2059. Errors: FloAccess, Photoflo. FloAlloc, FloElement, Flo . . .
  2060. Events: none
  2061. RedefinePhotoflo allows all elements of a stored Photoflo to be removed and replaced with a new
  2062. list.  There are no restrictions on changing element types, Phototag sources, or the list's size.
  2063. Photoflo is the Photoflo to be redefined.  Element-list is a sequential list of elements that will replace
  2064. all existing elements.
  2065. Error   Cause
  2066. Photoflo        Invalid photoflo
  2067. FloAccess       Attempt to change photoflo while it is Active
  2068. FloAlloc        Insufficient resources
  2069. FloElement      Invalid element-type(s) in element-list
  2070. Flo . . .       See element descriptions for errors detected by elements in element-list
  2071. RedefinePhotoflo may be considered a hint that the new list of  elements is in some way similar to those being replaced. Rede-
  2072. finePhotoflo can also be used as a means to conserve resource-ids.
  2073. Sending Data to the Server
  2074. PutClientData
  2075. XieReqPutClientData
  2076. instance: XieTypExecutable
  2077. element: XieTypPhototag
  2078. final: BOOL
  2079. band-number: CARD8
  2080. data: XieTypDataStream
  2081. Errors: FloAlloc, FloAccess, FloID, FloElement, FloValue
  2082. Events: none
  2083. PutClientData sends a stream of data to an Active Photoflo.  Because the complete data object may
  2084. be larger than can fit in a single protocol request, XIE allows the stream to be segmented; the last
  2085. segment is signaled with a final flag.
  2086. Instance and element identify the Photoflo and specific ImportClient element to receive the data.
  2087. Final specifies that this is the last (or only) segment of data to be sent.
  2088. If element is a band oriented element, band-number specifies which client band of data is being sent
  2089. (interleave and band-order specified for the ImportClient element or technique determine how
  2090. client bands are mapped to server bands).
  2091. Data is a counted list of bytes that comprises the data stream.  The organization and contents of the
  2092. stream must match the parameters given to the ImportClient element or the results are unde-
  2093. fined.
  2094. An arbitrary amount of image data can be sent per request, whereas for nonimage data one or more
  2095. complete aggregates must be sent per request (for example, one or more LUT array entries).
  2096. If too many data are sent (for example, too many rectangles, or too many scanlines), the unwanted
  2097. data are discarded.  It is an error, however, to send too few data prior to signaling final.
  2098. Error   Cause
  2099. FloAlloc        Insufficient resources
  2100. FloAccess       Executable instance not Active
  2101. FloID   Invalid Executable instance
  2102. FloElement      Invalid Phototag or element-type specified by element
  2103. FloValue        Invalid band-number
  2104. For nonimage data, data contains a partial aggregate
  2105. All types of client data (list-of-rectangles, lookup tables, and images) are transported to the server using PutClientData.  Tiled im-
  2106. ages can be transported using multiple ImportClientPhoto elements, which in turn feed a PasteUp element.
  2107.  
  2108. Retrieving Data from the Server
  2109. GetClientData
  2110. XieReqGetClientData
  2111. instance: XieTypExecutable
  2112. element: XieTypPhototag
  2113. max-bytes: CARD32
  2114. terminate: BOOL
  2115. band-number: CARD8
  2116. *
  2117. new-state: XieTypExportState
  2118. data: XieTypDataStream
  2119. Errors: FloAlloc, FloAccess, FloID, FloElement, FloValue
  2120. Events: none
  2121. GetClientData retrieves data from an ExportClient element within an Active Photoflo.  Data are
  2122. returned in a contiguous read-once byte stream, which can be requested in segments that are limited
  2123. in size by the amount the client desires or the amount available.  The format of the data depends on
  2124. the parameters given to the ExportClient element from which the data are requested.
  2125. Instance and element identify the Photoflo and specific ExportClient element from which to re-
  2126. trieve data.  Max-bytes specifies the maximum number of data bytes that can be sent to the client.
  2127. Terminate is a Boolean that can be used to indicate that no more data are wanted after this request has
  2128. been satisfied.  Band-number specifies which client band is to be retrieved  (interleave and band-
  2129. order parameters specified for the ExportClient element technique determine how server bands
  2130. are mapped to client bands).
  2131. New-state indicates the data availability status of the ExportClient element after satisfying the
  2132. current request.  Data is the counted list of bytes that is returned.
  2133. If terminate is true, new-state will be ExportDone (the ExportClient element will discard any
  2134. remaining data and stop producing additional data).
  2135. If new-state is ExportEmpty and notify (for the ExportClient element) was specified as
  2136. NewData, another ExportAvailable event will be sent when additional data become availabile.
  2137. If the request is sent to an ExportClient element that either does not have any data, was termi-
  2138. nated by a previous GetClientData request, or has already returned all its data (ExportDone sent),
  2139. the request will return a zero length data stream.
  2140. Image data are always retrieved from the server as a byte stream, whereas nonimage data are always
  2141. returned by the server as one or more complete aggregates (that is, max-bytes is effectively rounded
  2142. down by the server to the match the nearest aggregate size).
  2143.  
  2144. Error   Cause
  2145. FloAlloc        Insufficient resources
  2146. FloAccess       Executable instance not Active
  2147. FloID   Invalid Executable instance
  2148. FloElement      Invalid Phototag or element-type specified by element
  2149. FloValue        Invalid band-number
  2150. Servers are required to buffer a nonzero amount of data per ExportClient element.  Beyond that point execution may be sus-
  2151. pended until the client retrieves sufficient data.
  2152. Terminate may be used to prematurely terminate output from an ExportClient element.  If terminate is not used, all data pro-
  2153. duced by the ExportClient element must be retrieved before the Photoflo can leave the Active state.
  2154.  
  2155. Status
  2156. QueryPhotoflo
  2157. XieReqQueryPhotoflo
  2158. instance: XieTypExecutable
  2159. *
  2160. state: XieTypPhotofloState
  2161. data-expected: LISTofXieTypPhototag
  2162. data-available: LISTofXieTypPhototag
  2163. Errors: FloAlloc
  2164. Events: none
  2165. QueryPhotoflo will return the current status of a Photoflo.
  2166. Instance identifies the Photoflo that is being queried.  State indicates the state of the Photoflo.  Data-
  2167. expected is a list of ImportClient elements that are expecting data from the protocol stream.
  2168. Data-available is a list of ExportClient elements from which data for the protocol stream are
  2169. available.  Either or both of these lists may be of length zero.
  2170. Specifying an unknown or invalid instance will result in a reply state of nonexistent and zero length
  2171. data-expected and data-available lists.
  2172. Error   Cause
  2173. FloAlloc        Insufficient resources
  2174.  
  2175. Synchronization
  2176. Await
  2177. XieReqAwait
  2178. instance: XieTypExecutable
  2179. Errors: FloAlloc
  2180. Events: none
  2181. Await blocks all further requests for this client connection from being honored by the server while the
  2182. Photoflo is Active.  When the Photoflo transitions from the Active state, blocked requests are allowed
  2183. to be processed in the order received.
  2184. Instance identifies the Active Photoflo that is to block requests from the client issuing the Await.  If
  2185. instance is invalid or the Photoflo is not Active no action is taken; it is not an error, and the client is
  2186. not blocked.
  2187. Error   Cause
  2188. FloAlloc        Insufficient resources
  2189. If a Photoflo has no ExportClient elements, the client can call Await.  If a Photoflo has exactly one ExportClient ele-
  2190. ment, the client can just read bytes or be event-driven.  If a Photoflo has multiple ExportClient elements, the client should be
  2191. event-driven.
  2192. Warning: Calling Await before sending all import data (including a final flag) or before retrieving all export data will block the cli-
  2193. ent from sending or retrieving the remaining data.  This will also prevent completion of the Photoflo and prevent any and
  2194. all protocol requests from this client from being honored.  This deadlock can only be broken by another client completing
  2195. or  aborting the Photoflo (to release the Await) or by breaking the client connection.
  2196.  
  2197. Termination
  2198. Abort
  2199. XieReqAbort
  2200. instance: XieTypExecutable
  2201. Errors: none
  2202. Events: none
  2203. Abort will prematurely terminate execution of a Photoflo.
  2204. Instance identifies the Photoflo that is to be aborted.  Any output from the Photoflo that is pending
  2205. client retrieval is freed.  If instance is a stored Photoflo it will return to the Inactive state.  Imme-
  2206. diate Photoflos are destroyed.
  2207. If instance is invalid or the Photoflo is not Active no action is taken; it is not an error, and nothing is
  2208. destroyed.
  2209.  
  2210.         Optimization, an additional phase, would be roughly associated with the initialization phase.
  2211.         For LUT, Photomap, and ROI resources refer to page 4-1 Binding Resources to Photoflos.
  2212.         Completion is contingent upon all such data being retrieved by the client.
  2213.  
  2214.  
  2215. Pipelined Processing   5-1
  2216.  
  2217.  
  2218. 6
  2219. Import Elements
  2220. Overview
  2221. Element categories
  2222. Import elements are used to bring external image data into a Photoflo.  Import elements have no Pho-
  2223. totag sources and have one output connection.  There are two types of import elements:
  2224. *       ImportResource  Elements obtain data from a server resource (DRAWABLE, LUT, Photomap, or ROI).
  2225. *       ImportClient    Elements require data from the client.  This data is transported to the server via the PutClient-
  2226. Data protocol request.
  2227. Multi-source images
  2228. Multiple source images (for example, tiled images, multi-client transport, and so on) require a sepa-
  2229. rate import element to describe each segment of the image.  The composite image can then be assem-
  2230. bled using process elements (for example, BandCombine, Blend, and PasteUp).
  2231. Events generated
  2232. Certain import elements can generate events to notify the client about abnormal behavior.  Two such
  2233. events are defined:
  2234. *       DecodeNotify    Notifies the client when anomalies are encountered while decoding a compressed image.  It can
  2235. also be returned if less data are sent than are required to complete an uncompressed image.
  2236. *       ImportObscured  Notifies the client that one or more regions to be imported from a WINDOW are obscured and un-
  2237. available from BACKINGSTORE.
  2238. Import from Client
  2239. ImportClient elements require data from the client.   Element parameters fully specify all the at-
  2240. tributes of the client data and describe the format or organization the data will have as it is trans-
  2241. ported through the protocol stream.  Data is sent to the ImportClient element via the PutClient-
  2242. Data protocol request after the Photoflo becomes Active.
  2243.  
  2244. ImportClientLUT
  2245. XieFloImportClientLUT
  2246. class: XieTypDataClass
  2247. band-order: XieTypOrientation
  2248. length: XieTypTripletofCARD32
  2249. levels: XieTypLevels
  2250. Errors: FloAlloc, FloMatch, FloValue
  2251. Events: none
  2252. ImportClientLUT accepts lookup table data from the protocol stream.  The transport of data through
  2253. the protocol stream is accomplished using PutClientData. These data are accepted by the Point, Ex-
  2254. portLUT, and ExportClientLUT elements.
  2255. Class indicates the number of lookup arrays to expect.  Length specifies the number of entries per ar-
  2256. ray.  Levels is the number of quantization levels represented per array.  Band-order declares the order
  2257. of TripleBand arrays, or the order in which pixels from a TripleBand image should be combined to
  2258. form indices for a SingleBand array .
  2259. The length of each array should match the number of source image levels that will be remapped
  2260. through the array.  When a TripleBand image is to be remapped through a SingleBand array, the
  2261. length of the array should match the product of the source image levels of all three bands1. Table 6-1
  2262. summarizes the class of output data to expect from Point, based on the class of LUT and the class of
  2263. image provided to Point.
  2264. Table 6-1   Relationship between LUT class and image class
  2265. LUT class
  2266. Source image: SingleBand
  2267. Source image: TripleBand
  2268. SingleBand
  2269. ( 1 array )
  2270. Output image: SingleBand
  2271. the single image band is re-mapped
  2272. through the single array
  2273. Usage examples:
  2274. achromatic --> achromatic
  2275. achromatic --> index
  2276. Output image: SingleBand
  2277. pixels from each image band are combined1 and then re-
  2278. mapped through the single array
  2279. Usage examples:
  2280. trichromatic --> index
  2281. trichromatic --> achromatic
  2282. TripleBand
  2283. ( 3 arrays )
  2284. Output image: TripleBand
  2285. the single image band is re-mapped
  2286. through each array separately
  2287. Usage examples:
  2288. achromatic --> false-color
  2289. index----------> trichromatic
  2290. Output image: TripleBand
  2291. each image band is re-mapped through the corresponding
  2292. array
  2293. Usage examples:
  2294. trichromatic --> trichromatic
  2295. The size of each array entry is either 1, 2, or 4 bytes; the smallest size into which the output quanti-
  2296. zation levels can be stored.  When array entries require multiple bytes, the byte order per entry is de-
  2297. termined in the same manner as other numeric data: it is the byte orientation established at core X
  2298. connection setup time.
  2299. Error   Cause
  2300. FloAlloc        Insufficient resources
  2301. FloMatch        levels is incompatible with the server's depth handling capabilities
  2302. FloValue        Invalid class or band-order
  2303. When the client targets data at ImportClientLUT, one or more complete array entries must be sent per protocol request (see PutCli-
  2304. entData).
  2305. ImportClientPhoto
  2306. XieFloImportClientPhoto
  2307. notify: BOOL
  2308. class: XieTypDataClass
  2309. width: XieTypTripletofCARD32
  2310. height: XieTypTripletofCARD32
  2311. levels: XieTypLevels
  2312. decode: XieTypDecodeTechnique
  2313. decode-params: <technique-dependent>
  2314. Errors: FloAlloc, FloMatch, FloValue, FloTechnique
  2315. Events: DecodeNotify
  2316. Attribute       Value
  2317. class   class of imported image
  2318. type    Constrained
  2319. width   width  of imported image (in pixels)
  2320. height  height of imported image (in pixels)
  2321. levels  levels  of imported image
  2322. ImportClientPhoto accepts image data from the protocol stream.  This data may be processed for
  2323. display or used as ProcessDomain data.  The attributes and organization of the expected data stream
  2324. are fully specified by the parameters.  The actual transport of image data through the protocol stream
  2325. is requested using the PutClientData protocol request.
  2326. Notify enables DecodeNotify events to be sent if anomalies are encountered while interpreting the
  2327. imported image data (see DecodeNotify and DecodeTechnique descriptions).  Class specifies the
  2328. DataClass of the data being imported.  Width and height are the  per-band image dimensions in pix-
  2329. els.  Levels is the number of quantization levels per band.  Decode is the DecodeTechnique that will
  2330. be required to decompress the image.  Decode-params is the list of additional parameters required by
  2331. decode.
  2332. Only Constrained data can be sent through the protocol stream; therefore, levels must be valid.
  2333. Error   Cause
  2334. FloAlloc        Insufficient resources
  2335. FloMatch        levels is incompatible with the server's depth handling capabilities
  2336. FloValue        Invalid width, height, levels (zero)
  2337. Invalid class
  2338. FloTechnique    Invalid decode technique or decode-params
  2339. If the imported client data is compressed, ImportClientPhoto is generally responsible for decoding the data prior to forwarding the
  2340. data to downstream elements.  An exception to this would be when an export element is a direct recipient of the data and the element
  2341. desires data that are encoded using the same technique as decode.
  2342. If individual bands of TripleBand data have different widths or heights (for example, down-sampled YCbCr data), it is generally the
  2343. client's responsibility to make inter-band dimensions match to render the image (for example, use Geometry with appropriate band-
  2344. mask and sample technique).  The JPEGBaseline technique that is described in Appendix A, includes a Boolean flag that allows an
  2345. image that is interleaved BandByPixel to be up-sampled as part of the decode function.
  2346. All data and a final indication must be sent for each band before the Photoflo can leave the Active state.  The input data are sent by
  2347. the client using the PutClientData protocol request.  If a subset of client bands are desired, the bands should be imported as individ-
  2348. ual SingleBand images.
  2349.  
  2350. ImportClientROI
  2351. XieFloImportClientROI
  2352. rectangles: CARD32
  2353. Errors: FloAlloc
  2354. Events: none
  2355. ImportClientROI accepts a list-of-rectangles from the protocol stream.  These data can be used as
  2356. input to a ProcessDomain or an ExportROI or ExportClientROI element.  The actual transport of
  2357. data through the protocol stream is accomplished using the PutClientData protocol request (the
  2358. band-number parameter of PutClientData is ignored).
  2359. Rectangles specifies the number of rectangles expected.
  2360. Each rectangle is described using numeric values (see Rectangle); as such, the byte order of such data
  2361. is determined at core protocol connection setup time.
  2362. Error   Cause
  2363. FloAlloc        Insufficient resources
  2364. When the client targets data at ImportClientROI, one or more complete Rectangles must be sent per protocol request (see PutCli-
  2365. entData).
  2366.  
  2367. Import from Resource
  2368. ImportResource elements obtain data from server resources: core DRAWABLEs, and XIE LUT,
  2369. Photomap, and ROI resources.
  2370. The attributes and data of XIE resources are bound to ImportResource elements when the Photo-
  2371. flo becomes Active.  The same resource may also be the target of an ExportResource element in
  2372. the same Photoflo.  However, the association between the resource's identifier (XID) and the new at-
  2373. tributes and data does not occur until the Photoflo successfully completes (that is, leaves the Active
  2374. state).   (See Binding Resources to Photoflos in Chapter 4.)
  2375. ImportDrawable
  2376. XieFloImportDrawable
  2377. notify: BOOL
  2378. drawable: DRAWABLE
  2379. src-x: INT16
  2380. src-y: INT16
  2381. width: CARD16
  2382. height: CARD16
  2383. fill: CARD32
  2384. Errors: FloAlloc, FloDrawable, FloValue
  2385. Events: ImportObscured
  2386. Attribute       Value
  2387. class   SingleBand
  2388. type    Constrained
  2389. width   width
  2390. height  height
  2391. levels  2depth (that is, drawable depth)
  2392. ImportDrawable allows access to data existing in a DRAWABLE.  This data may be processed for
  2393. display or, if drawable is a BITMAP, used as ProcessDomain data.
  2394. Notify enables ImportObscured events to be sent if data for one or more regions of a WINDOW are
  2395. obscured and unavailable from BACKINGSTORE (see ImportObscured).  Drawable is the
  2396. DRAWABLE resource supplying the data.  Src-x, src-y, width, and height specify the region of data to
  2397. be imported from drawable.  Fill is the COLORMAP index to use for all regions that are obscured.
  2398. Error   Cause
  2399. FloAlloc        Insufficient resources
  2400. FloDrawable     Invalid drawable
  2401. FloValue        Invalid region (src-x, src-y, width, height)
  2402. The data are imported as ZPixmap format COLORMAP indices (that is, SingleBand index data).  Index data are appropriate for
  2403. only a few process elements (for example, where a nearest-neighbor technique is used).  ConvertFromIndex can be used to convert
  2404. index data prior to feeding it to other process elements.  Compare can also be used to produce bitonal data from index data.
  2405.  
  2406. ImportDrawablePlane
  2407. XieFloImportDrawablePlane
  2408. notify: BOOL
  2409. drawable: DRAWABLE
  2410. src-x: INT16
  2411. src-y: INT16
  2412. width: CARD16
  2413. height: CARD16
  2414. fill: CARD32
  2415. bit-plane: CARD32
  2416. Errors: FloAlloc, FloDrawable, FloValue
  2417. Events: ImportObscured
  2418. Attribute       Value
  2419. class   SingleBand
  2420. type    Constrained
  2421. width   width
  2422. height  height
  2423. levels  2
  2424. ImportDrawablePlane allows access to a single plane of data existing in a DRAWABLE.  This data
  2425. may be processed for display or  used as ProcessDomain data.
  2426. Notify enables ImportObscured events to be sent if data for one or more regions of a WINDOW are
  2427. obscured and unavailable from BACKINGSTORE (see ImportObscured).  Drawable is the
  2428. DRAWABLE resource supplying the data.  Src-x, src-y, width, and height specify the region of data to
  2429. be imported from drawable.  Fill is the value to substitute for all regions that are obscured.  Bit-plane
  2430. specifies the plane to be imported from drawable.
  2431. Bit-plane must have exactly one bit set to one (1), and the value of bit-plane must be less than 2n,
  2432. where n is the depth of drawable.  This single bit selects the corresponding bit to be extracted from
  2433. pixels within drawable.
  2434. Error   Cause
  2435. FloAlloc        Insufficient resources
  2436. FloDrawable     Invalid drawable
  2437. FloValue        Invalid bit-plane or region (src-x, src-y, width, height)
  2438.  
  2439. ImportLUT
  2440. XieFloImportLUT
  2441. lut: XieTypLUT
  2442. Errors: FloAlloc, FloAccess, FloLUT
  2443. Events: none
  2444. ImportLUT allows access to lookup table data existing in a LUT resource.  These data are accepted
  2445. by the Point, ExportLUT, and ExportLUT elements.
  2446. Lut is the LUT resource supplying the lookup table.  Attributes of the lookup table data are inherited
  2447. from lut.
  2448. Error   Cause
  2449. FloAlloc        Insufficient resources
  2450. FloAccess       Attempting to import from lut before it has been populated
  2451. FloLUT  Invalid lut
  2452.  
  2453. ImportPhotomap
  2454. XieFloImportPhotomap
  2455. notify: BOOL
  2456. photomap: XieTypPhotomap
  2457. Errors: FloAlloc, FloAccess, FloPhotomap
  2458. Events: DecodeNotify
  2459. Attribute       Value
  2460. class   Same as photomap
  2461. type    Same as photomap
  2462. width   Same as photomap
  2463. height  Same as photomap
  2464. levels  Same as photomap
  2465. ImportPhotomap allows access to image data existing in a Photomap.  This data may be processed
  2466. for display or used as ProcessDomain data.
  2467. Notify enables DecodeNotify events to be sent if anomalies are encountered while decoding com-
  2468. pressed data (see DecodeNotify and the DecodeTechnique descriptions).  Photomap is the Photomap
  2469. resource supplying image data.
  2470. Attributes of the source data are inherited from photomap.
  2471. Error   Cause
  2472. FloAlloc        Insufficient resources
  2473. FloAccess       Attempting to import from photomap before it has been populated
  2474. FloPhotomap     Invalid photomap
  2475. If the data imported from photomap are compressed, ImportPhotomap is generally responsible for decoding the data prior to for-
  2476. warding the data to downstream elements.  An exception to this would be when an export element is a direct recipient of the data and
  2477. the data are already encoded using the technique desired by the export element.
  2478. If individual bands of TripleBand, BandByPlane data have different widths or heights (for example, down-sampled YCbCr data), it
  2479. is generally the client's responsibility to make inter-band dimensions match to render the image (for example, use Geometry with ap-
  2480. propriate band-mask and sample technique).  If ImportPhotomaps input data are TripleBand, BandByPixel, the dimensions of
  2481. the output bands will match even if the encoded input data are down-sampled.
  2482.  
  2483.  
  2484. ImportROI
  2485. XieFloImportROI
  2486. roi: XieTypROI
  2487. Errors: FloAlloc, FloAccess, FloROI
  2488. Events: none
  2489. ImportROI allows access to a list-of-rectangles existing in a ROI resource.  This data may be refer-
  2490. enced by a ProcessDomain.
  2491. Roi is the ROI resource supplying the list-of-rectangles.
  2492. Error   Cause
  2493. FloAlloc        Insufficient resources
  2494. FloAccess       Attempting to import from roi before it has been populated
  2495. FloROI  Invalid roi
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518. almost blank
  2519.  
  2520.         For SingleBand LUTs, Point combines TripleBand src pixel values to provide a compact array indexing scheme.  The algorithm
  2521. is presented in Figure 7-4.
  2522.  
  2523.  
  2524. Import Elements   6-9
  2525.  
  2526.  
  2527. 7
  2528. Process Elements
  2529. Overview
  2530. Process elements have one or more Phototag sources and have one output connection.  Each process
  2531. element applies a specific operation to image data within an Active Photoflo.  Some process elements
  2532. perform their operation on a single source of image data (for example, Geometry).  Others, operate
  2533. on either a pair of image sources or an image and a constant (for example, Logical).  BandCombine
  2534. associates bands from three SingleBand image sources to form a TripleBand image.  PasteUp can
  2535. combine multiple images (tiles) to form a composite image.
  2536. The ConvertToIndex element can generate an event to notify the client about color allocation results.
  2537. A process element will not be involved in the execution of a Photoflo if there is no eventual consumer
  2538. of its output (that is, no terminating export element).
  2539. Limiting the Process
  2540. Processing may be limited to a subset of the bands present and a subset of pixels within the processed
  2541. bands.  Data falling outside the selection criteria are passed through unaffected by the element's proc-
  2542. ess.
  2543. Process Selected Bands
  2544. Some process elements accept a band-mask to restrict processing to a subset of the source data bands.
  2545. Only bands selected by the band-mask are subject to processing.  Other bands present in the image are
  2546. passed through to the output.  For example: a band-mask of 0012 indicates that only the least signifi-
  2547. cant band would be processed (see Orientation for a definition of band ordering).
  2548. Process Intersecting Pixels
  2549. Dyadic process elements can accept a pair of data sources.  These sources are spatially registered at
  2550. their origins (upper left corners).  Their class and type must match, but their dimensions (width and
  2551. height) need not match.  The dimensions of the output are determined by src-1.  Processing is spa-
  2552. tially restricted to the intersection of the sources on a per-band basis.  Data from src-1 that do not in-
  2553. tersect with src-2 are passed through to the output.
  2554. Process Selected Pixels
  2555. Some process elements accept a processing domain (ProcessDomain) to restrict processing to a subset
  2556. of the source data pixels.  The processing domain represents either a list-of-rectangles or a bi-level
  2557. SingleBand control-plane.
  2558. A processing domain contains an x,y coordinate pair to spatially position the overall processing do-
  2559. main relative to the origin of the source(s).  It also contains a Phototag that  references the import or
  2560. process element that supplies the processing domain data.  The element referenced by the Phototag
  2561. may provide the following:
  2562. *       list-of-rectangles      Imported using ImportROI or ImportClientROI.  Processing is restricted to the intersection of
  2563. the data source(s) and any rectangle within the list.
  2564. *       control-plane   Imported using ImportDrawable, ImportDrawablePlane, ImportPhotomap, or ImportCli-
  2565. entPhoto; or the output of an upstream process element (for example, Compare).  Processing is
  2566. restricted to the intersection of the data source(s) and nonzero locations within the control-plane.
  2567. Processing is not restricted if Phototag zero (0) is specified as the process domains data source.
  2568.  
  2569. Figure 7-1   Combining two sources using a control plane  Logical:  Copy
  2570. Data Types
  2571. In XIE, an image consists of one or three arrays of pixels, each of which is measured in terms of its
  2572. width, height, and depth.  Each array, which represents a chromatic band of image data, is dimen-
  2573. sioned independently.  The depth component of each array is expressed in quantization levels or the
  2574. potential dynamic range of the pixels.  All process elements within XIE are capable of operating on
  2575. image data that have a fixed number of quantization levels.  These data are said to be Constrained
  2576. such that the minimum possible intensity value of a pixel is zero (0), and the maximum possible in-
  2577. tensity level is the number of quantization levels minus one.
  2578. With the exception of operations that specifically change the number of quantization levels (for ex-
  2579. ample, Dither) all other operations that are performed on Constrained data will maintain the levels
  2580. attribute from input to output.  An operation that computes a negative pixel value will set the result-
  2581. ing pixel to zero.  Likewise, an operation that computes a pixel value that would exceed the levels at-
  2582. tribute of the data will saturate the resulting pixel at its maximum allowable value (that is, levels-1).
  2583. This method of constraining image data is equivalent to the HardClip Constrain technique.
  2584. For some operations (for example, Arithmetic operations), it is desirable to allow pixel values to
  2585. stray beyond their Constrained values.  Such data are said to be Unconstrained and may contain
  2586. negative values, fractional values, or other values that might be beyond the normal display capabili-
  2587. ties of a frame buffer. Performing a sequence of image operations on Unconstrained image data al-
  2588. lows the maximum degree of precision to be maintained throughout the process (although there may
  2589. be a cost in performance, depending on the server's capabilities).  Several XIE process elements are
  2590. capable of operating on either Constrained or Unconstrained data.  These elements always output the
  2591. same DataType as they are fed at their inputs.  An exception to this rule is that certain colorspace
  2592. conversion techniques can accept either DataType but are only capable of outputting Unconstrained
  2593. data.
  2594.  
  2595. XIE provides a complementary pair of elements for converting image data between these two proc-
  2596. essing styles.  The Unconstrain element simply removes the normal levels restrictions from the data.
  2597. The Constrain element provides a means of bringing the data back into a Constrained range.  A va-
  2598. riety of techniques are available for this purpose that allow the pixel values to be level-shifted, scaled,
  2599. clipped, rounded, and so on
  2600. Process Categories
  2601. *       Area elements
  2602.         Convolve        Specifies an area of input pixels is involved in producing each output
  2603. pixel (controlled by a convolution kernel).
  2604. *       Format conversion elements
  2605.         ConvertFromIndex        Specifies convert index data to achromatic or trichromatic data.
  2606.         ConvertFromRGB  Specifies convert RGB data to another trichromatic colorspace.
  2607.         ConvertToIndex  Specifies convert achromatic or trichromatic data to index data.
  2608.         ConvertToRGB    Specifies convert non-RGB trichromatic data to RGB data.
  2609. *       Dyadic elements: process either two images or an image and a constant
  2610.         Arithmetic      Specifies an arithmetic operation is performed between two images or
  2611. an image and a constant.
  2612.         Blend   Specifies combine two images or an image and a constant.
  2613.         Compare         Specifies two images or an image and a constant are compared to
  2614. generate a Boolean bitmap result.
  2615.         Logical Specifies perform logical bit-wise operations on an image, between
  2616. two images, or between an image and a constant.
  2617. *       Geometric elements
  2618.         Geometry        Specifies general affine transform (provides crop, mirror, scale, shear,
  2619. rotate, translate, and combinations thereof).
  2620.         PasteUp Specifies an N-input translate operation that  reconstructs an image
  2621. from various source tiles.
  2622. *       Point elements
  2623.         Math    Specifies apply a mathematical operation to each pixel.
  2624.         Point   Specifies remap each pixel value through a lookup table.
  2625. *       Radiometric elements
  2626.         BandCombine     Specifies merge three SingleBand images.
  2627.         BandExtract     Specifies extract SingleBand data from a trichromatic source.
  2628.         BandSelect      Specifies select a single band of data from a trichromatic source.
  2629.         Constrain       Specifies constrain an image to a fixed number of quantization levels.
  2630.         Dither  Specifies reduce image quantization levels through an area technique.
  2631.         MatchHistogram  Specifies transform an image to have a specific histogram shape.
  2632.         Unconstrain     Specifies remove the normal levels restrictions from the image data.
  2633. Process Definitions
  2634. The complete list of process PhotoElements follows in alphabetical order.
  2635. Arithmetic
  2636. XieFloArithmetic
  2637. src-1: XieTypPhototag
  2638. src-2: XieTypPhototag
  2639. domain: XieTypProcessDomain
  2640. constant: XieTypConstant
  2641. operator: XieTypArithmeticOp
  2642. band-mask: CARD8
  2643. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloOperator, FloValue
  2644. Events: none
  2645. Attribute       Value
  2646. class   Same as src-1
  2647. type    Same as src-1
  2648. width   Same as src-1
  2649. height  Same as src-1
  2650. levels  Same as src-1
  2651. Arithmetic produces output data by performing an addition, subtraction, minimum, or maximum op-
  2652. eration between two data sources or between a single data source and a constant.  Furthermore, multi-
  2653. plication, division, or gamma correction may by applied to a single data source.
  2654. When two sources are involved, src-1 and src-2 are the Phototags of the elements supplying source
  2655. data (constant is ignored). If the operation is to involve a constant, src-1 is one operand, src-2 must be
  2656. zero, and constant is used as the other operand.  Domain may control the subset of source data that
  2657. will be operated upon.  Operator is the arithmetic operation to be performed.  Band-mask specifies
  2658. which bands are to be operated upon.
  2659. When two sources are involved, all attributes, other than width and height, must match; all output at-
  2660. tributes are inherited from src-1.
  2661. Pixel computations that would lead to errors will yield valid server-dependent values (for example,
  2662. dividing by a Constrained pixel value of zero might result in a value of levels-1) .  Using band-mask
  2663. to select source data that have two (2) or less levels is not permitted.
  2664. Error   Cause
  2665. FloAlloc        Insufficient resources
  2666. FloSource       Invalid src-1 or src-2
  2667. src-2 has been specified with a monadic  operator (for example, Div or Gamma)
  2668. FloDomain       Invalid domain
  2669. FloMatch        class, type, or levels differs between src-1 and src-2
  2670. Selected source data are bitonal (that is, 2 or less levels)
  2671. FloOperator     Invalid operator
  2672.  
  2673. BandCombine
  2674. XieFloBandCombine
  2675. src-1: XieTypPhototag
  2676. src-2: XieTypPhototag
  2677. src-3: XieTypPhototag
  2678. Errors: FloAlloc, FloSource, FloMatch
  2679. Events: none
  2680. Attribute       Value
  2681. class   TripleBand
  2682. type    Same as src-1
  2683. width   Same as srcs
  2684. height  Same as srcs
  2685. levels  Same as srcs
  2686. BandCombine merges three SingleBand data sources to produce a TripleBand result.
  2687. Src-1, src-2, and src-3 are the Phototags of the elements supplying source data.  All three sources
  2688. must be of the same type, and each source must be SingleBand.  Other attributes that  are taken from
  2689. the individual sources may differ.  The output will be TripleBand.
  2690. No subsetting by ProcessDomain is provided.
  2691. Error   Cause
  2692. FloAlloc        Insufficient resources
  2693. FloSource       Invalid src-1, src-2, or src-3
  2694. FloMatch        A source has more than one band
  2695. type differs between sources
  2696.  
  2697. BandExtract
  2698. XieFloBandExtract
  2699. src: XieTypPhototag
  2700. coefficients: XieTypConstant
  2701. bias: XieTypFloat
  2702. levels: CARD32
  2703. Errors: FloAlloc, FloSource, FloMatch
  2704. Events: none
  2705. Attribute       Value
  2706. class   SingleBand
  2707. type    Same as src
  2708. width   Same as src
  2709. height  Same as src
  2710. levels  levels or unknown (see text)
  2711. BandExtract produces SingleBand output data from a TripleBand source by multiplying a pixel
  2712. value from each source band by its corresponding coefficient and then summing the results with the
  2713. bias value.
  2714. Src is the Phototag of the element supplying source data.  Coefficients is a three (3) element array
  2715. that determines the proportion of each source band pixel that is used to form the output.  The bias
  2716. value is added to each output pixel.  Levels is used as the levels attribute of the output data if the src
  2717. data are Constrained; otherwise, it is ignored.
  2718. The source data must be TripleBand, and all bands must have equal dimensions. The output data will
  2719. be SingleBand with levels taken from the levels parameter if type is Constrained.  All other attrib-
  2720. utes are inherited from src.
  2721. No subsetting by ProcessDomain is provided (the entire image is processed).
  2722. Error   Cause
  2723. FloAlloc        Insufficient resources
  2724. FloSource       Invalid src
  2725. FloMatch        src is not TripleBand
  2726. Unequal inter-band dimensions (width or height)
  2727. BandExtract can be used to extract a band of luminance data from an RGB image.  It can also be used to compute COLORMAP in-
  2728. dices in cases where the contents of the COLORMAP is well ordered (for example, a Standard-COLORMAP or a TrueColor
  2729. visual).
  2730.  
  2731. BandSelect
  2732. XieFloBandSelect
  2733. src: XieTypPhototag
  2734. band-number: CARD8
  2735. Errors: FloAlloc, FloSource, FloMatch, FloValue
  2736. Events: none
  2737. Attribute       Value
  2738. class   SingleBand
  2739. type    Same as src
  2740. width   Same as band selected from src
  2741. height  Same as band selected from src
  2742. levels  Same as band selected from src
  2743. BandSelect produces SingleBand output data by selecting a single band from a TripleBand source.
  2744. Src is the Phototag of the element supplying source data.  Band-number specifies which src band is to
  2745. be selected to provide the output data.
  2746. No subsetting by ProcessDomain is provided.
  2747. Error   Cause
  2748. FloAlloc        Insufficient resources
  2749. FloSource       Invalid src
  2750. FloMatch        src is not TripleBand
  2751. FloValue        Invalid band-number
  2752.  
  2753. Blend
  2754. XieFloBlend
  2755. src-1: XieTypPhototag
  2756. src-2: XieTypPhototag
  2757. alpha: XieTypPhototag
  2758. constant: XieTypConstant
  2759. alpha-const: XieTypFloat
  2760. domain: XieTypProcessDomain
  2761. band-mask: CARD8
  2762. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloValue
  2763. Events: none
  2764. Attribute       Value
  2765. class   Same as src-1
  2766. type    Same as src-1
  2767. width   Same as src-1
  2768. height  Same as src-1
  2769. levels  Same as src-1
  2770. Blend produces output data from two data sources or a single data source and a constant.  Each out-
  2771. put pixel is a percentage combination of the source values, as controlled by the alpha input or the al-
  2772. pha constant.
  2773. When two sources are involved, src-1 and src-2 are the Phototags of the elements supplying source
  2774. data (constant is ignored).  If the operation is to involve a constant, src-1 is one operand, src-2 must
  2775. be zero, and constant is used as the other operand.  If alpha is nonzero, it controls the blend propor-
  2776. tion for each pixel that is processed; otherwise,  alpha-const provides this control.  Domain may con-
  2777. trol the subset of source data that will be operated upon.  Band-mask specifies which bands are to be
  2778. operated upon.
  2779. When two sources are involved, all attributes, other that width and height, must match. If alpha is
  2780. nonzero, it must be a source of Constrained data. Using band-mask to select source data that have
  2781. two (2) or less levels is not permitted.
  2782. Within the intersection of the source(s) and domain, each output pixel is a blend of the corresponding
  2783. pixels from src-1 and src-2 (or src-1 pixels blended with constant).  The degree of blend is deter-
  2784. mined by the corresponding value taken from alpha or the value of alpha-const.  If alpha is nonzero,
  2785. the proportion of blend is further scaled by alpha-const:
  2786.         output = src-1 * (1 - alpha / alpha-const) + src-2 * (alpha / alpha-const)
  2787.                 (where alpha-const is greater than 0.0).
  2788. If alpha is zero:
  2789.         output = src-1 * (1 - alpha-const) + src-2 * alpha-const
  2790.                 (where alpha-const is in the range [0.0, 1.0]).
  2791. Error   Cause
  2792. FloAlloc        Insufficient resources
  2793. FloSource       Invalid src-1, src-2, or alpha
  2794. FloDomain       Invalid domain
  2795. FloMatch        Incompatible attributes between src-1 and src-2
  2796. alpha is Unconstrained
  2797. Selected source data are bitonal (that is, 2 or less levels)
  2798. FloValue        alpha is zero and alpha-const is outside the range [0.0, 1.0]
  2799. alpha is nonzero and alpha-const is zero or negative
  2800. Compare
  2801. XieFloCompare
  2802. src-1: XieTypPhototag
  2803. src-2: XieTypPhototag
  2804. domain: XieTypProcessDomain
  2805. constant: XieTypConstant
  2806. operator: XieTypCompareOp
  2807. combine: BOOL
  2808. band-mask: CARD8
  2809. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloOperator
  2810. Events: none
  2811. Attribute       Value
  2812. class   See text
  2813. type    Constrained
  2814. width   Same as src-1
  2815. height  Same as src-1
  2816. levels  2 per band (see text)
  2817. Compare takes two data sources or a single data source and a constant and generates a Boolean bit-
  2818. map output that  reflects the results of a point-wise comparison.  The output data has a value of one
  2819. (1) wherever the comparison is true, and a value of zero (0) everywhere else (that is, comparison false
  2820. or comparison not performed).  Compare may be requested on a per-band basis, or for all bands
  2821. taken together.
  2822. When two sources are involved, src-1 and src-2 are the Phototags of the elements supplying source
  2823. data (constant is ignored). If the operation is to involve a constant, src-1 is one operand, src-2 must be
  2824. zero, and constant is used as the other operand.  Domain may control the subset of source data that
  2825. will be compared.  Operator is the logical predicate operator used in the comparison. Combine is a
  2826. Boolean that  determines if the comparison should be done on a per-band basis or on an all bands ba-
  2827. sis.  Band-mask specifies which bands are to be involved.
  2828. If combine is true or src-1 is SingleBand, the output data will form a single Boolean bitmap.  If src-1
  2829. is TripleBand and combine is false, the output data will yield three separate Boolean bitmaps (for this
  2830. case band-mask must specify all bands).
  2831. If src-1 is TripleBand and combine is true, only the EQ and NE operators are allowed;  equality is
  2832. established for each band selected by band-mask, and then the result is logically ANDed to derive
  2833. equality (inequality is a logical NOT of this result).  For this case, width and height must match for all
  2834. bands selected by band-mask.
  2835. combine
  2836. input class
  2837. band-mask
  2838. output class
  2839. True
  2840. SingleBand
  2841. TripleBand
  2842. n/a
  2843. selected bands
  2844. SingleBand
  2845. SingleBand
  2846. False
  2847. SingleBand
  2848. TripleBand
  2849. n/a
  2850. all bands
  2851. SingleBand
  2852. TripleBand
  2853. Table 7-1   Compare parameter and DataClass dependencies
  2854. When two sources are involved, all attributes, other than width and height, must match.  The com-
  2855. parison is performed over the intersect of the source(s) as restricted by domain.  All points not com-
  2856. pared are given the value zero (0).
  2857. Error   Cause
  2858. FloAlloc        Insufficient resources
  2859. FloSource       Invalid src-1 or src-2
  2860. FloDomain       Invalid domain
  2861. FloOperator     Invalid operator
  2862. FloMatch        Class differs between src-1 and src-2
  2863. Invalid combination of operator and combine
  2864. TripleBand, and combine is false, and band-mask incomplete
  2865. Compare does not support inter-band distance metrics therefore, combined  LT, LE, GT, and GE operators are not supported. Cli-
  2866. ents may implement these using other elements in concert with Compare.
  2867. Typical uses for Compare include: creating data to be used as a control-plane for a ProcessDomain and converting index data into
  2868. bitonal image data.
  2869.  
  2870. Constrain
  2871. XieFloConstrain
  2872. src: XieTypPhototag
  2873. levels: XieTypLevels
  2874. constrain: XieTypConstrainTechnique
  2875. constrain-params: <technique-dependent>
  2876. Errors:: FloAlloc, FloSource, FloTechnique
  2877. Events: none
  2878. Attribute       Value
  2879. class   Same as src
  2880. type    Constrained
  2881. width   Same as src
  2882. height  Same as src
  2883. levels  levels
  2884. Constrain applies a quantization model to the image data to convert the data to a fixed number of
  2885. quantization levels.  Application of the quantization model may involve steps such as range shifting,
  2886. scaling, clipping, and rounding.
  2887. Src is the Phototag of the element supplying source data.  Levels is the number of quantization levels
  2888. desired in the output data.  Constrain specifies the ConstrainTechnique to be used when constraining
  2889. the data.  Constrain-params is the list of additional parameters required by constrain.
  2890. If the input image is already Constrained the data will be re-Constrained.
  2891. No subsetting by band mask or ProcessDomain is provided (the entire image is Constrained).
  2892. Error   Cause
  2893. FloAlloc        Insufficient resources
  2894. FloSource       Invalid src
  2895. FloTechnique    Invalid constrain technique or constrain-params
  2896.  
  2897. ConvertFromIndex
  2898. XieFloConvertFromIndex
  2899. src: XieTypPhototag
  2900. colormap: COLORMAP
  2901. class: XieTypDataClass
  2902. precision: CARD8
  2903. Errors: FloAlloc, FloSource, FloColormap, FloMatch, FloValue
  2904. Events: none
  2905. Attribute       Value
  2906. class   class
  2907. type    Constrained
  2908. width   Same as src
  2909. height  Same as src
  2910. levels  2precision (per band)
  2911. ConvertFromIndex converts COLORMAP index data into achromatic or trichromatic data.
  2912. Src is the Phototag of the element supplying source data.  Colormap is the COLORMAP from which to
  2913. obtain the value for each output pixel.  Class specifies the DataClass of the desired output data.  Pre-
  2914. cision specifies how many bits (most significant) are to be used from the red, green, and blue values
  2915. found in colormap.
  2916. If class is SingleBand and a trichromatic colormap is specified (StaticColor, PseudoColor,
  2917. TrueColor, or DirectColor), the gray shade for each pixel is taken from the red values in col-
  2918. ormap.  If class is TripleBand and an achromatic colormap is specified (StaticGray or Gray-
  2919. Scale), the red band will be replicated to populate the green and blue output bands.
  2920. The depth of colormap must match the levels attribute of src (that is, 2depth must equal levels).
  2921. No subsetting by band mask or ProcessDomain is provided (the entire image is converted).
  2922. Error   Cause
  2923. FloAlloc        Insufficient resources
  2924. FloSource       Invalid src
  2925. FloColormap     Invalid colormap
  2926. FloMatch        levels of src do not match depth of colormap
  2927. FloValue        Invalid class or precision
  2928. To achieve predictable results, the client should not modify colormap cells referenced by the source data while the Photoflo is Active
  2929. (see Await for synchronization help).
  2930. A value of bitsPerRGBValue or less (defined in the VISUAL of colormap) is usually appropriate for precision.
  2931. Compare can be used to convert index data into bitonal data.  Use ConvertFromIndex followed by BandExtract to convert col-
  2932. ored index data into full fidelity achromatic data.
  2933.  
  2934. ConvertFromRGB
  2935. XieFloConvertFromRGB
  2936. src: XieTypPhototag
  2937. convert: XieTypConvertFromRGBTechnique
  2938. convert-params: <technique-dependent>
  2939. Errors:: FloAlloc, FloSource, FloMatch, FloTechnique
  2940. Events: none
  2941. Attribute       Value
  2942. class   TripleBand
  2943. type    convert technique dependent
  2944. width   Same as src
  2945. height  Same as src
  2946. levels  convert technique dependent
  2947. ConvertFromRGB converts RGB source data to an alternate colorspace.
  2948. Src is the Phototag of the element supplying source data (RGB assumed).  Convert is the Convert-
  2949. FromRGBTechnique that will be used in the conversion to the destination colorspace.  Convert-
  2950. params is the list of additional parameters required by convert.
  2951. In addition to colorspace conversion, some techniques allow for adjusting the white point of the out-
  2952. put data (see Appendix A, Convert From RGB Technique, for more information on conversion
  2953. techniques).
  2954. The source data must be TripleBand, and all bands must have equal dimensions. The type and levels
  2955. of the output data are determined by convert technique parameters.  All other attributes are inherited
  2956. from src.
  2957. No subsetting by ProcessDomain is provided (the entire image is processed).
  2958. Error   Cause
  2959. FloAlloc        Insufficient resources
  2960. FloSource       Invalid src
  2961. FloMatch        src is not TripleBand
  2962. Unequal inter-band dimensions (width or height)
  2963. FloTechnique    Invalid convert or convert-params
  2964.  
  2965. ConvertToIndex
  2966. XieFloConvertToIndex
  2967. notify: BOOL
  2968. src: XieTypPhototag
  2969. colormap: COLORMAP
  2970. color-list: XieTypColorList
  2971. color-alloc: XieTypColorAllocTechnique
  2972. color-alloc-params: <technique-dependent>
  2973. Errors: FloAlloc, FloSource, FloColormap, FloColorList, FloMatch, FloValue
  2974. Events: none
  2975. Attribute       Value
  2976. class   SingleBand
  2977. type    Constrained
  2978. width   Same as src
  2979. height  Same as src
  2980. levels  2depth (that is, colormap depth)
  2981. ConvertToIndex allocates and/or matches colors or gray shades, as required, from a COLORMAP.  It
  2982. produces pixel indices as output data, and records indices that it allocates in a ColorList.  The speci-
  2983. fied color-alloc technique may generate a ColorAlloc event to warn the client that results are of
  2984. lesser fidelity than desired.
  2985. Notify allows the client to be notified about inferior results from color allocation or matching.  Src is
  2986. the Phototag of the element supplying Constrained source data.  Colormap is the COLORMAP from
  2987. which colors or gray shades are allocated and/or matched.  Color-list is the ColorList where allocated
  2988. COLORMAP indices are to be stored.  Color-alloc specifies the desired ColorAllocTechnique.  Color-
  2989. alloc-params is the list of additional parameters required by color-alloc.
  2990. Color-list is purged of any colors it already contains when Photoflo execution begins.  Allocated
  2991. COLORMAP indices can be freed using PurgeColorList, DestroyColorList, or by making color-list
  2992. the target of an Active Photoflo.
  2993. Error   Cause
  2994. FloAlloc        Insufficient resources
  2995. FloSource       Invalid src
  2996. FloColormap     Invalid colormap
  2997. FloColorList    Invalid color-list
  2998. FloAccess       color-list is already being used by another Active Photoflo
  2999. FloMatch        Unequal inter-band dimensions (width or height) or Unconstrained src data
  3000. FloTechnique    Invalid color-alloc technique or color-alloc-params
  3001. ConvertToIndex is usually a preparatory step for an ExportDrawable element.  Alternatively, continuous-tone data can be con-
  3002. verted to a fixed palette of COLORMAP index entries using Point.  Or BandExtract can be used if the COLORMAP contains a ramp
  3003. of colors or gray shades (for example, a Standard-COLORMAP or a TrueColor visual).  Bitonal image data can be pre-
  3004. sented directly to ExportDrawablePlane, allowing the GCONTEXT mechanism to translate ones and zeros in the image into fore-
  3005. ground and background colors in the DRAWABLE.
  3006. If colormap is static, image colors or gray shades must be matched to those available in colormap.  Because no cells are actually
  3007. allocated, color-list can be specified as zero (0).  Of the three standard techniques defined in this document only, ColorAlloc_Match
  3008. is appropriate for static COLORMAPs.  If colormap is dynamic, image colors or gray shades may be matched or allocated from
  3009. colormap depending on the color-alloc technique; colormap and the list of cells actually allocated are stored in color-list.
  3010. Although the three standard techniques defined in this document allocate read-only cells, ConvertToIndex could be extended with
  3011. private techniques that allocate, match, or write into read-write cells.
  3012.  
  3013. ConvertToRGB
  3014. XieFloConvertToRGB
  3015. src: XieTypPhototag
  3016. convert: XieTypConvertToRGBTechnique
  3017. convert-params: <technique-dependent>
  3018. Errors: FloAlloc, FloSource, FloTechnique
  3019. Events: none
  3020. Attribute       Value
  3021. class   TripleBand
  3022. type    convert technique dependent
  3023. width   Same as src
  3024. height  Same as src
  3025. levels  convert technique dependent
  3026. ConvertToRGB converts alternate colorspace source data into RGB data.
  3027. Src is the Phototag of the element supplying source data.  Convert is the ConvertFromRGBTech-
  3028. nique that will be used in the conversion from the source colorspace.  Convert-params is the list of
  3029. additional parameters required by convert.
  3030. In addition to colorspace conversion, some techniques allow for adjusting the white point of the
  3031. source data prior to conversion and compressing the gamut of the output data (see Appendix A,
  3032. Convert To RGB Technique, for more information on conversion techniques).
  3033. The source data must be TripleBand, and all bands must have equal dimensions. The type and levels
  3034. of the output data are determined by convert technique parameters.  All other attributes are inherited
  3035. from src.
  3036. No subsetting by band mask or ProcessDomain is provided (the entire image is converted).
  3037. Error   Cause
  3038. FloAlloc        Insufficient resources
  3039. FloSource       Invalid src
  3040. FloMatch        src is not TripleBand
  3041. Unequal inter-band dimensions (width or height)
  3042. FloTechnique    Invalid convert or convert-params
  3043. Arithmetic or Point can be used to gamma-correct the resulting data prior to displaying it.
  3044.  
  3045. Convolve
  3046. XieFloConvolve
  3047. src: XieTypPhototag
  3048. domain: XieTypProcessDomain
  3049. kernel: LISTofXieTypFloat
  3050. kernel-size: CARD8
  3051. band-mask: CARD8
  3052. convolve: XieTypConvolveTechnique
  3053. convolve-params: <technique-dependent>
  3054. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloValue, FloTechnique
  3055. Events: none
  3056. Attribute       Value
  3057. class   Same as src
  3058. type    Same as src
  3059. width   Same as src
  3060. height  Same as src
  3061. levels  same as src
  3062. Convolve produces output data by convolving each input pixel value (and surrounding area) with the
  3063. specified convolution kernel.
  3064. Src is the Phototag of the element supplying source data.  Domain may control the subset of the im-
  3065. age that will be operated upon.  Kernel contains the coefficients used in the convolution process.
  3066. Kernel-size specifies the dimension of kernel.  Band-mask specifies which bands are to be operated
  3067. upon.   Convolve specifies the ConvolveTechnique for handling edge conditions (when kernel re-
  3068. quires data outside of src).  Convolve-params is the list of additional parameters required by con-
  3069. volve.  Kernel represents a square array of float data that  has odd dimensions.  Thus, a single dimen-
  3070. sion is used to specify, kernel-size.
  3071. Using band-mask to select source data that have two (2) or less levels is not permitted.
  3072. All output data attributes are inherited from the source data.
  3073. Error   Cause
  3074. FloAlloc        Insufficient resources
  3075. FloSource       Invalid src
  3076. FloDomain       Invalid domain
  3077. FloMatch        Selected source data are bitonal (that is, 2 or less levels)
  3078. FloValue        Invalid kernel-size (for example, not odd)
  3079. FloTechnique    Invalid convolve edge handling technique or convolve-params
  3080. For TripleBand data, convolution using the same kernel is permuted over all three bands.
  3081.  
  3082. Dither
  3083. XieFloDither
  3084. src: XieTypPhototag
  3085. levels: XieTypLevels
  3086. band-mask: CARD8
  3087. dither: XieTypDitherTechnique
  3088. dither-params: <technique-dependent>
  3089. Errors: FloAlloc, FloSource, FloValue, FloMatch, FloTechnique
  3090. Events: none
  3091. Attribute       Value
  3092. class   Same as src
  3093. type    Constrained
  3094. width   Same as src
  3095. height  same as src
  3096. levels  levels
  3097. Dither is used to reduce the number of quantization levels in an image.  It accomplishes this by af-
  3098. fecting adjacent pixels (area affect) to make up for the lack of depth resolution.
  3099. Src is the Phototag of the element supplying source data.  Levels is the number of levels desired in
  3100. the output data.  Band-mask specifies which bands are to be operated upon.  Dither specifies the de-
  3101. sired DitherTechnique.  Dither-params is the list of additional parameters required by dither.
  3102. The source data must be Constrained.  Using band-mask to select source data that have two (2) or
  3103. less levels is not permitted.
  3104. No subsetting by band mask or ProcessDomain is provided (the entire image is processed).
  3105. Error   Cause
  3106. FloAlloc        Insufficient resources
  3107. FloSource       Invalid src
  3108. FloMatch        Unconstrained src data
  3109. Selected source data are bitonal (that is, 2 or less levels)
  3110. FloValue        Invalid output levels: less than two, or greater than src levels
  3111. FloTechnique    Invalid dither technique or dither-params
  3112.  
  3113. Geometry
  3114. XieFloGeometry
  3115. src: XieTypPhototag
  3116. width: CARD32
  3117. height: CARD32
  3118. coefficients: XieTypFloat[6]
  3119. constant: XieTypConstant
  3120. band-mask: CARD8
  3121. sample: XieTypGeometryTechnique
  3122. sample-params: <technique-dependent>
  3123. Errors: FloAlloc, FloSource, FloValue, FloTechnique
  3124. Events: none
  3125. Attribute       Value
  3126. class   Same as src
  3127. type    Same as src
  3128. width   width
  3129. height  height
  3130. levels  Same as src
  3131. Geometry is used to perform geometric transformations on image data.  Linear geometric resampling
  3132. operations are implemented, such as, crop, mirror, scale, shear, rotate, translate, and combinations
  3133. thereof.
  3134. Src is the Phototag of the element supplying source data.  Width and height specify the dimensions of
  3135. the output data.  Coefficients is a list of values (a,b,c,d,tx,ty) that control the geometric transforma-
  3136. tion.  Constant is a fill value used for output pixels that do not map back to a src pixel.  Band-mask
  3137. specifies which bands are to be operated upon.  Sample is the GeometryTechnique to be used for ret-
  3138. rospectively resampling src.  Sample-params is the list of additional parameters required by sample.
  3139. Figure 7-2 shows a combined crop and scale for a src with dimensions w and h, and output width w
  3140. and height h. The mapping between the coordinate systems is specified from output back to src; that
  3141. is, for each output pixel (x,y),  the coordinate location (x,y) at which to sample src is given by:
  3142.  
  3143.  
  3144. Geometry can be visualized as stepping through each possible output pixel location in turn and com-
  3145. puting the location from which to obtain each input pixel value.  Often a given output pixel location
  3146. (x,y) will not correspond exactly to a single pixel in the input image.  The sample technique is
  3147. used to determine how the input data will be interpolated to produce each output pixel value.
  3148.  
  3149. Figure 7-2   A sample geometric transform: crop and scale
  3150. The region to be cropped in the input image is implicitly defined by the dimensions of the output im-
  3151. age and the mapping from output to input coordinates.  Depending on the size of the input and output
  3152. images, the amount of scaling specified, and the amount of translation in the mapping,  the shadow
  3153. of the output image may extend beyond the boundaries of the input image, as in Figure 7-3.  Pixels in
  3154. the output image that  map off the edge of the input image will be assigned the constant value.
  3155.  
  3156. Figure 7-3   Background fill used for pixels beyond the edge
  3157. Transformation Coefficients
  3158. The coordinate mapping (a,b,c,d,tx,ty), together with the output width and height, fully specify the
  3159. geometric transformation.   To aid in computing the desired transform, one might:
  3160. *       Draw a picture of the input and output images.  Label  the corners of the output image A,B,C,D.  They will have coordinates
  3161. x,y at (0,0),  (width-1,0),  (0,height-1), and (width-1,height-1),
  3162. *       Next compute or deduce the coordinates (x,y) of A,B,C,D in the input coordinate space,
  3163. *       For three corners (preferably those with a 0 for either x or y), write down the basic mapping equation with known (x,y)
  3164. and (x,y) specified.  Each corner will give two equations, and simultaneously solving the six equations for the three corners
  3165. will allow (a,b,c,d,tx,ty) to be deduced. The remaining corner may be used to check that these parameters have been derived
  3166. correctly.
  3167. The following briefly (and approximately) summarizes the intuitive role of each parameter:
  3168. a,d     Scaling parameters. Increasing a and d will make the output image appear smaller, whereas
  3169. decreasing them will make the output pixels appear larger.
  3170. b,c     Rotation/skew parameters. If b and c are zero, the output image will be a rectangular scal-
  3171. ing of the input image.  If a and d are both zero, b is one and c is negative one, the image
  3172. will appear rotated.  The magnitude of b and c will affect scaling as well, if a and d are
  3173. zero.  If  more than two of (a,b,c,d) are nonzero, the effect is complicated. The image may
  3174. appear skewed and scaled.
  3175. tx,ty   Translation parameters. Used to specify the offset between input and output coordinate sys-
  3176. tems.
  3177. width,height    These specify the output image dimensions of the selected band(s).  Note that increasing the
  3178. output image height and width over the input image size will not by itself cause magnifica-
  3179. tion ╛ if a and d are one (1) and b and c are zero (0),  the output image will have the same
  3180. appearance as the input, except that the borders will shrink or expand (as determined by
  3181. width and height) and new areas of the image will be filled with constant.
  3182.  
  3183. Trichromatic image bands can be operate individually, all together or in any combination using band-
  3184. mask. Because applying the same (a,b,c,d,tx,ty) mapping to inputs with diverse sizes will specify
  3185. different transformations, operating on all bands in unison (band-mask of 1112) is most appropriate if
  3186. the dimensions of all bands are equal.  No subsetting by ProcessDomain is provided (selected bands
  3187. are processed in their entirety).
  3188. Error   Cause
  3189. FloAlloc        Insufficient resources
  3190. FloSource       Invalid src
  3191. FloValue        Invalid coefficients, width, or height
  3192. FloTechnique    Invalid sample technique or sample-params
  3193. Logical
  3194. XieFloLogical
  3195. src-1: XieTypPhototag
  3196. src-2: XieTypPhototag
  3197. domain: XieTypProcessDomain
  3198. constant: XieTypConstant
  3199. operator: GCfunction*
  3200. band-mask: CARD8
  3201. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloOperator, FloValue
  3202. Events: none
  3203. Attribute       Value
  3204. class   Same as src-1
  3205. type    Constrained
  3206. width   Same as src-1
  3207. height  Same as src-1
  3208. levels  Same as src-1
  3209. Logical performs per-pixel bit-wise operations on a single data source, or between two data sources,
  3210. or between a single data source and a constant.
  3211. When two sources are involved, src-1 and src-2 are the Phototags of the elements supplying source
  3212. data (constant is ignored). If the operation is to involve a constant, src-1 is one operand, src-2 must be
  3213. zero, and constant is used as the other operand.  Domain may control the subset of source data that
  3214. will be operated upon.  Operator is the logical operator to be used.  Band-mask specifies which bands
  3215. are to be operated upon.
  3216. The value of operator matches the GC-function  values defined by the core protocol specification
  3217. for CreateGC.  The output of Logical is determined by the number of data sources and operator:
  3218. GC-function1    monadic operation       dyadic operation
  3219. Clear   0       0
  3220. And     constant AND src-1      src-2 AND src-1
  3221. AndReverse      constant AND (NOT src-1)        src-2 AND (NOT src-1)
  3222. Copy    constant        src-2
  3223. AndInverted     (NOT constant) AND src-1        (NOT src-2) AND src-1
  3224. NoOp    src-1   src-1
  3225. Xor     constant XOR src-1      src-2 XOR src-1
  3226. Or      constant OR src-1       src-2 OR src-1
  3227. Nor     (NOT constant) AND (NOT src-1)  (NOT src-2) AND (NOT src-1)
  3228. Equiv   (NOT constant) XOR src-1        (NOT src-2) XOR src-1
  3229. Invert  NOT src-1       NOT src-1
  3230. OrReverse       constant OR (NOT src-1) src-2 OR (NOT src-1)
  3231. CopyInverted    NOT constant    NOT src-2
  3232. OrInverted      (NOT constant) OR src-1 (NOT src-2) OR src-1
  3233. Nand    (NOT constant) OR (NOT src-1)   (NOT src-2) OR (NOT src-1)
  3234. Set     1       1
  3235. When two sources are involved, all attributes, other than width and height, must match.  All source
  3236. data must be Constrained, and levels must be a power of two.  Output attributes are inherited from
  3237. src-1.
  3238. Error   Cause
  3239. FloAlloc        Insufficient resources
  3240. FloSource       Invalid src-1 or src-2
  3241. FloDomain       Invalid domain
  3242. FloOperator     Invalid operator
  3243. FloMatch        src-1 or src-2 is not Constrained
  3244. levels or class differs between src-1 and src-2
  3245. levels is not a power of 2
  3246.  
  3247. MatchHistogram
  3248. XieFloMatchHistogram
  3249. src: XieTypPhototag
  3250. domain: XieTypProcessDomain
  3251. shape: XieTypHistogramShape
  3252. tech-params: <technique-dependent>
  3253. Errors: FloSource, FloDomain, FloAlloc, FloMatch, FloTechnique
  3254. Events: none
  3255. Attribute       Value
  3256. class   SingleBand
  3257. type    Constrained
  3258. width   Same as src
  3259. height  Same as src
  3260. levels  Same as src
  3261. MatchHistogram produces output data that  differs from the source data in terms of its pixel value
  3262. distribution or histogram. It allows the client to specify the desired state of the resulting data's histo-
  3263. gram (algorithmic description of resulting histogram shape).
  3264. Src is the Phototag of the element supplying source data.  Domain may control the subset of the
  3265. source data to operated upon.  Shape is a HistogramShape that specifies the form of the desired out-
  3266. put data histogram.  Shape-params is the list of additional parameters required by shape.
  3267. The source data must be Constrained and SingleBand, and it must have three (3) or more levels.
  3268. When a ProcessDomain is used, only data that intersects with domain is included in the histogram,
  3269. and only that data will be affected in the result of the histogram matching operation (all other data
  3270. will pass-through unchanged).
  3271. Error   Cause
  3272. FloAlloc        Insufficient resources
  3273. FloSource       Invalid src
  3274. FloDomain       Invalid domain
  3275. FloMatch        Invalid src data: Unconstrained or TripleBand or bitonal
  3276. FloTechnique    Invalid histogram shape or shape-params
  3277. The Point element can also be used to reshape an image's histogram using an appropriate LUT.
  3278.  
  3279. Math
  3280. XieFloMath
  3281. src: XieTypPhototag
  3282. domain: XieTypProcessDomain
  3283. operator: XieTypMathOp
  3284. band-mask: CARD8
  3285. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloOperator, FloValue
  3286. Events: none
  3287. Attribute       Value
  3288. class   Same as src
  3289. type    Same as src
  3290. width   Same as src
  3291. height  Same as src
  3292. levels  Same as src
  3293. Math applies a single operand mathematical operation to the source data on a point-wise basis.
  3294. Src is the Phototag of the element supplying source data.  Domain may control the subset of the im-
  3295. age that  will be operated upon.  Operator is the mathematical operation to be applied.  Band-mask
  3296. specifies which bands are to be operated upon.
  3297. Pixel computations that would lead to errors will yield valid server-dependent values (for example,
  3298. the log of a Constrained pixel value of zero might result in a value of zero).  Using band-mask to se-
  3299. lect source data that have two (2) or less levels is not permitted.
  3300. All output data attributes are inherited from the source data.
  3301. Error   Cause
  3302. FloAlloc        Insufficient resources
  3303. FloSource       Invalid src
  3304. FloDomain       Invalid domain
  3305. FloMatch        Selected source data are bitonal (that is, 2 or less levels)
  3306. FloOperator     Invalid operator
  3307.  
  3308. PasteUp
  3309. XieFloPasteUp
  3310. tiles: LISTofXieTypTile
  3311. width: CARD32
  3312. height: CARD32
  3313. constant: XieTypConstant
  3314. Errors: FloAlloc, FloSource, FloMatch
  3315. Events: none
  3316. Attribute       Value
  3317. class   Same as tiles
  3318. type    Same as tiles
  3319. width   width
  3320. height  height
  3321. levels  Same as tiles
  3322. PasteUp is an N-input translate operation that  outputs data constructed from various source data tiles
  3323. or a constant value.
  3324. Each of the tiles specifies a src (the Phototag of the element supplying source data) and the coordi-
  3325. nates, dst-x and dst-y, where the tile belongs in the output data.  Width and height specify the full ex-
  3326. tent of the output data.  Constant is the fill value to as the output data for any region that is not speci-
  3327. fied as a tile.
  3328. Each region of the output data is defined by a tile's destination coordinates, dst-x and dst-y, and its src
  3329. dimensions.  For output regions where no tile provides input, the value of constant is used.  If tiles
  3330. overlap, a stacking order rule defines which pixel value will be output; the last tile (involved in the
  3331. overlap) in the list of tiles will provide the output pixel.
  3332. At least one tile must be supplied.  Except for width and height, all attributes of each source tile must
  3333. match.  In addition, for TripleBand input, inter-band dimensions within each tile must match.
  3334. No subsetting by band mask or ProcessDomain is provided.
  3335. Error   Cause
  3336. FloAlloc        Insufficient resources
  3337. FloSource       Invalid source tiles
  3338. No tiles were specified
  3339. FloMatch        Incompatible attributes between tiles
  3340. Unequal inter-band dimensions within a tile (width or height)
  3341.  
  3342. Point
  3343. XieFloPoint
  3344. src: XieTypPhototag
  3345. lut: XieTypPhototag
  3346. domain: XieTypProcessDomain
  3347. band-mask: CARD8
  3348. Errors: FloAlloc, FloSource, FloDomain, FloMatch
  3349. Events: none
  3350. Attribute       Value
  3351. class   Same as lut
  3352. type    Constrained
  3353. width   Same as src
  3354. height  Same as src
  3355. levels  Same as lut
  3356. Point maps source pixel values to output pixel values using a lookup table (LUT) .
  3357. Src is the Phototag of the element supplying Constrained source data.  Lut is the Phototag of the
  3358. element supplying the lookup table array(s).  Domain may control the subset of source data that  will
  3359. be operated upon.  Band-mask specifies which bands are to be operated upon (all bands must be
  3360. specified if lut is SingleBand and src is TripleBand).
  3361. The output is Constrained with the width and height taken from src and class and levels taken from
  3362. lut.  When src is SingleBand and lut is TripleBand, for the bands that are indicated by band-mask,
  3363. the output bands are remapped through their respective lut bands, whereas the other bands are just
  3364. replications of the single src band.  If domain is used, the class and levels of lut must match those of
  3365. src.
  3366. Each lut array must contain sufficient entries so that all potential pixel values found in src can form a
  3367. valid index into the array.  Generally each src pixel value is used directly as an index into a lut array.
  3368. When TripleBand src data are remapped through a SingleBand lut; however, pixel values from all
  3369. three src bands are combined to form an array index (for this case, width and height must match for
  3370. all bands).  Figure 7-4 presents the algorithm for computing combined array indices.
  3371.  
  3372. LUT band-order
  3373. LUT indexing algorithm for combining pixel values from TripleBand data
  3374. LSFirst
  3375. index = value[0] + value[1] x levels[0] + value[2] x levels[0] x levels[1]
  3376. MSFirst
  3377. index = value[2] + value[1] x levels[2] + value[0] x levels[2] x levels[1]
  3378. Figure 7-4   Point's algorithm for computing combined LUT indices
  3379. Error   Cause
  3380. FloAlloc        Insufficient resources
  3381. FloSource       Invalid src or lut
  3382. FloDomain       Invalid domain (for example, attempting to use domain with ServiceClass DIS)
  3383. FloMatch        Unconstrained src data
  3384.         domain is being used, but lut class or levels do not match those of src
  3385. lut does not contain enough entries (that is, length less than src levels)
  3386. lut is SingleBand and src is TripleBand, but band-mask is incomplete or inter-band
  3387. dimensions dont match
  3388. Unconstrain
  3389. XieFloUnconstrain
  3390. src: XieTypPhototag
  3391. Errors: FloAlloc, FloSource, FloMatch
  3392. Events: none
  3393. Attribute       Value
  3394. class   Same as src
  3395. type    Unconstrained
  3396. width   Same as src
  3397. height  Same as src
  3398. levels  Unknown
  3399. Unconstrain takes Constrained source data and produces Unconstrained data.
  3400. Src is the Phototag of the element supplying Constrained source data.
  3401. No subsetting by band mask or ProcessDomain is provided (the entire image is Unconstrained).
  3402. Error   Cause
  3403. FloAlloc        Insufficient resources
  3404. FloSource       Invalid src
  3405. FloMatch        Unconstrained src
  3406.  
  3407.         GC-function is not a defined type in the core X protocol documentation.  This table is taken from the list of alternative func-
  3408. tion values defined for the CreateCG protocol request.
  3409.         Figure 6-1 illustrates the relationship between LUT class and image class and presents some usage examples.
  3410.  
  3411.  
  3412. Process Elements   7-3
  3413.  
  3414.  
  3415. 8
  3416. Export Elements
  3417. Element categories
  3418. Export elements are used to send image data out of a Photoflo.  Each export element has a single
  3419. Phototag source but does not provide an output connection.  There are two types of export elements:
  3420.   ExportResource elements export data to a server resource (DRAWABLE, LUT, Photomap, or ROI).
  3421.   ExportClient elements produce data for client retrieval. They provide the input data for the GetCli-
  3422. entData protocol request.
  3423. Export to Client
  3424. ExportClient elements provide data for the client. Element parameters fully describe the format
  3425. or organization the data is to have as it is transported through the protocol stream.  The data itself
  3426. must be retrieved using the GetClientData protocol request while the Photoflo is Active.
  3427. Servers are required to buffer a nonzero amount of data per ExportClient element.  Beyond that
  3428. point execution may be suspended until the client retrieves sufficient data.
  3429. Events generated
  3430. ExportClient elements can generate ExportAvailable events to notify the client when the data is
  3431. available for retrieval.  ExportAvailable events may be:
  3432.   Disabled (that is, no event is sent)
  3433.   Enabled only when data first becomes available from the element
  3434.   Enabled each time the element's data buffer transitions from empty to nonempty
  3435.  
  3436. ExportClientHistogram
  3437. XieFloExportClientHistogram
  3438. notify: XieTypExportNotify
  3439. src: XieTypPhototag
  3440. domain: XieTypProcessDomain
  3441. Errors: FloAlloc, FloSource, FloDomain, FloMatch, FloValue
  3442. Events: none
  3443. ExportClientHistogram generates a histogram of the pixel values found in the source data.  It pre-
  3444. pares histogram data that can be retrieved by the client using the GetClientData protocol request.
  3445. An event can be requested that will notify the client when histogram data becomes available.
  3446. Notify allows the client to be notified when the histogram data becomes available.  Src is the Photo-
  3447. tag of the element supplying SingleBand Constrained source data.  Domain may control the subset of
  3448. the source data from which the distribution will be generated.
  3449. The data generated for the client is a list of HistogramData where each entry consists of an value
  3450. (that is, a pixel value) followed by the count of pixels found with that value.  If the number of pixels
  3451. for a given value exceeds the capacity of count (type CARD32), that count will be returned at the
  3452. maximum value (that is, 232-1).  Pixel values that are not found in the data are not included in the
  3453. histogram data (that is, no entries are returned where count is zero).
  3454. If notify is true, the total number of histogram entries are reported in the data field of the Expor-
  3455. tAvailable event.
  3456. The histogram is returned as numeric values (see HistogramData), as such, the byte order of the data
  3457. is determined at core protocol connection setup time.
  3458. Error   Cause
  3459. FloAlloc        Insufficient resources
  3460. FloSource       Invalid src
  3461. FloDomain       Invalid domain
  3462. FloMatch        Unconstrained src data
  3463. TripleBand src data
  3464. FloValue        Invalid notify
  3465. All data that are generated by ExportClientHistogram must be retrieved by the client using GetClientData before the Photoflo
  3466. can exit from the Active state.
  3467. Histograms of TripleBand images are not supported directly.  However, BandSelect may be used to choose a single band of data, or
  3468. BandExtract may be used to combine data from multiple bands into a single band of data.  A histogram of this single band of data
  3469. could then be generated using ExportClientHistogram.
  3470.  
  3471. ExportClientLUT
  3472. XieFloExportClientLUT
  3473. notify: XieTypExportNotify
  3474. src: XieTypPhototag
  3475. band-order: XieTypOrientation
  3476. start: XieTypTripletofCARD32
  3477. length: XieTypTripletofCARD32
  3478. Errors: FloAlloc, FloSource, FloValue
  3479. Events: none
  3480. ExportClientLUT allows data imported from an ImportLUT or ImportClientLUT element to be
  3481. retrieved by the client.  The actual transport of lookup table data through the protocol stream is re-
  3482. quested using the GetClientData protocol request.
  3483. Notify allows the client to be notified when data become available.  Src is the Phototag of the element
  3484. supplying lookup table data.  Band-order is the order in which TripleBand arrays are transmitted
  3485. through the protocol stream.  Start is the index of the first array entry that should be returned.  Length
  3486. is the number of array entries that should be returned.
  3487. If notify is requested, the ExportAvailable event's data field will report the total number of array en-
  3488. tries that can be retrieved from the band specified by the event.
  3489. The size of each array entry is either 1, 2, or 4 bytes; the smallest size into which the output quanti-
  3490. zation levels can be stored.  When array entries require multiple bytes, the byte order per entry is de-
  3491. termined in the same manner as other numeric data; it is the byte orientation established at core X
  3492. connection setup time.
  3493. Error   Cause
  3494. FloAlloc        Insufficient resources
  3495. FloSource       Invalid src
  3496. FloMatch        start + length exceeds number of entries in an array
  3497. FloValue        Invalid notify or band-order
  3498. When the client attempts to retrieve data from an ExportClientLUT element, the server responds with one or more complete array
  3499. entries per protocol reply (see GetClientData).  All data must be retrieved by the client before the Photoflo can leave the Active
  3500. state.
  3501.  
  3502. ExportClientPhoto
  3503. XieFloExportClientPhoto
  3504. notify: XieTypExportNotify
  3505. src: XieTypPhototag
  3506. encode: XieTypEncodeTechnique
  3507. encode-params: <technique-dependent>
  3508. Errors: FloAlloc, FloSource, FloMatch, FloValue, FloTechnique
  3509. Events: none
  3510. ExportClientPhoto makes image data available to the protocol stream.  The attributes of the exported
  3511. data are determined by the attributes of the source data.  The format of the data is specified by the en-
  3512. code technique and encode-params.  The actual transport of image data through the protocol stream
  3513. is requested using the GetClientData protocol request.
  3514. Notify allows the client to be notified when image data become available.  Src is the Phototag of the
  3515. element supplying Constrained data.  Encode is the EncodeTechnique that will be used to compress
  3516. of format the exported data.  Encode-params is the list of additional parameters required by encode.
  3517. Error   Cause
  3518. FloAlloc        Insufficient resources
  3519. FloSource       Invalid src
  3520. FloMatch        Unconstrained src data
  3521. FloValue        Invalid notify
  3522. FloTechnique    Invalid encode technique or encode-params
  3523. ServerChoice is not a valid encode technique for ExportClientPhoto.
  3524. Depending on encode, the export process may cause the data to be decoded, encoded, or, otherwise, reformatted by the server.  If Ex-
  3525. portClientPhoto is fed directly from an ImportClientPhoto or ImportPhotomap element and the attributes of the raw data that
  3526. are given to the import element match the requirements of the encode technique, the raw data can bypass the normal decode function
  3527. of the import element and be forwarded directly to ExportClientPhoto (this is an implementation-specific optimization).
  3528. If TripleBand data are given to an encode technique that will interleave the output data BandByPixel, the dimensions of each src
  3529. band must match.
  3530. All data must be retrieved by the client, using the GetClientData protocol request, before the Photoflo can exit from the Active
  3531. state.
  3532.  
  3533.  
  3534. ExportClientROI
  3535. XieFloExportClientROI
  3536. notify: XieTypExportNotify
  3537. src: XieTypPhototag
  3538. Errors: FloAlloc, FloSource, FloValue
  3539. Events: none
  3540. ExportClientROI allows a list-of-rectangles, imported from an ImportROI or ImportClientROI
  3541. element, to be retrieved by the client.  The actual transport of lookup table data through the protocol
  3542. stream is requested using the GetClientData protocol request.
  3543. Notify allows the client to be notified when data become available.  Src is the Phototag of the element
  3544. supplying the list-of-rectangles.  If notify is requested, the ExportAvailable event's data field will re-
  3545. port the total number of rectangles that can be retrieved.
  3546. Each rectangle is described using numeric values (see Rectangle), as such, the byte order of the data
  3547. is determined at core protocol connection setup time.
  3548. Error   Cause
  3549. FloAlloc        Insufficient resources
  3550. FloSource       Invalid src
  3551. FloValue        Invalid notify
  3552. When the client attempts to retrieve data from an ExportClientROI element, the server responds with one or more complete Rec-
  3553. tangles per protocol reply (see GetClientData).  All data must be retrieved by the client before the Photoflo can leave the Active
  3554. state.
  3555.  
  3556. Export to Resource
  3557. ExportResource elements emit data to server resources: either core X DRAWABLEs, or XIE LUT,
  3558. Photomap, or ROI resources.
  3559. For ExportResource elements that assign attributes to XIE resources, the association between the
  3560. resource identifier (XID) and the new attributes and data does not occur until the Photoflo success-
  3561. fully completes (that is, leaves the Active state).   (See LUT, Photomap, and ROI resources in
  3562. Chapter 4.)
  3563. ExportDrawable
  3564. XieFloExportDrawable
  3565. src: XieTypPhototag
  3566. drawable: DRAWABLE
  3567. gc: GCONTEXT
  3568. dst-x: INT16
  3569. dst-y: INT16
  3570. Errors: FloAlloc, FloSource, FloDrawable, FloGC, FloMatch, FloValue
  3571. Events: none
  3572. ExportDrawable allows COLORMAP index data to be exported to a WINDOW or PIXMAP.
  3573. Src is the Phototag of the element supplying Constrained source data (index data assumed).
  3574. Drawable is the WINDOW or PIXMAP into which the data will be written.  Gc is the GCONTEXT to be
  3575. used when transferring pixels to drawable.  Dst-x and dst-y specify where the data should be placed in
  3576. drawable.
  3577. The following components are used from gc: function, plane-mask, subwindow-mode,
  3578. clip-x-origin, clip-y-origin, and clip-mask.
  3579. The levels of src must exactly match the depth of drawable and gc (that is, levels must be 2depth).
  3580. Error   Cause
  3581. FloAlloc        Insufficient resources
  3582. FloSource       Invalid src
  3583. FloDrawable     Invalid drawable
  3584. FloGC   Invalid gc
  3585. FloMatch        Invalid src data (TripleBand, levels does not match depth, or Unconstrained)
  3586. ExportDrawable assumes its input is COLORMAP index data.  Sources of such data include: ImportClientPhoto, Import-
  3587. Drawable, ImportPhotomap, BandExtract, ConvertToIndex, Point, and elements that have processed index data.
  3588.  
  3589. ExportDrawablePlane
  3590. XieFloExportDrawablePlane
  3591. src: XieTypPhototag
  3592. drawable: DRAWABLE
  3593. gc: GCONTEXT
  3594. dst-x: INT16
  3595. dst-y: INT16
  3596. Errors: FloAlloc, FloSource, FloDrawable, FloGC, FloMatch, FloValue
  3597. Events: none
  3598. ExportDrawablePlane allows SingleBand single bit (bitonal) data to be exported to a WINDOW,
  3599. PIXMAP, or BITMAP.
  3600. Src is the Phototag of the element supplying Constrained bitonal source data.  Drawable is the WIN-
  3601. DOW, PIXMAP, or BITMAP into which the data will be written.  Gc is the GCONTEXT to be used
  3602. when transferring pixels to drawable.  Dst-x and dst-y specify where the data should be placed in
  3603. drawable.
  3604. The following components are used from gc: function, plane-mask, foreground, back-
  3605. ground, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-
  3606. mask.  For the fill-style component of gc, values of FillSolid and FillTiled are treated
  3607. as synonyms for FillOpaqueStippled.
  3608. Error   Cause
  3609. FloAlloc        Insufficient resources
  3610. FloSource       Invalid src
  3611. FloDrawable     Invalid drawable
  3612. FloGC   Invalid gc
  3613. FloMatch        Invalid src data (TripleBand, levels > 2, or not Constrained)
  3614. Bitonal data can be exported to a DRAWABLE of any depth if an appropriate GCONTEXT is supplied.  The foreground and
  3615. background pixel values of gc can be used to map image pixels to COLORMAP colors during the export process.
  3616.  
  3617. ExportLUT
  3618. XieFloExportLUT
  3619. src: XieTypLUT
  3620. merge: BOOL
  3621. start: XieTypTripletofCARD32
  3622. Errors: FloAlloc, FloSource
  3623. Events: none
  3624. ExportLUT allows data imported from an ImportLUT or ImportClientLUT element to be saved in
  3625. an existing LUT resource.
  3626. Src is the Phototag of the element supplying lookup table data.  Lut is the LUT to receive the data.
  3627. Merge specifies that new array entries from src should replace entries that already exist within lut.
  3628. Start is the index of the first array entry that should be written in lut.
  3629. If merge is false, start must be zero (0) for each band.  In this case, lut will inherit the attributes of src
  3630. and be populated with its data.  The previous attributes and data of lut are overwritten when the pho-
  3631. toflo completes.
  3632. If merge is true and lut has existing attributes, the data from src will replace the data from lut, begin-
  3633. ning at position start.  The attributes of src must match those of lut, and the combination of start and
  3634. the length of src must specify a valid subrange existing within lut.  If merge is true but lut has not yet
  3635. been populated, it is an error.
  3636. Error   Cause
  3637. FloAlloc        Insufficient resources
  3638. FloSource       Invalid src
  3639. FloLUT  Invalid lut
  3640. FloMatch        merge true and attributes do not match between src and lut
  3641. merge true and start + src length is not a subrange of lut
  3642. FloValue        merge false and start is nonzero
  3643.  
  3644. ExportPhotomap
  3645. XieFloExportPhotomap
  3646. src: XieTypPhototag
  3647. photomap: XieTypPhotomap
  3648. encode: XieTypEncodeTechnique
  3649. encode-params: <technique-dependent>
  3650. Errors: FloAlloc, FloSource, FloPhotomap, FloTechnique
  3651. Events: none
  3652. ExportPhotomap allows data resulting from Photoflo operations to be saved in an existing Pho-
  3653. tomap.
  3654. Src is the Phototag of the element supplying source data.  Photomap is the Photomap to receive the
  3655. data.  Encode is the EncodeTechnique by which the image is to be compressed or formatted. Encode-
  3656. params is the list of additional parameters required by encode.
  3657. Photomap will inherit the attributes of src and be populated with its data.  The previous attributes and
  3658. data of photomap are overwritten when the Photoflo completes.
  3659. Error   Cause
  3660. FloAlloc        Insufficient resources
  3661. FloSource       Invalid src
  3662. FloPhotomap     Invalid photomap
  3663. FloTechnique    Invalid encode technique or encode-params
  3664. Depending on encode, the export process may cause the data to be decoded, encoded, or, otherwise, reformatted by the server.  If Ex-
  3665. portPhotomap is fed directly from an ImportClientPhoto or ImportPhotomap element and the attributes of the raw data that are
  3666. given to the import element match the requirements of the encode technique, the raw data can bypass the normal decode function of
  3667. the import element and be forwarded directly to ExportPhotomap (this is an implementation-specific optimization).
  3668. If encode is ServerChoice, the server is free to choose an encode technique for the exported data.  An optional hint can be provided
  3669. to help the server make its choice, but the server can ignore the hint. PreferTime hints that retrieval performance is the desired metric,
  3670. whereas PreferSpace indicates that frugal use of storage space is more important.  If ExportPhotomap is receiving data from an
  3671. adjacent upstream import element, ServerChoice may choose to pass the import elements input data directly to the Photomap; oth-
  3672. erwise, a lossless technique will be chosen. The actual technique chosen by the server can be obtained using QueryPhotomap after
  3673. the Photoflo completes.
  3674. If TripleBand data are given to an encode technique that will interleave the output data BandByPixel, the dimensions of each src
  3675. band must match.
  3676.  
  3677. ExportROI
  3678. XieFloExportROI
  3679. src: XieTypPhototag
  3680. roi: XieTypROI
  3681. Errors: FloAlloc, FloSource, FloROI
  3682. Events: none
  3683. ExportROI allows data imported from an ImportROI or ImportClientROI element to be saved in
  3684. an existing ROI.
  3685. Src is the Phototag of the element supplying a list-of-rectangles.  Roi is the ROI to receive the data.
  3686. Roi will be populated with new data.  The previous data of roi are overwritten after the Photoflo com-
  3687. pletes.
  3688. Error   Cause
  3689. FloAlloc        Insufficient resources
  3690. FloSource       Invalid src
  3691. FloROI  Invalid roi
  3692.  
  3693. Export Elements   8-1
  3694.  
  3695.  
  3696. 9
  3697. Events and Errors
  3698. Events
  3699. ColorAlloc
  3700. XieEvnColorAlloc
  3701. instance: XieTypExecutable
  3702. src: XieTypPhototag
  3703. type: ConvertToIndex
  3704. color-list: XieTypColorList
  3705. color-alloc: XieTypColorAllocTechnique
  3706. data: CARD32
  3707. A ColorAlloc event notifies the client that a ConvertToIndex element has completed color allocation
  3708. but has produced a result of lesser fidelity than was requested using the technique that was specified
  3709. for the ConvertToIndex element.
  3710. Instance, src, and type identify the Photoflo and specific ConvertToIndex element from which the
  3711. ColorAlloc event originated.  Color-list is the ColorList resource that received the allocated colors.
  3712. Color-alloc is the ColorAllocTechnique specified to the ConvertToIndex element.  Data can be used
  3713. for other information that is specific to color-alloc.
  3714.  
  3715. DecodeNotify
  3716. XieEvnDecodeNotify
  3717. instance: XieTypExecutable
  3718. src: XieTypPhototag
  3719. type: { ImportClientPhoto, ImportPhotomap }
  3720. decode: XieTypDecodeTechnique
  3721. data-width: CARD32
  3722. data-height: CARD32
  3723. band-number: CARD8
  3724. aborted: BOOL
  3725. A DecodeNotify event notifies the client that anomalies were encountered while decoding a com-
  3726. pressed image (see the notify parameters of ImportClientPhoto and ImportPhotomap). Either an er-
  3727. ror has been encountered while decoding an image, or the image data received does not satisfy the
  3728. expected dimensions.
  3729. Instance, src, and type identify the Photoflo and element from which the DecodeNotify event origi-
  3730. nated. Decode is the DecodeTechnique being used.  Data-width and data-height are the dimensions
  3731. discovered while decoding the data. Band-number associates the event with the band of the image
  3732. where the problem was encountered.  Aborted is true if decoding was aborted or false if recovery was
  3733. possible.
  3734. Recovery from a decode error may result in some missing or garbled image data. This may also cause
  3735. the height of the decoded data to be less than was expected.  If data-width or data-height do not
  3736. match the width and height specified to ImportClientPhoto, the image data is clipped or padded
  3737. (with zeros), as required, to enforce the ImportClientPhoto specified dimensions.
  3738. ExportAvailable
  3739. XieEvnExportAvailable
  3740. instance: XieTypExecutable
  3741. src: XieTypPhototag
  3742. type:{ ExportClientHistogram, ExportClientLUT, ExportClientPhoto ExportClientROI }
  3743. band-number: CARD8
  3744. data; LISTofCARD32
  3745. An ExportAvailable event notifies the client that an ExportClient element has data available
  3746. (see the notify parameter of the applicable ExportClient element).  If notify was specified as
  3747. FirstData, this event will only be sent the first time data become available from the ExportClient
  3748. element.  Otherwise (that is, NewData was specified) this event will be generated each time the
  3749. amount of data available changes from zero to nonzero.
  3750. Instance, src, and type identify the Photoflo and specific ExportClient element from which the
  3751. ExportAvailable event originated. Band-number associates the event with a specific band of the im-
  3752. age or LUT.  Data is information specific to type (for example, the number of LUT entries or ROI
  3753. rectangles available).
  3754. Where there is a single ExportClient element, the client can just read bytes or be event-driven.  For Photoflos containing multi-
  3755. ple ExportClient elements, the client should be event-driven.
  3756.  
  3757. ImportObscured
  3758. XieEvnImportObscured
  3759. instance: XieTypExecutable
  3760. src: XieTypPhototag
  3761. type: { ImportDrawable, ImportDrawablePlane }
  3762. window: WINDOW
  3763. x: INT16
  3764. y: INT16
  3765. width: CARD16
  3766. height: CARD16
  3767. An ImportObscured event notifies the client an ImportDrawable or ImportDrawablePlane ele-
  3768. ment has encountered obscured regions in a WINDOW that cannot be retrieved from BACKINGSTORE
  3769. (see the notify parameter of the import element).  A separate ImportObscured event is returned for
  3770. each affected region.
  3771. Instance and src identify the Photoflo and the specific import element from which the ImportOb-
  3772. scured event originated.  Window identifies the WINDOW.  The obscured region of the window is
  3773. specified by x, y, width, and height.
  3774. Note: image data within obscured regions will be populated with the fill value supplied to the import element.
  3775. PhotofloDone
  3776. XieEvnPhotofloDone
  3777. instance: XieTypExecutable
  3778. outcome: XieTypPhotofloOutcome
  3779. A PhotofloDone event notifies the client that a Photoflo has left the Active state.  It is enabled by the
  3780. notify parameter of the ExecutePhotoflo and ExecuteImmediate requests.
  3781. Instance identifies the Photoflo from which the PhotofloDone event originated.  Outcome indicates
  3782. the reason the Photoflo left the Active state.
  3783. If the Photoflo terminated due to an error condition, the details concerning the error have preceded this event in an error message.
  3784.  
  3785. Resource Errors
  3786. The following error-codes are allocated from the extension error space to provide for the errors re-
  3787. turned by XIE:
  3788. Table 9-1   XIE Error codes
  3789. Error   Cause
  3790. XieErrColorList The value for a color-list argument does not name a defined ColorList.
  3791. XieErrFlo . . . An error has been detected while defining, executing, or accessing a Photoflo.
  3792. See Table 9-2 for additional detail.
  3793. XieErrLUT       The value for a lut argument does not name a defined LUT.
  3794. XieErrPhotoflo  The value for a photoflo argument does not name a defined Photoflo.
  3795. XieErrPhotomap  The value for a photomap argument does not name a defined Photomap.
  3796. XieErrPhotospace        The value for a photospace argument does not name a defined Photospace.
  3797. XieErrROI       The value for a roi argument does not name a defined ROI.
  3798. XIE also uses the core protocol errors: Access, Alloc, IDChoice, Length, Request, and Value.
  3799.  
  3800. Photoflo errors
  3801. If an error is detected while defining, executing, or accessing a Photoflo, a Flo-error is returned.
  3802. This single error-code is allocated from the extension error space for all Photoflo related errors.  The
  3803. following subcodes are defined to provide the details of the error:
  3804. Table 9-2   Photoflo error subcodes
  3805. Error   Cause
  3806. XieErrFloAccess Attempt to execute, modify, or redefine an Active Photoflo
  3807. Attempt to Get/Put client data from/to an Inactive Photoflo
  3808. XieErrFloAlloc  Insufficient resources (for example, memory)
  3809. XieErrFloColormap       An unknown COLORMAP has been specified
  3810. XieErrFloColorList      An unknown ColorList has been specified
  3811. XieErrFloDomain Invalid domain Phototag:
  3812.                 source data is not a list-of-rectangles or control-plane
  3813.                 specified nonzero on a DIS server
  3814. XieErrFloDrawable       An unknown DRAWABLE has been specified
  3815. XieErrFloElement        An unknown PhotoElement type has been specified
  3816. Invalid PhotoElement type for request (for example, GetClientData from
  3817. Math)
  3818. Attempt to change or add a PhotoElement type using ModifyPhotoflo
  3819. XieErrFloGC     An unknown GCONTEXT has been specified
  3820. XieErrFloID     Invalid Executable:
  3821.                 an unknown Photoflo has been specified
  3822.                 an unknown Photospace has been specified
  3823. XieErrFloLength A PhotoElement was received with the incorrect number of bytes
  3824. XieErrFloLUT    An unknown LUT has been specified
  3825. XieErrFloMatch  Some parameter or pair of parameters has the correct type and range, but it
  3826. fails to match in some other way required by the PhotoElement
  3827. XieErrFloOperator       An unknown operator has been specified (for example, ArithmeticOp,
  3828. MathOp, and so on)
  3829. XieErrFloPhotomap       An unknown Photomap has been specified
  3830. XieErrFloROI    An unknown ROI has been specified
  3831. XieErrFloSource An invalid Phototag has been specified:
  3832.                 zero, but a Phototag is required
  3833.                 downstream from the particular PhotoElement
  3834.                 beyond the bounds of the Photoflo
  3835. XieErrFloTechnique      An unknown technique has been specified
  3836. The wrong number of technique specific parameters have been supplied
  3837. Invalid technique specific parameters have been specified
  3838. XieErrFloValue  Some numeric value falls outside of the range of values accepted by the Pho-
  3839. toElement
  3840. XieErrFloImplementation
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863. almost blank
  3864.  
  3865. Events and Errors   9-1
  3866.  
  3867.  
  3868. A
  3869. Techniques
  3870. Standard and Private Techniques
  3871. For some XIE operations, several recognized algorithms or techniques offer varying tradeoffs between
  3872. quality of results and performance.  Also, in some cases, different techniques are required due to an
  3873. image's class or content.  In general, techniques that are specified for import and export elements
  3874. identify image compression schemes, and techniques that are specified for process elements identify
  3875. various image processing or enhancement algorithms.
  3876. Several standard techniques are defined in this appendix.  Standard techniques are those that are well
  3877. known to the image processing community.  They are further categorized in this document as re-
  3878. quired, optional, or excluded (see Table B-2).  While required techniques must be implemented in all
  3879. servers, it is expected that most optional techniques will also be widely available.  Some techniques
  3880. are excluded from certain subsets.
  3881. Vendors may choose to extend XIE with their own private techniques to provide for their particular
  3882. needs.  Therefore, private techniques are likely to be available only on a particular vendor's platforms.
  3883. Technique numbers
  3884. Standard and private techniques can be differentiated by their technique numbers.  The most signifi-
  3885. cant bit of the technique number is zero (0) for standard techniques and one (1) for private tech-
  3886. niques.  Standard technique numbers are defined in this document (see Appendix C).  Private tech-
  3887. nique numbers are assigned dynamically (the method for generating private technique numbers is
  3888. chosen by the server implementor).  Because private technique numbers are not statically defined, the
  3889. number to name-string mapping must be obtained on a per-server basis via the QueryTechniques
  3890. protocol request.
  3891. Technique names
  3892. The name string for standard techniques contains only the name of the algorithm or compression
  3893. scheme (for example, ERROR-DIFFUSION or CCITT-G32D).  Private technique name strings
  3894. also include the name of the vendor that owns the rights to the technique (for example,
  3895. _PHOTOCO_SQUASH-BITS).  Because the organization name is encompassed by _
  3896. (underscore) characters, the leading underscore provides another means by which standard techniques
  3897. can be can differentiated from private techniques.
  3898. Default Techniques
  3899. In some cases, it is appropriate to assign a default technique.  A default technique is a synonym that
  3900. must be bound to a standard or private technique. Where there is no required standard technique, a
  3901. default technique must be defined that is bound to an optional or a private technique.  No default is
  3902. defined in cases where it would be inappropriate (for example, decode techniques describing client
  3903. data).
  3904. Technique parameters
  3905. For each occurrence of a technique within an element definition, allowance is made to pass parame-
  3906. ters that are specific to the technique.  Some techniques have defined parameters, and others have
  3907. none.  For techniques that do have defined parameters, the QueryTechniques request can be invoked
  3908. to determine if the parameters must be supplied.  If the parameters are optional and they are omitted
  3909. by the client, the server will supply implementation specific default values in their place.
  3910. If the default technique is requested, no additional parameters are accepted (implementation specific
  3911. default values will be provided for parameters defined for the technique to which Default is bound).
  3912. Technique information
  3913. The QueryTechniques request returns information about All techniques, all Default techniques, or a
  3914. group of techniques that are functionally similar (for example, Dither, Encode, Geometry, and so
  3915. on).  The following information is returned about the selected techniques:
  3916. needs-parameters        Indicates that the technique requires additional parameters; if false, the technique takes no
  3917. parameters, or its parameters are optional.  If the parameters are optional, they can be totally
  3918. omitted, otherwise they must all be supplied.
  3919. group   Identifies which group the technique belongs to.
  3920. number  Specifies the numeric identifier assigned to the technique (MS bit is zero for standard tech-
  3921. niques, or one for private techniques).
  3922. speed   Specifies the server's assessment of the speed of this technique relative to other techniques in
  3923. the same group (where 0 is the slowest, and 255 is the fastest).
  3924. name    Identifies the technique name string in the form:
  3925.   <STANDARD-TECHNIQUE-NAME> or
  3926. _<ORGANIZATION-NAME>_<PRIVATE-TECHNIQUE-NAME>
  3927. The remainder of this appendix provides a complete description of each technique and its parameters.
  3928.  
  3929. Color Allocation Techniques
  3930. Color allocation techniques allocate or match colors or gray shades from a COLORMAP.  Cells allo-
  3931. cated from a dynamic COLORMAP are recorded in a ColorList.  If the COLORMAP is static, im-
  3932. age pixels can only be matched to existing COLORMAP entries; no allocations are made and no Col-
  3933. orList needs to be specified.
  3934. AllocAll
  3935. Parameters
  3936. fill: CARD32
  3937. AllocAll allocates a read-only COLORMAP cell for each new pixel found.  If the COLORMAP runs out
  3938. of cells, the remaining new pixels are mapped to fill.  A ColorAlloc event can be sent if it is neces-
  3939. sary to use fill.  AllocAll is only appropriate for dynamic COLORMAPs and requires that the number
  3940. of discrete image pixels fit within the size of the COLORMAP to avoid running out of cells.
  3941. Match
  3942. Parameters
  3943. match-limit: XieTypFloat
  3944. gray-limit: XieTypFloat
  3945. Match allows a trade-off between image fidelity and COLORMAP usage via a pair of granularity pa-
  3946. rameters [ ]. The highest priority is given to allocating read-only cells in a sequence that provides an
  3947. even distribution of pixels throughout the colorspace.  Secondary priority is given to the frequency of
  3948. usage of image pixels.  Any image pixel that is a close enough match to an existing read-only cell will
  3949. share that cell (where close is determined by the granularity controls).  For other image pixels, new
  3950. read-only allocations are made.  When no more cells are available, each remaining image pixel is
  3951. matched to the closest read-only cell.  Match is appropriate for both static and dynamic COL-
  3952. ORMAPs.  For the sake of computational efficiency, the number of discrete image pixels should not
  3953. exceed the size of the COLORMAP.
  3954. Match-limit and gray-match control the allocation of colors and gray shades, respectively.  The mini-
  3955. mum value (0.0) specifies exact matches (within the limits of the COLORMAP).  The maximum value
  3956. (1.0) encompasses the entire colorspace within which no new cells are allocated.  A ColorAlloc event
  3957. can be sent if the COLORMAP runs out of cells.
  3958. Requantize
  3959. Parameters
  3960. max-cells: CARD32
  3961. Requantize first reduces the total number of discrete pixels values in the image to be no more than a
  3962. specified number and, then, allocates the resulting pixels values as read-only cells from the COLOR-
  3963. MAP.  One method of accomplishing this reduction process can be found in [ ].
  3964. Max-cells specifies the maximum number of COLORMAP allocations to allow.  If max-cells is zero or
  3965. greater than the number of unallocated COLORMAP cells, the reduction algorithm will restrict its out-
  3966. put to the number of free cells.  A ColorAlloc event can be sent if the number of pixels had to be re-
  3967. stricted to a lesser number than max-cells due to a lack of free COLORMAP cells.  Requantize is only
  3968. appropriate for dynamic COLORMAPs.
  3969.  
  3970.  Constrain Techniques
  3971. ClipScale
  3972. Parameters
  3973. input-low: XieTypConstant
  3974. input-high: XieTypConstant
  3975. output-low: XieTypLevels
  3976. output-high: XieTypLevels
  3977. For each band, output pixels will be clipped to the range [output-low, output-high].
  3978. If input-low is less than input-high, then all pixels less than or equal to input-low will map to output-
  3979. low, and all pixels that are greater than or equal to input-high will map to output-high.  All interme-
  3980. diate pixel values are scaled proportionately to the output range.  Nonintegral output values are
  3981. rounded to the nearest integer.
  3982. If input-low is greater than input-high then all pixels that are greater than or equal to input-low will
  3983. map to output-low, and all pixels that are less than or equal to input-high will map to output-high.
  3984. All intermediate pixel values will be linearly mapped to the output range such that input-low maps to
  3985. output-low,  and input-high maps to output-high.  Nonintegral output values are rounded to the near-
  3986. est integer.
  3987. If input-low equals input-high, or if output-low or output-high exceeds levels-1, a FloTechnique error
  3988. is generated.
  3989.  
  3990. HardClip
  3991. Parameters
  3992. < none >
  3993. HardClip constrains the data such that all negative pixels are set to zero, and all pixels greater than
  3994. levels-1 are set to levels-1.  All other pixels are rounded to the nearest integer value.
  3995.  
  3996. Convert From RGB
  3997. CIELab
  3998. Parameters
  3999. matrix: XieTypMatrix
  4000. white-adjust: XieTypWhiteAdjustTechnique
  4001. white-params: <technique-dependent>
  4002. Matrix is a 3x3 RGB to CIEXYZ conversion matrix (the source white point is also encoded in ma-
  4003. trix).  White-adjust is the WhiteAdjustTechnique that can be used to shift the white point of the out-
  4004. put data.  White-params is the list of parameters required by white-adjust.
  4005. The input DataType can be Constrained or Unconstrained; the output DataType is always Uncon-
  4006. strained.  When the input is Constrained, the data are normalized to the range [0, 1] (that is, scaled
  4007. by 1/(levels - 1) prior to the conversion.
  4008. CIEXYZ
  4009. Parameters
  4010. matrix: XieTypMatrix
  4011. white-adjust: XieTypWhiteAdjustTechnique
  4012. white-params:<technique-dependent>
  4013. Matrix is a 3x3 RGB to CIEXYZ conversion matrix (the source white point is also encoded in ma-
  4014. trix).  White-adjust is the WhiteAdjustTechnique that can be used to shift the white point of the out-
  4015. put data.  White-params is the list of parameters required by white-adjust.
  4016. The input DataType can be Constrained or Unconstrained; the output DataType is always Uncon-
  4017. strained.  When the input is Constrained, the data are normalized to the range [0, 1] (that is, scaled
  4018. by 1/(levels - 1) prior to the conversion.
  4019. YCbCr
  4020. Parameters
  4021. luma: XieTypConstant
  4022. levels: XieTypLevels
  4023. bias: XieTypConstant
  4024. Luma represents the proportions of red, green, and blue in the luminance band, Y.  Levels determines
  4025. the output levels if src is Constrained (otherwise, levels is ignored).  Bias is used to add an offset to
  4026. the output pixels values.
  4027. Source data may be Constrained or Unconstrained; the output type will match.
  4028. YCC
  4029. Parameters
  4030. luma: XieTypConstant
  4031. levels: XieTypLevels
  4032. scale: XieTypFloat
  4033. Luma represents the proportions of red, green, and blue in the luminance band, Y.  Levels determines
  4034. the output levels if src is Constrained (otherwise, levels is ignored).  Scale is used to compress the
  4035. output pixels (a typical value is about 1.35 to 1.4 in the literature).
  4036.  
  4037. Convert To RGB
  4038. CIELab
  4039. Parameters
  4040. matrix: XieTypMatrix
  4041. white-adjust: XieTypWhiteAdjustTechnique
  4042. white-params: <technique-dependent>
  4043. gamut-compress: XieTypGamutTechnique
  4044. gamut-params: <technique-dependent>
  4045. Matrix is a 3x3 CIEXYZ to RGB conversion matrix (the target white point is also encoded in matrix).
  4046. White-adjust is the WhiteAdjustTechnique that can be used to shift the white point of the source data
  4047. prior to conversion.  White-params is the list of parameters required by white-adjust.  Gamut-
  4048. compress is the GamutTechnique that can be used to keep the output pixels within the bounds of the
  4049. RGB colorspace.  Gamut-params is the list of parameters required by gamut-compress.
  4050. The input DataType must be Unconstrained; the output DataType is also Unconstrained.
  4051.  
  4052. CIEXYZ
  4053. Parameters
  4054. matrix: XieTypMatrix
  4055. white-adjust: XieTypWhiteAdjustTechnique
  4056. white-params: <technique-dependent>
  4057. gamut-compress: XieTypGamutTechnique
  4058. gamut-params: <technique-dependent>
  4059. Matrix is a 3x3 CIEXYZ to RGB conversion matrix (the target white point is also encoded in matrix).
  4060. White-adjust is the WhiteAdjustTechnique that can be used to shift the white point of the source data
  4061. prior to conversion.  White-params is the list of parameters required by white-adjust.  Gamut-
  4062. compress is the GamutTechnique that can be used to keep the output pixels within the bounds of the
  4063. RGB colorspace.  Gamut-params is the list of parameters required by gamut-compress.
  4064. The input DataType must be Unconstrained; the output DataType is also Unconstrained.
  4065.  
  4066.  
  4067. YCbCr
  4068. Parameters
  4069. luma: XieTypConstant
  4070. levels: XieTypLevels
  4071. bias: XieTypConstant
  4072. gamut-compress: XieTypGamutTechnique
  4073. gamut-params: <technique-dependent>
  4074. Luma represents the proportions of red, green, and blue in the luminance band, Y.  Levels determines
  4075. the output levels if src is Constrained (otherwise, levels is ignored).  Bias is used to remove any offset
  4076. from the source pixels values.  Gamut-compress is the GamutTechnique that can be used to keep the
  4077. output pixels within the bounds of the RGB colorspace.  Gamut-params is the list of parameters re-
  4078. quired by gamut-compress.
  4079. Source data may be Constrained or Unconstrained; the output type will match.
  4080.  
  4081. YCC
  4082. Parameters
  4083. luma: XieTypConstant
  4084. levels: XieTypLevels
  4085. scale: XieTypFloat
  4086. gamut-compress: XieTypGamutTechnique
  4087. gamut-params: <technique-dependent>
  4088. Luma represents the proportions of red, green, and blue in luminance Y.  Levels determines the output
  4089. if src is Constrained (otherwise, levels is ignored). Scale is used to expand the source pixels (a typical
  4090. value is about 1.35 to 1.4 in the literature).  Gamut-compress is the GamutTechnique that can be
  4091. used to keep the output pixels within the bounds of the RGB colorspace.  Gamut-params is the list of
  4092. parameters required by gamut-compress.
  4093. Source data may be Constrained or Unconstrained; the output type will match.
  4094.  
  4095. Convolution Edge Techniques
  4096. Various methods of handling edge conditions are provided for Convolve.  These techniques determine
  4097. what pixel values are used when Convolve requires data beyond the image bounds.  ConvolveTech-
  4098. niques only come into play when the kernel is positioned partially off the edge of the image.  Data
  4099. around the edges of a ProcessDomain are convolved with adjacent image pixels wherever possible.
  4100. Constant
  4101. Parameters
  4102. constant: XieTypConstant
  4103. Constant uses the value specified by constant if pixels are required from beyond the edge of the im-
  4104. age.
  4105. Replicate
  4106. Parameters
  4107. < none >
  4108. Replicate uses the nearest edge pixel value if pixels are required from beyond the edge of the image.
  4109.  
  4110. Decode Techniques
  4111. UncompressedSingle
  4112. Parameters
  4113. fill-order: XieTypOrientation
  4114. pixel-order: XieTypOrientation
  4115. pixel-stride: CARD8
  4116. left-pad: CARD8
  4117. scanline-pad: CARD8
  4118. UncompressedTriple
  4119. Parameters
  4120. fill-order: XieTypOrientation
  4121. pixel-order: XieTypOrientation
  4122. band-order: XieTypOrientation
  4123. interleave: XieTypInterleave
  4124. pixel-stride: XieTypTripletofCARD8
  4125. left-pad: XieTypTripletofCARD8
  4126. scanline-pad: XieTypTripletofCARD8
  4127. These techniques are used when no compression scheme has been applied to the image data. They are
  4128. used for SingleBand and TripleBand data, respectively.  Their parameters define the format of the
  4129. DataStream of uncompressed data (the server may reformat the data as it chooses prior to processing
  4130. or storage).
  4131. The following parameters are common to both techniques:
  4132. *       When multiple pixels are put in the same byte or a pixel spans multiple bytes, fill-order specifies
  4133. whether the pixels (or parts of pixels) are packed into the most or least significant bits of a byte
  4134. first.
  4135. *       For pixels that span a byte boundary, pixel-order defines whether the most or least significant bits
  4136. of the pixel are transported first within the DataStream.
  4137. *       Pixel-stride is the number of bits between the start of consecutive pixels within a scanline.  It
  4138. must be at least enough bits to contain the number of input levels.
  4139. *       Left-pad is the number of pad bits preceding the first image pixel in each scanline.  If the server's
  4140. Alignment attribute is Alignable or pixel-stride fits the definition of Alignable, the value of left-
  4141. pad must be a multiple of pixel-stride or a multiple of 8; otherwise, left-pad may be any arbitrary
  4142. value.
  4143. *       Scanline-pad defines a multiple of bytes to which each scanline is padded; valid values are: 0
  4144. (not aligned), 1, 2, 4, 8, and 16.  The total number of bits-per-scanline in the DataStream in-
  4145. cludes: left-pad, the image data (width x pixel-stride), and sufficient additional bits to satisfy
  4146. scanline-pad.
  4147. The following parameters are only used by UncompressedTriple:
  4148. *       Band-order is the order of the image bands or image planes as they are transmitted through the
  4149. protocol stream.
  4150. *       Interleave describes how the image bands are interleaved (per pixel within a single plane, or sent
  4151. as three separate planes).  If interleave is BandByPixel, inter-band dimensions must match (that
  4152. is, the widths and the heights of all bands must match).
  4153.  
  4154. CCITT-G31D
  4155. Parameters
  4156. encoded-order: XieTypOrientation
  4157. radiometric: BOOL
  4158. normal: BOOL
  4159. CCITT-G31D is the CCITT group 3 one dimensional encoding technique as defined by [ ].
  4160. Encoded-order specifies the bit-order of the encoded data. Radiometric specifies that white runs in
  4161. the encoded data should be represented as image ones upon decode (maximum intensity), or, con-
  4162. versely, they will be decoded as image zeros if radiometric is false.  Normal specifies that the data
  4163. was processed according to its normal fill-order when it was originally encoded  .
  4164.  
  4165.  
  4166. CCITT-G32D
  4167. Parameters
  4168. encoded-order: XieTypOrientation
  4169. radiometric: BOOL
  4170. normal: BOOL
  4171. CCITT-G32D is the CCITT group 3 two dimensional encoding technique as defined by [1].
  4172. Encoded-order specifies the bit-order of the encoded data. Radiometric specifies that white runs in
  4173. the encoded data should be represented as image ones upon decode (maximum intensity), or, con-
  4174. versely, they will be decoded as image zeros if radiometric is false.  Normal specifies that the data
  4175. was processed according to its normal fill-order when it was originally encoded 2.
  4176.  
  4177.  
  4178. CCITT-G42D
  4179. Parameters
  4180. encoded-order: XieTypOrientation
  4181. radiometric: BOOL
  4182. normal: BOOL
  4183. CCITT-G42D is the CCITT group 4 two dimensional encoding technique as defined by [ ].
  4184. Encoded-order specifies the bit-order of the encoded data. Radiometric specifies that white runs in
  4185. the encoded data should be represented as image ones upon decode (maximum intensity), or, con-
  4186. versely, they will be decoded as image zeros if radiometric is false.  Normal specifies that the data
  4187. was processed according to its normal fill-order when it was originally encoded 2.
  4188.  
  4189. JPEG-Baseline
  4190. Parameters
  4191. interleave: XieTypInterleave
  4192. band-order: XieTypOrientation
  4193. up-sample: BOOL
  4194. JPEG-Baseline is the baseline Huffman DCT encoding technique that is defined in [ ].  Only JPEG
  4195. Interchange Format (JIF) is supported (that is, all tables, compressed data, and so on are embedded in
  4196. the data stream, all delineated by markers).
  4197. Interleave determines if all bands of a TripleBand image will be interleaved within a single encoded
  4198. stream or if three separate encoded streams are expected.  Band-order specifies the order in which the
  4199. image bands were originally encoded.  Up-sample specifies that, if any bands in an interleaved en-
  4200. coded data stream are down-sampled, they should be up-sampled by the JPEG decoder.
  4201. Interleave, band-order, and up-sample are ignored for SingleBand images, and up-sample is always
  4202. ignored if interleave is BandByPlane.  If up-sample is false and some of the encoded bands of an in-
  4203. terleaved image were down-sampled, an alternative method for up-sampling the image would be to
  4204. use a Geometry element with appropriate band-mask and sample technique parameters.
  4205.  
  4206.  
  4207. JPEG-Lossless
  4208. Parameters
  4209. interleave: XieTypInterleave
  4210. band-order: XieTypOrientation
  4211. JPEG-Lossless is the Huffman predictive sequential lossless encoding technique that is defined in [1].
  4212. Interleave describes how the bands of TripleBand data are interleaved; either all bands are inter-
  4213. leaved within a single encoded stream, or three separate encoded streams are expected.  Band-order
  4214. specifies the order in which the image bands were originally encoded.
  4215. Interleave and band-order are ignored for SingleBand images.
  4216.  
  4217. TIFF-2
  4218. Parameters
  4219. encoded-order: XieTypOrientation
  4220. radiometric: BOOL
  4221. normal: BOOL
  4222. TIFF-2 is modified Huffman encoding as described in [ ]. (TIFF compression scheme 2).
  4223. Encoded-order specifies the bit-order of the encoded data. Radiometric specifies that white runs in
  4224. the encoded data should be represented as image ones upon decode (maximum intensity), or, con-
  4225. versely, they will be decoded as image zeros if radiometric is false.  Normal specifies that the data
  4226. was processed according to its normal fill-order when it was originally encoded  .
  4227.  
  4228.  
  4229. TIFF-PackBits
  4230. Parameters
  4231. encoded-order: XieTypOrientation
  4232. normal: BOOL
  4233. TIFF-PackBits is byte-oriented run-length encoding as described in [1] (TIFF compression scheme
  4234. 32773).
  4235. Encoded-order specifies the bit-order of the encoded data.  Normal specifies that the data was proc-
  4236. essed according to its normal fill-order when it was originally encoded 2.
  4237.  
  4238. Dithering Techniques
  4239. Dithering reduces the z-resolution or number of quantization levels in a continuous tone image.  It
  4240. simulates the visual appearance of the original image by substituting the original continuous tone data
  4241. with patterns of lower z-resolution data.  In ordered dither, fixed patterns are used.  In error-diffusion
  4242. dither, the patterns are somewhat random and generally less distracting to the eye.  A thorough treat-
  4243. ment of dithering techniques can be found in [ ].
  4244. ErrorDiffusion
  4245. Parameters
  4246. < none >
  4247. ErrorDiffusion dither is an image level reduction process where the difference (error) between output
  4248. pixel values and input pixel values is fed back through a filter to be applied to future input pixels.
  4249. Thus, past quantization errors are negatively distributed or diffused into the yet to be requantized im-
  4250. age.
  4251.  
  4252. Figure A-1   Diagram of the ErrorDiffusion algorithm
  4253. An analysis of various error filters is presented in chapter 8 of [1].  One popular error filter is de-
  4254. scribed in [ ].
  4255.  
  4256.  
  4257. Ordered
  4258. Parameters
  4259. threshold-order: CARD8
  4260. Dispersed-dot Ordered dither replaces a matrix, or block, of pixels with a patterned matrix of pixels.
  4261. This patterned matrix of pixels is applied across the entire image.  Because these patterns may intro-
  4262. duce artifacts that are distracting to the eye, the threshold-order parameter is available to determine
  4263. the size of the dither matrix, and, therefore, the number of levels that can be simulated. If the value of
  4264. threshold-order is M, the threshold matrix can simulate 2M+1 levels.
  4265. For more information refer to [ ], and chapter 6 of [ ].
  4266.  
  4267. Encode Techniques
  4268. ServerChoice (only valid for ExportPhotomap)
  4269. Parameters
  4270. preference: CARD8       { PreferDefault, PreferSpace, PreferTime }
  4271. ServerChoice allows the server to choose an encode technique.  An optional hint can be provided to
  4272. help the server make its choice, but the server is not obligated to obey the hint. PreferTime hints that
  4273. retrieval performance is the desired metric; PreferSpace indicates that frugal use of storage space is
  4274. more important.  Normally, ServerChoice must choose a lossless encode technique, but when data is
  4275. received from an adjacent upstream import element, it may choose to pass the import elements input
  4276. data directly to the Photomap.
  4277.  
  4278. UncompressedSingle
  4279. Parameters
  4280. fill-order: XieTypOrientation
  4281. pixel-order: XieTypOrientation
  4282. pixel-stride: CARD8
  4283. scanline-pad: CARD8
  4284. UncompressedTriple
  4285. Parameters
  4286. fill-order: XieTypOrientation
  4287. pixel-order: XieTypOrientation
  4288. band-order: XieTypOrientation
  4289. interleave: XieTypInterleave
  4290. pixel-stride: XieTypTripletofCARD8
  4291. scanline-pad: XieTypTripletofCARD8
  4292. UncompressedSingle and UncompressedTriple specify that no compression scheme is to be applied
  4293. to the image data. They are used for SingleBand and TripleBand data, respectively.  Their parameters
  4294. define the format of the DataStream of uncompressed data that is made available for client retrieval
  4295. via GetClientData.
  4296. The following parameters are common to both techniques:
  4297. *       When multiple pixels are put in the same byte or a pixel spans multiple bytes, fill-order specifies whether
  4298. the pixels (or parts of pixels) are packed into the most or least significant bits of a byte first.
  4299. *       For pixels that span a byte boundary, pixel-order defines whether the most or least significant bits of the
  4300. pixel are put first within the DataStream.
  4301. *       Pixel-stride is the number of bits between the start of consecutive pixels within a scanline. It must be at
  4302. least enough bits to contain the number of src levels.
  4303. *       Scanline-pad defines a multiple of bytes to which each scanline is padded; valid values are: 0 (not aligned),
  4304. 1, 2, 4, 8, and 16.
  4305. The following parameters are only used by UncompressedTriple:
  4306. *       Band-order is the order of the image bands or image planes as they are transmitted through the protocol
  4307. stream.
  4308. *       Interleave describes how the bands are interleaved (per pixel within a single plane, or sent as three separate
  4309. planes).  Export of down-sampled BandByPixel data is not supported (that is, all bands must have equal
  4310. widths and equal heights).
  4311.  
  4312. CCITT-G31D
  4313. Parameters
  4314. align-eol: BOOL
  4315. radiometric: BOOL
  4316. encoded-order: XieTypOrientation
  4317. CCITT-G31D is the CCITT group 3 one dimensional encoding technique as defined by [ ].
  4318. Align-eol, if true, specifies that sufficient fill bits must precede EOL codes to guarantee that each
  4319. EOL will end on a byte boundary (thus EOL will be a nibble of 0 followed by a byte of 1: xxxx,00002
  4320. 0000,00012). Radiometric specifies that image ones will be encoded as white runs, or, conversely,
  4321. image zeros will be encoded as white runs if radiometric is false.  Encoded-order specifies the bit-
  4322. order for the encoded data.
  4323.  
  4324.  
  4325. CCITT-G32D
  4326. Parameters
  4327. uncompressed: BOOL
  4328. align-eol: BOOL
  4329. radiometric: BOOL
  4330. encoded-order: XieTypOrientation
  4331. k-factor: CARD32
  4332. CCITT-G32D is the CCITT group 3 two dimensional encoding technique as defined by [1].
  4333. Uncompressed, if true, will enable the use of the uncompressed-mode CCITT extension.  If true,
  4334. align-eol specifies that sufficient fill bits must precede EOL codes to guarantee that each EOL will
  4335. end on a byte boundary (thus EOL will be a nibble of 0 followed by a byte of 1: xxxx,00002
  4336. 0000,00012). Radiometric specifies that image ones will be encoded as white runs, or, conversely,
  4337. image zeros will be encoded as white runs if radiometric is false.  Encoded-order specifies the bit-
  4338. order for the encoded data.  K-factor specifies the number of 2D scanlines to produce for each 1D
  4339. scanline.
  4340.  
  4341.  
  4342. CCITT-G42D
  4343. Parameters
  4344. uncompressed: BOOL
  4345. radiometric: BOOL
  4346. encoded-order: XieTypOrientation
  4347. CCITT-G42D is the CCITT group 4 two dimensional encoding technique as defined by [ ].
  4348. If true, uncompressed will enable the use of the uncompressed-mode CCITT extension. Radio-
  4349. metric specifies that image ones will be encoded as white runs, or, conversely, image zeros will be
  4350. encoded as white runs if radiometric is false.  Encoded-order specifies the bit-order for the encoded
  4351. data.
  4352.  
  4353. JPEG-Baseline
  4354. Parameters
  4355. interleave: XieTypInterleave
  4356. band-order: XieTypOrientation
  4357. horizontal-samples: XieTypTripletofCARD8
  4358. vertical-samples: XieTypTripletofCARD8
  4359. q-table: LISTofCARD8
  4360. ac-table: LISTofCARD8
  4361. dc-table: LISTofCARD8
  4362. JPEG-Baseline is baseline Huffman DCT encoding as defined by [ ].  A stream of JPEG Interchange
  4363. Format (JIF) data is produced (that is, all tables, compressed data, and so on, delineated by markers).
  4364. Interleave determines if all bands of a TripleBand image will be interleaved within a single encoded
  4365. stream or if three separate encoded streams will be produced.  Band-order specifies the order in which
  4366. the bands are encoded.  Horizontal-samples and vertical-samples are the horizontal and vertical sam-
  4367. pling factors.  Q-table is the quantization table.  Ac-table specifies the AC Huffman table and dc-
  4368. table specifies the DC Huffman table.
  4369. One q-table per band or a single q-table may be shared between all bands.  Generally, there is a single
  4370. AC/DC pair of Huffman tables, but, for TripleBand BandByPixel data, there may be two pairs of ta-
  4371. bles (one for the luminance band and the other for the chromanance bands).  If any table is specified
  4372. with zero length, it indicates that the server implementor is to supply that table (for example, the ex-
  4373. ample tables defined in [1]).
  4374. Interleave, band-order, horizontal-samples, and vertical-samples are ignored for SingleBand images,
  4375. and horizontal-samples and vertical-samples are always ignored if interleave is BandByPlane. Horizon-
  4376. tal-samples and vertical-samples share the definitions and restrictions stipulated for parameters Hi and Vi,
  4377. respectively, that are specified in annexes A and B of [1].
  4378.  
  4379. JPEG-Lossless
  4380. Parameters
  4381. interleave: XieTypInterleave
  4382. band-order: XieTypOrientation
  4383. predictor: { PredictorNone      None
  4384.                     PredictorA  A
  4385.                     PredictorB  B
  4386.                     PredictorC  C
  4387.                     PredictorABC        A+B-C
  4388.                     PredictorABC2       A+((B-C)/2)
  4389.                     PredictorBAC2       B+((A-C)/2)
  4390.                     PredictorAB2 }      (A+B)/2
  4391. table: LISTofCARD8
  4392. JPEG-Lossless, corresponds to frames encoded using Huffman, predictive sequential lossless encod-
  4393. ing as defined by [1].  A DataStream of JPEG Interchange Format (JIF) data is returned (that is, all
  4394. tables, compressed data, and so on, delineated by markers).
  4395. Interleave determines if all bands of a TripleBand image will be interleaved within a single encoded
  4396. stream or if three separate encoded streams will be produced.  Band-order specifies the order in which
  4397. the bands are encoded.  Interleave and band-order are ignored for SingleBand images.
  4398. Predictor is the predictor selection value (one per band).  Table is the lossless entropy encoding table
  4399. (up to one per band).  Specifying a table of length zero indicates that the server implementor should
  4400. supply a table (for example, the example tables defined in [1]).
  4401. TIFF-2
  4402. Parameters
  4403. radiometric: BOOL
  4404. encoded-order: XieTypOrientation
  4405. TIFF-2 is modified Huffman compression as described in [ ] (TIFF compression scheme 2).
  4406. Radiometric specifies that image ones will be encoded as white runs, or, conversely, image zeros
  4407. will be encoded as white runs if radiometric is false.  Encoded-order specifies the bit-order for the
  4408. encoded data.
  4409.  
  4410.  
  4411. TIFF-PackBits
  4412. Parameters
  4413. encoded-order: XieTypOrientation
  4414. TIFF-PackBits is byte-oriented run-length encoding as described in [1] (TIFF compression scheme
  4415. 32773).
  4416. Encoded-order specifies the bit-order of the encoded data.
  4417.  
  4418. Gamut Compression Techniques
  4419. GamutTechnique defines the gamut compression techniques used by the ConvertToRGB element.
  4420. It deals with converted colors that fall outside the gamut of the RGB colorspace.
  4421. None
  4422. Parameters
  4423. < none >
  4424. None specifies that no gamut compression is required.
  4425.  
  4426. ClipRGB
  4427. Parameters
  4428. < none >
  4429. ClipRGB ensures that Unconstrained output pixel values remain within the implicit range [0.0, 1.0].
  4430. Note that Constrained data are clipped to the range [0, levels-1] by definition.
  4431.  
  4432. Geometry Techniques
  4433. Antialias
  4434. Parameters
  4435. < none >
  4436. Some Geometry techniques produce artifacts when replicating pixels or sampling the input image at
  4437. distinct intervals.  One example are the jaggies that one often sees along diagonal lines and curved
  4438. objects in an image.  Another indication is that some techniques, such as, nearest neighbor, seem to
  4439. drop image detail.  For example, one could scale down an image by four simply by selecting every
  4440. fourth row and column in the input image.  Given an image with a set of randomly placed vertical
  4441. lines, each line will have a 75% chance of being dropped in the output image.  As a result, the output
  4442. image in the worst case may have little resemblance to the input image.
  4443. Antialiasing techniques incorporate information from an area of pixels in the input image in order
  4444. to produce each output pixel.  This implies that line dropouts and other artifacts will occur less often,
  4445. and the output image may have markedly better resemblance to the input image.
  4446. The techniques AntialiasByArea and AntialiasByLowpass are two examples of specific antialiasing
  4447. algorithms.  Antialias may be mapped to either of them or to a vendor-private algorithm.  All pa-
  4448. rameters for the specific algorithm employed are defaulted by the server.
  4449.  
  4450. AntialiasByArea
  4451. Parameters
  4452. simple: INT16
  4453. Geometry may be used to scale an image down from a larger size to a smaller size. This will decrease
  4454. the density of pixels per unit area in the image.  In Figure A-2(a),  an input image at the original
  4455. resolution is displayed.  It is to be reduced to the grid shown in Figure A-2(b), where the original im-
  4456. age is superimposed on the new, lower density grid.  Figure A-2(c) shows a possible result of using
  4457. nearest-neighbor sampling to fill the output grid.  Specifically, the output pixel's upper-left corner is
  4458. matched against the nearest upper-left corner of pixels in the input image.  If the nearest input pixel
  4459. is black, the output pixel is filled with black.  Otherwise, it is filled with white.  While the pixel in-
  4460. tensities (in this case, pure black and pure white) are preserved by this operation, the overall image
  4461. shape is changed.
  4462.  
  4463.  
  4464. Figure A-2   Effect of sampling technique when scaling to a lower pixel density
  4465. In Figure A-2(d),  the output image is computed by assigning to each output pixel the weighted aver-
  4466. age of the intensity values of input pixels that fall within its area.  That is, the four corners of the out-
  4467. put pixel are projected back onto the input image.  The input pixels that lie within this area contribute
  4468. according to the following:
  4469.  
  4470.  
  4471.   is the intensity of output pixel  .   stands for the projection of   into the input image
  4472. space.   is the area of   in the input image space.   is the area of the intersection
  4473. of   with the rectangular locus of  .  The sum progresses over all pixels   in the input image (note
  4474. that for most such pixels, the area of intersection will be zero).
  4475.  
  4476. Figure A-3 illustrates the calculation for a single output pixel, P,  whose projection intersects nine
  4477. input pixels to various degrees.  Note that the number of pixels intersected depends on the degree of
  4478. scaling involved.  A greater reduction in producing the output image will cause more input pixels to
  4479. be intersected per output pixel.  Also,  in case of nonorthogonal rotation of the image, the areas of
  4480. intersection will not be rectangular in general.
  4481.  
  4482.  
  4483. Figure A-3   Illustration of an output pixel mapping back to the input image
  4484. Because of the computational complexity of this method,  two approximations are supported.  If sim-
  4485. ple is nonzero,  the pixels covered by the projected area will be averaged without regard to the relative
  4486. amount of gray area that they contain: if they are touched by the area, they are included in a simple
  4487. average.  If simple is set to N, with N odd and greater than one (3,5,7, ...), then only the center point
  4488. of the output pixel is projected, and a simple average is taken of an N by N window centered on the
  4489. projection.  For best results, N should correspond roughly to the amount of scaling that will be done.
  4490.  
  4491. AntialiasByLowpass
  4492. Parameters
  4493. kernel-size: INT16
  4494. Geometry may be used to scale an image down from a larger size to a smaller size. This will decrease
  4495. the density of pixels per unit area in the image.  Figure A-2 demonstrates the difference between
  4496. scaling an image down using nearest-neighbor vs. antialias techniques.  AntialiasByArea preserves
  4497. shape, as in Figure A-2 (d) but can be very slow computationally. The method presented here repre-
  4498. sents an approximation to AntialiasByArea , which can be faster, yet provides similar results.
  4499. Figure A-4 demonstrates how antialiasing can be produced using a low-pass filter.  A 3x3 boxcar ker-
  4500. nel is passed over the original input image, in Figure A-4 (b).  This image is shown superimposed on
  4501. the lower density grid in Figure A-4 (c).  Nearest neighbor sampling by selecting the value of the in-
  4502. put pixel in the upper-left corner of the output pixel area results in the image in Figure
  4503. A-4(d).  As was the case with AntialiasByArea, the overall structure of the input image is main-
  4504. tained.
  4505.  
  4506. Figure A-4   Sequence producing an antialiased image using a low-pass filter
  4507. The user is allowed to select the size of the image kernel via the kernel-size parameter.  For best re-
  4508. sults, kernel-size should be chosen to correspond roughly to the amount of scaling that will be done.
  4509. Note that the server chooses the best kernel for the appropriate size; the values used in the kernel are
  4510. not alterable by the client application.  Clients wishing to specify the kernel in more detail should use
  4511. Convolve directly.
  4512.  
  4513. BilinearInterpolation
  4514.  Parameters
  4515. < none >
  4516.  
  4517. Geometry maps each pixel (x',y') in the output image to the coordinate location (x,y) in the input
  4518. image by:
  4519.         (1)
  4520.  
  4521. It is not unusual that the input location (x,y), so derived will be nonintegral and will not correspond
  4522. exactly to a single pixel in the input image.  In this case, we can obtain an interpolated value by first
  4523. interpolating its neighbors in the X direction followed by an interpolation in the Y direction, as de-
  4524. picted below.
  4525.  
  4526. Pixel grid locations P, Q, R, and S are integral.  Pixel location X = (x,y)T, obtained  from the map-
  4527. ping equation above, differs from P by fractional amounts s in the x direction and t in the y direc-
  4528. tion.  Point pq is the projection of X on line PQ, and point sr is the projection of X on line SR.
  4529. Let I(P) be the value of the input image at coordinate P, if P is within the image extent.  Otherwise,
  4530. let I(P) be constant, where constant is the pixel value passed to the Geometry element.  A value of
  4531. I(X)must be estimated from I(P),  I(Q),  I(R),  and  I(S).  We may obtain estimates of I(pq)
  4532. and I(sr) by:
  4533. I(pq)   = (1 - s) * I(P) + s * I(Q)
  4534. I(sr)   = (1 - s) * I(S) + s * I(R)
  4535. Given values for I(pq) and I(sr), I(X) is obtained by interpolating in the y direction:
  4536. I(X)    = (1 - t) * I(pq) + t * I(sr)
  4537. Thus
  4538. I(X) = (1 - s) * (1 - t) * I(P) + (1 - s) * t * I(S) + s * (1 - t) * I(Q) + s * t * I(R)
  4539. Note that I(X) provides sensible values for the extreme values of s and t (0 and 1) and for
  4540. s = t = 1/2.
  4541.  
  4542. Gaussian
  4543. Parameters
  4544. sigma: XieTypFloat
  4545. normalize: XieTypFloat
  4546. radius: CARD8
  4547. simple: BOOL
  4548. Sigma is the drop-off rate; normalize is a normalization constant; radius defines the extent of com-
  4549. putation; and, simple allows the use of an approximate form.
  4550.  
  4551. Geometry maps each pixel (x',y') in the output image to the coordinate location (x,y) in the input
  4552. image by:
  4553.         (1)
  4554.  
  4555. It is not unusual that the input location (x,y), so derived will be nonintegral and will not correspond
  4556. exactly to a single pixel in the input image.  The situation is depicted below:
  4557.  
  4558. Pixel grid locations P, Q, R, and S are integral.  Pixel location X = (x,y)T, obtained  from the map-
  4559. ping equation above, differs from P by fractional amounts s (horizontally) and t (vertically).
  4560. Let I(P) be the value of the input image at coordinate P, if P is within the image extent.  Otherwise,
  4561. let I(P) be constant, where constant is the pixel value passed to the Geometry element.  A value of
  4562. I(X) must be estimated from I(P), I(Q), I(R),  and I(S).  From sampling theory, a band width lim-
  4563. ited continuous input image can be recovered perfectly (under certain conditions) from its sampled
  4564. output by computing the convolution:
  4565.  
  4566. I(x,y) is the continuous image, i(m,n) the discrete sampled image, and h(u,v) the impulse response
  4567. function for an appropriate low pass filter.  Note that both nearest-neighbor and bilinear interpolation
  4568. resampling techniques may be cast in this form [ ].
  4569. A Gaussian impulse response function has the quality that its Fourier transform has the same bell
  4570. curve shape.  For certain kinds of images, this provides a better approximation to an ideal low-pass
  4571. filter than is represented by either bilinear or nearest-neighbor interpolation. The specific form of
  4572. h(u,v) is given by:
  4573.  
  4574. The   term is called the normalization constant and may be altered using the normalize pa-
  4575. rameter.  The suggested value for s is 1.  Note that all technique parameters must be chosen in con-
  4576. cert.
  4577. As an example of Gaussian interpolation, assume s = 1 and that point P in the above figure has coor-
  4578. dinates (m',n').  Then x = m'+ s and y = n'+ t, and the basic interpolation equation at (x,y) be-
  4579. comes:
  4580.  
  4581. The contribution from point P in this equation is represented by the summation value for m = m',
  4582. n = n'.  Identifying this term in Eq (4), the contribution is:
  4583.  
  4584. Or:
  4585.  
  4586. Similar calculations reveal:
  4587.                 (7)
  4588.                 (8)
  4589.                 (9)
  4590. A suggested value for radius is one, that is, only pixels within a distance of one in either the x or y
  4591. direction are involved in the calculation.  Thus, I(x,y) is given by the sum of Eqs. 6-9.  Choosing a
  4592. larger radius would bring in more terms.
  4593. For computational convenience, a simplified form of Gaussian interpolation is provided. If simple is
  4594. true, the impulse-response function of Equation 3a is replaced by:
  4595.                 (3b)
  4596. The normalization factor N is defined by normalize.  As with true Gaussian interpolation, the radius
  4597. parameter is used to determine the number of pixels involved in the computation.
  4598.  
  4599. NearestNeighbor
  4600. Parameters
  4601. modify: CARD8   {       FavorDown,      FavorUp,
  4602. RoundNW,        RoundNE,
  4603. RoundSW,        RoundSE  }
  4604.         (1)
  4605.  
  4606. Geometry maps each pixel (x',y') in the output image to the coordinate location (x,y) in the input
  4607. image  by:
  4608. It is not unusual that the input location (x,y), so derived will be nonintegral and will not correspond
  4609. exactly to a single pixel in the input image.  The situation is depicted below:
  4610.  
  4611. Pixel grid locations P, Q, R, and S are integral.  Pixel location X = (x,y)T, obtained  from the map-
  4612. ping equation above, differs from P by fractional amounts s in the x direction and t in the y direc-
  4613. tion.
  4614. Let I(P) be the value of the input image at coordinate P if P is within the image extent.  Otherwise,
  4615. let I(P) be constant, where constant is the pixel value passed to the Geometry element.  A value of
  4616. I(X) must be estimated from I(P),  I(Q),  I(R),  and  I(S).  In nearest-neighbor sampling, we
  4617. simply choose the image value from the discrete location closest to X.  Thus,
  4618. if s < 1/2, t < 1/2, set I(X) = I(P),
  4619. if s > 1/2, t < 1/2, set I(X) = I(Q),
  4620. if s > 1/2, t > 1/2, set I(X) = I(R),
  4621. if s < 1/2, t > 1/2, set I(X) = I(S).
  4622. The behavior on even boundaries (s = 1/2 or t = 1/2) is determined by the modify parameter. If
  4623. modify is FavorDown, all less than signs in the above are replaced with less than or equal signs.
  4624. Thus, P would win all ties; S and Q would lose to P but win over R; and, R would lose all ties. If
  4625. modify is FavorUp , then all greater than signs would be replaced with greater than or equals, and
  4626. the opposite behavior would occur.
  4627. Four additional options are provided. The RoundNW option will always choose P; RoundNE will al-
  4628. ways choose Q; RoundSE will always choose R; and, RoundSW will always choose S. These are not
  4629. strictly nearest neighbor algorithms but are available for computational/filtering convenience.
  4630.  
  4631. Histogram Shapes
  4632. MatchHistogram matches the histogram of a source image to a specific shape represented by a prob-
  4633. ability density function.  HistogramShape defines various shapes that can be requested.
  4634. Flat
  4635. Parameters
  4636. < none >
  4637. Flat specifies that the output image is to have a histogram that approximates a uniform density
  4638. (histogram equalization).  No additional parameters are required.
  4639.  
  4640. Gaussian
  4641. Parameters
  4642. mean: XieTypFloat
  4643. sigma: XieTypFloat
  4644. Gaussian specifies that the output image is to have histogram that approximates a Gaussian probabil-
  4645. ity density.  The supplied parameters are used to generate a Gaussian probability density function
  4646. centered around the mean level with a spread specified by sigma:
  4647.  
  4648.  
  4649. Hyperbolic
  4650. Parameters
  4651. constant: XieTypFloat
  4652. shape-factor: BOOL
  4653. Hyperbolic specifies that the output image is to have histogram that approximates a hyperbolic prob-
  4654. ability density.
  4655. Constant is used to generate a hyperbolic probability density function:
  4656.  
  4657. Shape-factor should be specified as false if the histogram shape represents decreasing values for
  4658. higher levels or true if the shape represents increasing values for higher levels.
  4659.  
  4660. White Point Adjustment Techniques
  4661. WhiteAdjustTechnique defines the white point adjustment techniques that can be used when con-
  4662. verting to or from the RGB colorspace.   White point correction can be used to ensure that white looks
  4663. white, or it can be used to change the overall tint of an image.
  4664. None
  4665. Parameters
  4666. < none >
  4667. None specifies that no white point correction is desired.
  4668. CIELabShift
  4669. Parameters
  4670. white-point: XieTypConstant
  4671. CIELabShift specifies that white point correction is to be accomplished by adding the white point
  4672. displacement to the a*b* plane in the CIELab colorspace. The white-point is specified using
  4673. CIEXYZ encodings.
  4674. If WhiteAdjustTechnique is used with ConvertFromRGB, white-point specifies the desired white
  4675. point of the output data.  If WhiteAdjustTechnique is used with ConvertToRGB, white-point speci-
  4676. fies the white point of the source data.
  4677.  
  4678.         A full description of the color matching algorithm is available upon request from author Shelley.
  4679.         "Color image quantization for frame buffer display", by P. S. Heckbert, Computer Graphics (ACM SIGGRAPH '82 Conf. Proc.),
  4680. vol. 16, no. 3, page 297.
  4681.         CCITT T.4,  "Standardization of Group 3 Facsimile Apparatus for Document Transmission"
  4682.         Image compression generally starts with the least significant pixel in the image (at coordinate 0,0) and proceeds in raster order to
  4683. the end of the image.  This would be the normal order.  Some encoders read pixels in reversed order within each byte (that is, start
  4684. reading at bit 7 and proceed down through 0, then 15 through 8, and so on).  Specifying normal as false can correct for this situa-
  4685. tion upon decode (that is, the bit order within each byte of decoded data is reversed before the data are forwarded to downstream
  4686. elements).
  4687.         CCITT T.6,  "Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus"
  4688.         ISO DIS 10918-1 "Digital Compression and Coding of Continuous-tone Still Images"
  4689.         "TIFF Tag Image File Format", revision 6.0, draft 2, by Aldus Corporation
  4690.         Image compression generally starts with the least significant pixel in the image (at coordinate 0,0) and proceeds in raster order to
  4691. the end of the image.  This would be the normal order.  Some encoders read pixels in reversed order within each byte (that is, start
  4692. reading at bit 7 and proceed down through 0, then 15 through 8, and so on).  Specifying normal as false can correct for this situa-
  4693. tion upon decode (that is, the bit order within each byte of decoded data is reversed before the data are forwarded to downstream
  4694. elements).
  4695.         "Digital Halftoning", by R. A. Ulichney, Cambridge, MA: The MIT Press
  4696.         "Adaptive algorithm for spatial grey scale", by R. W. Floyd and L. Steinberg, SID Int. Sym. Digest of Tech. Papers, page 36
  4697.         "An optimum method for two level rendition of continuous-tone pictures", by B. E. Bayer,  Proc. IEEE Int. Conf. Commun.,
  4698. Conference Record, page 26-11
  4699.         "Digital Halftoning", by R. A. Ulichney, Cambridge, MA: The MIT Press
  4700.         CCITT T.4,  "Standardization of Group 3 Facsimile Apparatus for Document Transmission"
  4701.         CCITT T.6  "Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus"
  4702.         ISO DIS 10918-1 "Digital Compression and Coding of Continuous-tone Still Images"
  4703.         "TIFF Tag Image File Format", revision 6.0, draft 2, by Aldus Corporation
  4704.         A. Jain. Fundamentals of Digital Image Processing.  Englewood Cliffs, J.J.: Prentice-Hall, 1989
  4705.  
  4706.  
  4707. Techniques   A-28
  4708.  
  4709.  
  4710. B
  4711. Service Class
  4712. Full
  4713. The full XIE protocol is deemed sufficient to rendering and displaying bitonal, gray-scale, and color
  4714. images on an X server.  Full XIE encompasses everything in this document.
  4715. DIS
  4716. The Document Imaging Subsets (DIS) targeted at the viewing of compressed, bitonal documents on
  4717. displays that might not otherwise have the resources for the full XIE protocol. DIS provides a mini-
  4718. mal set of primitives for manipulating Constrained, SingleBand data and differs from Full XIE in
  4719. the following ways:
  4720. *       Only LUT, Photomap, Photoflo, and Photospace resources are supported.
  4721. *       ColorList and ROI resources are not supported.
  4722. *       Only Geometry and Point process elements are supported.
  4723. *       Restricting processing via a ProcessDomain is not supported.
  4724. *       TripleBand data is not supported.
  4725. *       Image data is always Constrained and is limited to 2max-depth levels, where max-depth is the depth
  4726. of the deepest DRAWABLE supported by the server.
  4727. *       The Decode_JPEG-Baseline technique is optional (rather than required).
  4728. Typical DIS applications will use relatively simple Photoflos that import image data, apply a geomet-
  4729. ric transformation, and export the result to a DRAWABLE for display.  Figure B-1 summarizes the im-
  4730. port, process, and export elements that are provided in DIS:
  4731. Sources Operators       Destinations
  4732. ImportDrawable  Geometry        ExportDrawable
  4733. ImportDrawablePlane     Point   ExportDrawablePlane
  4734. ImportLUT               ExportLUT
  4735. ImportClientLUT         ExportClientLUT
  4736. ImportPhotomap          ExportPhotomap
  4737. ImportClientPhoto               ExportClientPhoto
  4738. Figure B-1   DIS sources, operators, and destinations
  4739. Service Class Summary
  4740. The following tables summarize the service classes to which each item in the XIE protocol belongs.
  4741. For some XIE types, where a list of alternative values is defined, some of the alternative values are
  4742. required for a particular service class, while others are not.  In these cases, the alternative values are
  4743. itemized.  If all items of a type are required or none are, the type itself is either required or excluded.
  4744. Alternative techniques are listed separately in Table B-2.
  4745.  
  4746. Table B-1   Types itemized by ServiceClass
  4747. Type    Full    DIS
  4748. XieTypAlignment required        required
  4749. XieTypArithmeticOp      required        excluded
  4750. XieTypColorAllocTechnique       required        excluded
  4751. XieTypColorList required        excluded
  4752. XieTypCompareOp required        excluded
  4753. XieTypConstant  required        required
  4754. XieTypConstrainTechnique        required        excluded
  4755. XieTypCovertFromRGBTechnique    required        excluded
  4756. XieTypCovertToRGBTechnique      required        excluded
  4757. XieTypConvolveTechnique required        excluded
  4758. XieTypDataClass required        required
  4759. XieValSingleBand        required        required
  4760. XieValTripleBand        required        excluded
  4761. XieTypDataStream        required        required
  4762. XieTypDataType  required        required
  4763. XieTypDecodeTechnique   required        required
  4764. XieTypDitherTechnique   required        excluded
  4765. XieTypEncodeTechnique   required        required
  4766. XieTypExecutable        required        required
  4767. XieTypExportNotify      required        required
  4768. XieTypExportState       required        required
  4769. XieTypFloat     required        required
  4770. XieTypGamutTechnique    required        excluded
  4771. XieTypGeometryTechnique required        required
  4772. XieTypHistogramData     required        excluded
  4773. XieTypHistogramShape    required        excluded
  4774. XieTypInterleave        required        required
  4775. XieTypLevels    required        required
  4776. XieTypLUT       required        required
  4777. XieTypMathOp    required        excluded
  4778. XieTypMatrix    required        excluded
  4779. XieTypOrientation       required        required
  4780. XieTypPhotoElement      required        required
  4781. XieTypPhotoflo  required        required
  4782. XieTypPhotofloOutcome   required        required
  4783. XieTypPhotofloState     required        required
  4784. XieTypPhotomap  required        required
  4785. XieTypPhotospace        required        required
  4786. XieTypPhototag  required        required
  4787. XieTypProcessDomain     required        required
  4788. XieTypRectangle required        excluded
  4789. XieTypROI       required        excluded
  4790.  
  4791. Table B-1   Types itemized by ServiceClass (continued)
  4792. Type    Full    DIS
  4793. XieTypServiceClass      required        required
  4794. XieValFull      required        excluded
  4795. XieValDIS       required        required
  4796. XieTypTechniqueGroup    required        required
  4797. XieValDefault   required        required
  4798. XieValAll       required        required
  4799. XieValColorAlloc        required        excluded
  4800. XieValConstrain required        excluded
  4801. XieValConvertFromRGB    required        excluded
  4802. XieValConvertToRGB      required        excluded
  4803. XieValConvolve  required        excluded
  4804. XieValDecode    required        required
  4805. XieValDither    required        excluded
  4806. XieValEncode    required        required
  4807. XieValGamut     required        excluded
  4808. XieValGeometry  required        required
  4809. XieValHistogram required        excluded
  4810. XieValWhiteAdjust       required        excluded
  4811. XieTypTechniqueRec      required        required
  4812. XieTypTile      required        excluded
  4813. XieTypTripletof required        required
  4814. XieTypWhiteAdjustTechnique      required        excluded
  4815.  
  4816. Table B-2   Techniques itemized by ServiceClass
  4817. Technique       Full    DIS
  4818. XieValColorAlloc_AllocAll       optional        excluded
  4819. XieValColorAlloc_Match  optional        excluded
  4820. XieValColorAlloc_Requantize     optional        excluded
  4821. XieValConstrain_ClipScale       required        excluded
  4822. XieValConstrain_HardClip        required        excluded
  4823. XieValConvertFromRGB_CIELab     required        excluded
  4824. XieValConvertFromRGB_CIEXYZ     required        excluded
  4825. XieValConvertFromRGB_YCbCr      required        excluded
  4826. XieValConvertFromRGB_YCC        required        excluded
  4827. XieValConvertToRGB_CIELab       required        excluded
  4828. XieValConvertToRGB_CIEXYZ       required        excluded
  4829. XieValConvertToRGB_YCbCr        required        excluded
  4830. XieValConvertToRGB_YCC  required        excluded
  4831. XieValConvolve_Constant required        excluded
  4832. XieValConvolve_Replicate        optional        excluded
  4833. XieValDecode_UncompressedSingle required        required
  4834. XieValDecode_UncompressedTriple required        excluded
  4835. XieValDecode_CCITT-G31D required        required
  4836. XieValDecode_CCITT-G32D required        required
  4837. XieValDecode_CCITT-G42D required        required
  4838. XieValDecode_JPEG-Baseline      required        optional
  4839. XieValDecode_JPEG-Lossless      optional        optional
  4840. XieValDecode_TIFF-2     optional        optional
  4841. XieValDecode_TIFF-PackBits      optional        optional
  4842. XieValDither_ErrorDiffusion     optional        excluded
  4843. XieValDither_Ordered    optional        excluded
  4844. XieValEncode_ServerChoice       required        required
  4845. XieValEncode_UncompressedSingle required        required
  4846. XieValEncode_UncompressedTriple required        excluded
  4847. XieValEncode_CCITT-G31D optional        optional
  4848. XieValEncode_CCITT-G32D optional        optional
  4849. XieValEncode_CCITT-G42D optional        optional
  4850. XieValEncode_JPEG-Baseline      optional        optional
  4851. XieValEncode_JPEG-Lossless      optional        optional
  4852. XieValEncode_TIFF-2     optional        optional
  4853. XieValEncode_TIFF-PackBits      optional        optional
  4854. XieValGamut_None        required        excluded
  4855. XieValGamut_ClipRGB     required        excluded
  4856. XieValGeometry_Antialias        required        required
  4857. XieValGeometry_AntialiasByArea  optional        optional
  4858. XieValGeometry_AntialiasByLowpass       optional        optional
  4859. XieValGeometry_BilinearInterpolation    optional        optional
  4860. XieValGeometry_Gaussian optional        optional
  4861. XieValGeometry_NearestNeighbor  required        required
  4862. XieValHistogram_Flat    required        excluded
  4863. XieValHistogram_Gaussian        required        excluded
  4864. XieValHistogram_Hyperbolic      required        excluded
  4865. XieValWhiteAdjust_None  required        excluded
  4866. XieValWhiteAdjust_CIELabShift   optional        excluded
  4867.  
  4868. Table B-3   Requests itemized by ServiceClass
  4869. Requests        Full    DIS
  4870. XieReqQueryImageExtension       required        required
  4871. XieReqQueryTechniques   required        required
  4872. XieReqCreateColorList   required        excluded
  4873. XieReqDestroyColorList  required        excluded
  4874. XieReqPurgeColorList    required        excluded
  4875. XieReqQueryColorList    required        excluded
  4876. XieReqCreateLUT required        required
  4877. XieReqDestroyLUT        required        required
  4878. XieReqCreatePhotomap    required        required
  4879. XieReqDestroyPhotomap   required        required
  4880. XieReqQueryPhotomap     required        required
  4881. XieReqCreateROI required        excluded
  4882. XieReqDestroyROI        required        excluded
  4883. XieReqCreatePhotospace  required        required
  4884. XieReqDestroyPhotospace required        required
  4885. XieReqExecuteImmediate  required        required
  4886. XieReqCreatePhotoflo    required        required
  4887. XieReqDestroyPhotoflo   required        required
  4888. XieReqExecutePhotoflo   required        required
  4889. XieReqModifyPhotoflo    required        required
  4890. XieReqRedefinePhotoflo  required        required
  4891. XieReqPutClientData     required        required
  4892. XieReqGetClientData     required        required
  4893. XieReqQueryPhotoflo     required        required
  4894. XieReqAwait     required        required
  4895. XieReqAbort     required        required
  4896.  
  4897. Table B-4   Import elements itemized by ServiceClass
  4898. Import Element  Full    DIS
  4899. XieFloImportClientLUT   required        required
  4900. XieFloImportClientPhoto required        required
  4901. XieFloImportClientROI   required        excluded
  4902. XieFloImportDrawable    required        required
  4903. XieFloImportDrawablePlane       required        required
  4904. XieFloImportLUT required        required
  4905. XieFloImportPhotomap    required        required
  4906. XieFloImportROI required        excluded
  4907.  
  4908. Table B-5   Process elements itemized by ServiceClass
  4909. Process Element Full    DIS
  4910. XieFloArithmetic        required        excluded
  4911. XieFloBandCombine       required        excluded
  4912. XieFloBandExtract       required        excluded
  4913. XieFloBandSelect        required        excluded
  4914. XieFloBlend     required        excluded
  4915. XieFloCompare   required        excluded
  4916. XieFloConstrain required        excluded
  4917. XieFloConvertFromIndex  required        excluded
  4918. XieFloConvertFromRGB    required        excluded
  4919. XieFloConvertToIndex    required        excluded
  4920. XieFloConvertToRGB      required        excluded
  4921. XieFloConvolve  required        excluded
  4922. XieFloDither    required        excluded
  4923. XieFloGeometry  required        required
  4924. XieFloLogical   required        excluded
  4925. XieFloMatchHistogram    required        excluded
  4926. XieFloMath      required        excluded
  4927. XieFloPasteUp   required        excluded
  4928. XieFloPoint     required        required
  4929. XieFloUnconstrain       required        excluded
  4930.  
  4931. Table B-6   Export elements itemized by ServiceClass
  4932. Export Element  Full    DIS
  4933. XieFloExportClientHistogram     required        excluded
  4934. XieFloExportClientLUT   required        required
  4935. XieFloExportClientPhoto required        required
  4936. XieFloExportClientROI   required        excluded
  4937. XieFloExportDrawable    required        required
  4938. XieFloExportDrawablePlane       required        required
  4939. XieFloExportLUT required        required
  4940. XieFloExportPhotomap    required        required
  4941. XieFloExportROI required        excluded
  4942.  
  4943. Table B-7   Events itemized by ServiceClass
  4944. Event   Full    DIS
  4945. XieEvnColorAlloc        required        excluded
  4946. XieEvnDecodeNotify      required        required
  4947. XieEvnExportAvailable   required        required
  4948. XieEvnImportObscured    required        required
  4949. XieEvnPhotofloDone      required        required
  4950. Table B-8   Errors itemized by ServiceClass
  4951. Error   Full    DIS
  4952. XieErrColorList required        excluded
  4953. XieErrLUT       required        required
  4954. XieErrPhotoflo  required        required
  4955. XieErrPhotomap  required        required
  4956. XieErrPhotospace        required        required
  4957. XieErrROI       required        excluded
  4958. XieErrFloAccess required        required
  4959. XieErrFloAlloc  required        required
  4960. XieErrFloColormap       required        excluded
  4961. XieErrFloColorList      required        excluded
  4962. XieErrFloDomain required        required
  4963. XieErrFloDrawable       required        required
  4964. XieErrFloElement        required        required
  4965. XieErrFloGC     required        required
  4966. XieErrFloID     required        required
  4967. XieErrFloLength required        required
  4968. XieErrFloLUT    required        required
  4969. XieErrFloMatch  required        required
  4970. XieErrFloOperator       required        excluded
  4971. XieErrFloPhotomap       required        required
  4972. XieErrFloROI    required        excluded
  4973. XieErrFloSource required        required
  4974. XieErrFloTechnique      required        required
  4975. XieErrFloValue  required        required
  4976. XieErrFloImplementation required        required
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999. almost blank
  5000. Service Class   B-8
  5001.  
  5002.  
  5003. C
  5004. Protocol Encodings
  5005. Extension Name
  5006. # of Bytes      Value   Description
  5007. 3               upper-case ASCII string "XIE"
  5008.              88         X
  5009.              73         I
  5010.              69         E
  5011. Types
  5012. Alignment
  5013. # of Bytes      Value   Description
  5014. 1               alignment:
  5015.              1          Alignable
  5016.              2          Arbitrary
  5017. ArithmeticOp
  5018. # of Bytes      Value   Description
  5019. 1               operator:
  5020.              1          Add
  5021.              2          Sub
  5022.              3          SubRev
  5023.              4          Mul
  5024.              5          Div
  5025.              6          DivRev
  5026.              7          Min
  5027.              8          Max
  5028.              9          Gamma
  5029. ColorAllocTechnique
  5030. # of Bytes      Value   Description
  5031. 2               number:
  5032.              0          Default
  5033.              2          ColorAlloc_AllocAll
  5034.              4          ColorAlloc_Match
  5035.              6          ColorAlloc_Requantize
  5036. ColorList
  5037. # of Bytes      Value   Description
  5038. 4       CARD32  color-list id (top 3 bits guaranteed to be zero)
  5039. CompareOp
  5040. # of Bytes      Value   Description
  5041. 1               operator:
  5042.              1          LT
  5043.              2          LE
  5044.              3          EQ
  5045.              4          NE
  5046.              5          GT
  5047.              6          GE
  5048. Constant
  5049. # of Bytes      Value   Description
  5050. 4       Float   constant[0]
  5051. 4       Float   constant[1]
  5052. 4       Float   constant[2]
  5053. ConstrainTechnique
  5054. # of Bytes      Value   Description
  5055. 2               number:
  5056.              2          Constrain_ClipScale
  5057.              4          Constrain_HardClip
  5058. ConvertFromRGBTechnique
  5059. # of Bytes      Value   Description
  5060. 2               number:
  5061.              2          ConvertFrom_CIELab
  5062.              4          ConvertFrom_CIEXYZ
  5063.              6          ConvertFrom_YCbC
  5064.              8          ConvertFrom_YCC
  5065. ConvertToRGBTechnique
  5066. # of Bytes      Value   Description
  5067. 2               number:
  5068.              2          ConvertTo_CIELab
  5069.              4          ConvertTo_CIEXYZ
  5070.              6          ConvertTo_YCbC
  5071.              8          ConvertTo_YCC
  5072. ConvolveTechnique
  5073. # of Bytes      Value   Description
  5074. 2               number:
  5075.              0          Default
  5076.              2          Convolve_Constant
  5077.              4          Convolve_Replicate
  5078. DataClass
  5079. # of Bytes      Value   Description
  5080. 1               data-class:
  5081.              1          SingleBand
  5082.              2          TripleBand
  5083. DataStream
  5084. # of Bytes      Value   Description
  5085. n       LISTofCARD8     data
  5086. DataType
  5087. # of Bytes      Value   Description
  5088. 1               data-type:
  5089.              1          Constrained
  5090.              2          Unconstrained
  5091. DecodeTechnique
  5092. # of Bytes      Value   Description
  5093. 2               number:
  5094.              2          Decode_UncompressedSingle
  5095.              3          Decode_UncompressedTriple
  5096.              4          Decode_CCITT-G31D
  5097.              6          Decode_CCITT-G32D
  5098.              8          Decode_CCITT-G42D
  5099.              10         Decode_JPEG-Baseline
  5100.              12         Decode_JPEG-Lossless
  5101.              14         Decode_TIFF-2
  5102.              16         Decode_TIFF-PackBits
  5103. DitherTechnique
  5104. # of Bytes      Value   Description
  5105. 2               number:
  5106.              0          Default
  5107.              2          Dither_ErrorDiffusion
  5108.              4          Dither_Ordered
  5109. EncodeTechnique
  5110. # of Bytes      Value   Description
  5111. 2               number:
  5112.              1          Encode_ServerChoice
  5113.              2          Encode_UncompressedSingle
  5114.              3          Encode_UncompressedTriple
  5115.              4          Encode_CCITT-G31D
  5116.              6          Encode_CCITT-G32D
  5117.              8          Encode_CCITT-G42D
  5118.              10         Encode_JPEG-Baseline
  5119.              12         Encode_JPEG-Lossless
  5120.              14         Encode_TIFF-2
  5121.              16         Encode_TIFF-PackBits
  5122. Executable
  5123. # of Bytes      Value   Description
  5124. 4               name-space:
  5125.         Photospace              if immediate Photoflo
  5126.         0               if stored Photoflo
  5127. 4               flo-id:
  5128.         CARD32          if immediate Photoflo
  5129.         Photoflo                if stored Photoflo
  5130. ExportNotify
  5131. # of Bytes      Value   Description
  5132. 1               notify:
  5133.              1          Disable
  5134.              2          FirstData
  5135.              3          NewData
  5136. ExportState
  5137. # of Bytes      Value   Description
  5138. 1               state:
  5139.              1          ExportDone
  5140.              2          ExportMore
  5141.              3          ExportEmpty
  5142.              4          ExportError
  5143. Float
  5144. # of Bytes      Value   Description
  5145. 4       <32-bits>       IEEE single-precision float
  5146. GamutTechnique
  5147. # of Bytes      Value   Description
  5148. 2               number:
  5149.              0          Default
  5150.              1          Gamut_None
  5151.              2          Gamut_ClipRGB
  5152. GeometryTechnique
  5153. # of Bytes      Value   Description
  5154. 2               number:
  5155.              0          Default
  5156.              2          Geometry_Antialias
  5157.              4          Geometry_AntialiasByArea
  5158.              6          Geometry_AntialiasByLowpass
  5159.              8          Geometry_BilinearInterpolation
  5160.              10         Geometry_Gaussian
  5161.              12         Geometry_NearestNeighbor
  5162. HistogramData
  5163. # of Bytes      Value   Description
  5164. 4       CARD32  value
  5165. 4       CARD32  count
  5166. HistogramShape
  5167. # of Bytes      Value   Description
  5168. 2               number:
  5169.              2          Histogram_Flat
  5170.              4          Histogram_Gaussian
  5171.              6          Histogram_Hyperbolic
  5172. Interleave
  5173. # of Bytes      Value   Description
  5174. 1               interleave:
  5175.              1          BandByPixel
  5176.              2          BandByPlane
  5177. Levels
  5178. # of Bytes      Value   Description
  5179. 4       CARD32  levels[0]
  5180. 4       CARD32  levels[1]
  5181. 4       CARD32  levels[2]
  5182. LUT
  5183. # of Bytes      Value   Description
  5184. 4       CARD32  lut id (top 3 bits guaranteed to be zero)
  5185. MathOp
  5186. # of Bytes      Value   Description
  5187. 1               operator:
  5188.              1          Exp
  5189.              2          Ln
  5190.              3          Log2
  5191.              4          Log10
  5192.              5          Square
  5193.              6          Sqrt
  5194. Matrix
  5195. # of Bytes      Value   Description
  5196. 4       Float   matrix[0,0]
  5197. 4       Float   matrix[0,1]
  5198. 4       Float   matrix[0,2]
  5199. 4       Float   matrix[1,0]
  5200. 4       Float   matrix[1,1]
  5201. 4       Float   matrix[1,2]
  5202. 4       Float   matrix[2,0]
  5203. 4       Float   matrix[2,1]
  5204. 4       Float   matrix[2,2]
  5205. Orientation
  5206. # of Bytes      Value   Description
  5207. 1               order:
  5208.              1          LSFirst
  5209.              2          MSFirst
  5210. PhotoElement
  5211.         Refer to the individual Import, Process, and Export encodings.
  5212.  
  5213. Photoflo
  5214. # of Bytes      Value   Description
  5215. 4       CARD32  stored photoflo id (top 3 bits guaranteed to be zero)
  5216. PhotofloOutcome
  5217. # of Bytes      Value   Description
  5218. 1               outcome:
  5219.              1          FloSuccess
  5220.              2          FloAbort
  5221.              3          FloError
  5222. PhotofloState
  5223. # of Bytes      Value   Description
  5224. 1               state:
  5225.              1          Inactive
  5226.              2          Active
  5227.              3          Nonexistent
  5228. Photomap
  5229. # of Bytes      Value   Description
  5230. 4       CARD32  photomap id (top 3 bits guaranteed to be zero)
  5231. Photospace
  5232. # of Bytes      Value   Description
  5233. 4       CARD32  photospace id (top 3 bits guaranteed to be zero)
  5234. Phototag
  5235. # of Bytes      Value   Description
  5236. 2       CARD16  phototag (index within PhotoElement list)
  5237. ProcessDomain
  5238. # of Bytes      Value   Description
  5239. 4       INT32   offset-x
  5240. 4       INT32   offset-y
  5241. 2       Phototag        domain
  5242. Rectangle
  5243. # of Bytes      Value   Description
  5244. 4       INT32   x
  5245. 4       INT32   y
  5246. 4       CARD32  width
  5247. 4       CARD32  height
  5248. ROI
  5249. # of Bytes      Value   Description
  5250. 4       CARD32  roi id (top 3 bits guaranteed to be zero)
  5251. ServiceClass
  5252. # of Bytes      Value   Description
  5253. 1               class:
  5254.              1          Full
  5255.              2          DIS
  5256. TechniqueGroup
  5257. # of Bytes      Value   Description
  5258. 1               group:
  5259.              0          Default
  5260.              1          All
  5261.              2          ColorAlloc
  5262.              4          Constrain
  5263.              6          ConvertFromRGB
  5264.              8          ConvertToRGB
  5265.              10         Convolve
  5266.              12         Decode
  5267.              14         Dither
  5268.              16         Encode
  5269.              18         Gamut
  5270.              20         Geometry
  5271.              22         Histogram
  5272.              24         WhiteAdjust
  5273. TechniqueRec
  5274. # of Bytes      Value   Description
  5275. 1       BOOL    needs-parameters
  5276. 1       TechniqueGroup  group
  5277. 2       CARD16  number
  5278. 1       CARD8   speed (0: slowest, 255: fastest)
  5279. 1       n       length of name
  5280. 2               unused
  5281. n       LISTofCARD8     name (ASCII string)
  5282. p               unused, p=pad(n)
  5283. Tile
  5284. # of Bytes      Value   Description
  5285. 2       Phototag        src
  5286. 2               unused
  5287. 4       INT32   dst-x
  5288. 4       INT32   dst-y
  5289. Tripletoftype
  5290. # of Bytes      Value   Description
  5291. size of type    <size of type bytes>    value[0]
  5292. size of type    <size of type bytes>    value[1]
  5293. size of type    <size of type bytes>    value[2]
  5294. WhiteAdjustTechnique
  5295. # of Bytes      Value   Description
  5296. 2               number:
  5297.              0          Default
  5298.              1          WhiteAdjust_None
  5299.              2          WhiteAdjust_CIELabShift
  5300.  
  5301. Requests and Replies
  5302. QueryImageExtension request
  5303. # of Bytes      Value   Description
  5304. 1       CARD8   XIE major opcode
  5305. 1       1       XIE minor opcode
  5306. 2       2       request length
  5307. 2       CARD16  client-major-version
  5308. 2       CARD16  client-minor-version
  5309. QueryImageExtension reply
  5310. # of Bytes      Value   Description
  5311. 1       1       reply
  5312. 1               unused
  5313. 2       CARD16  sequence number
  5314. 4       n       reply length (length of constrained-levels)
  5315. 2       CARD16  server-major-version
  5316. 2       CARD16  server-minor-version
  5317. 1       ServiceClass    service-class
  5318. 1       Alignment       alignment
  5319. 2       CARD16  unconstrained-mantissa
  5320. 4       INT32   unconstrained-max-exp
  5321. 4       INT32   unconstrained-min-exp
  5322. 8               unused
  5323. 4n      LISTofCARD32    constrained-levels
  5324. QueryTechniques request
  5325. # of Bytes      Value   Description
  5326. 1       CARD8   XIE major opcode
  5327. 1       2       XIE minor opcode
  5328. 2       2       request length
  5329. 1       TechniqueGroup  technique-group
  5330. 3               unused
  5331. QueryTechniques reply
  5332. # of Bytes      Value   Description
  5333. 1       1       reply
  5334. 1               unused
  5335. 2       CARD16  sequence number
  5336. 4       n/4     reply length
  5337. 2       CARD16  number of techniques
  5338. 22              unused
  5339. n       LISTofTechniqueRec      techniques
  5340. CreateColorList request
  5341. # of Bytes      Value   Description
  5342. 1       CARD8   XIE major opcode
  5343. 1       3       XIE minor opcode
  5344. 2       2       request length
  5345. 4       ColorList       color-list
  5346. DestroyColorList request
  5347. # of Bytes      Value   Description
  5348. 1       CARD8   XIE major opcode
  5349. 1       4       XIE minor opcode
  5350. 2       2       request length
  5351. 4       ColorList       color-list
  5352. PurgeColorList request
  5353. # of Bytes      Value   Description
  5354. 1       CARD8   XIE major opcode
  5355. 1       5       XIE minor opcode
  5356. 2       2       request length
  5357. 4       ColorList       color-list
  5358. QueryColorList request
  5359. # of Bytes      Value   Description
  5360. 1       CARD8   XIE major opcode
  5361. 1       6       XIE minor opcode
  5362. 2       2       request length
  5363. 4       ColorList       color-list
  5364. QueryColorList reply
  5365. # of Bytes      Value   Description
  5366. 1       1       reply
  5367. 1               unused
  5368. 2       CARD16  sequence number
  5369. 4       n       reply length (number of colors)
  5370. 4       COLORMAP        colormap
  5371. 20              unused
  5372. 4n      LISTofCARD32    list of colors
  5373. CreateLUT request
  5374. # of Bytes      Value   Description
  5375. 1       CARD8   XIE major opcode
  5376. 1       7       XIE minor opcode
  5377. 2       2       request length
  5378. 4       LUT     lut
  5379. DestroyLUT request
  5380. # of Bytes      Value   Description
  5381. 1       CARD8   XIE major opcode
  5382. 1       8       XIE minor opcode
  5383. 2       2       request length
  5384. 4       LUT     lut
  5385. CreatePhotomap request
  5386. # of Bytes      Value   Description
  5387. 1       CARD8   XIE major opcode
  5388. 1       9       XIE minor opcode
  5389. 2       2       request length
  5390. 4       Photomap        photomap
  5391. DestroyPhotomap request
  5392. # of Bytes      Value   Description
  5393. 1       CARD8   XIE major opcode
  5394. 1       10      XIE minor opcode
  5395. 2       2       request length
  5396. 4       Photomap        photomap
  5397. QueryPhotomap request
  5398. # of Bytes      Value   Description
  5399. 1       CARD8   XIE major opcode
  5400. 1       11      XIE minor opcode
  5401. 2       2       request length
  5402. 4       Photomap        photomap
  5403. QueryPhotomap reply
  5404. # of Bytes      Value   Description
  5405. 1       1       reply
  5406. 1       BOOL    populated
  5407. 2       CARD16  sequence number
  5408. 4       4       reply length
  5409. 1       DataClass       data-class
  5410. 1       DataType        data-type
  5411. 2       DecodeTechnique
  5412. 12      TripletofCARD32 width
  5413. 12      TripletofCARD32 height
  5414. 12      Levels  levels
  5415. CreateROI request
  5416. # of Bytes      Value   Description
  5417. 1       CARD8   XIE major opcode
  5418. 1       12      XIE minor opcode
  5419. 2       2       request length
  5420. 4       ROI     roi
  5421. DestroyROI request
  5422. # of Bytes      Value   Description
  5423. 1       CARD8   XIE major opcode
  5424. 1       13      XIE minor opcode
  5425. 2       2       request length
  5426. 4       ROI     roi
  5427. CreatePhotospace request
  5428. # of Bytes      Value   Description
  5429. 1       CARD8   XIE major opcode
  5430. 1       14      XIE minor opcode
  5431. 2       2       request length
  5432. 4       Photospace      name-space
  5433. DestroyPhotospace request
  5434. # of Bytes      Value   Description
  5435. 1       CARD8   XIE major opcode
  5436. 1       15      XIE minor opcode
  5437. 2       2       request length
  5438. 4       Photospace      name-space
  5439. ExecuteImmediate request
  5440. # of Bytes      Value   Description
  5441. 1       CARD8   XIE major opcode
  5442. 1       16      XIE minor opcode
  5443. 2       4+n/4   request length
  5444. 8       Executable      instance
  5445. 2       CARD16  number of elements in element-list
  5446. 1       BOOL    notify
  5447. 1               unused
  5448. n       LISTofPhotoElement      element-list
  5449. CreatePhotoflo request
  5450. # of Bytes      Value   Description
  5451. 1       CARD8   XIE major opcode
  5452. 1       17      XIE minor opcode
  5453. 2       3+n/4   request length
  5454. 4       Photoflo        photoflo
  5455. 2       CARD16  number of elements in element-list
  5456. 2               unused
  5457. n       LISTofPhotoElement      element-list
  5458. DestroyPhotoflo request
  5459. # of Bytes      Value   Description
  5460. 1       CARD8   XIE major opcode
  5461. 1       18      XIE minor opcode
  5462. 2       2       request length
  5463. 4       Photoflo        photoflo
  5464. ExecutePhotoflo request
  5465. # of Bytes      Value   Description
  5466. 1       CARD8   XIE major opcode
  5467. 1       19      XIE minor opcode
  5468. 2       3       request length
  5469. 4       Photoflo        photoflo
  5470. 1       BOOL    notify
  5471. 3               unused
  5472. ModifyPhotoflo request
  5473. # of Bytes      Value   Description
  5474. 1       CARD8   XIE major opcode
  5475. 1       20      XIE minor opcode
  5476. 2       3+n/4   request length
  5477. 4       Photoflo        photoflo
  5478. 2       Phototag        start
  5479. 2       CARD16  number of elements in element-list
  5480. n       LISTofPhotoElement      element-list
  5481. RedefinePhotoflo request
  5482. # of Bytes      Value   Description
  5483. 1       CARD8   XIE major opcode
  5484. 1       21      XIE minor opcode
  5485. 2       3+n/4   request length
  5486. 4       Photoflo        photoflo
  5487. 2       CARD16  number of elements in element-list
  5488. 2               unused
  5489. n       LISTofPhotoElement      element-list
  5490. PutClientData request
  5491. # of Bytes      Value   Description
  5492. 1       CARD8   XIE major opcode
  5493. 1       22      XIE minor opcode
  5494. 2       5+(n+p)/4       request length
  5495. 8       Executable      instance
  5496. 2       Phototag        element
  5497. 1       BOOL    final
  5498. 1       CARD8   band-number
  5499. 4       n       byte-count (length of data in bytes)
  5500. n       LISTofCARD8     data
  5501. p               unused, p=pad(n)
  5502. GetClientData request
  5503. # of Bytes      Value   Description
  5504. 1       CARD8   XIE major opcode
  5505. 1       23      XIE minor opcode
  5506. 2       5       request length
  5507. 8       Executable      instance
  5508. 4       CARD32  max-bytes
  5509. 2       Phototag        element
  5510. 1       BOOL    terminate
  5511. 1       CARD8   band-number
  5512. GetClientData reply
  5513. # of Bytes      Value   Description
  5514. 1       1       reply
  5515. 1       ExportState     new-state
  5516. 2       CARD16  sequence number
  5517. 4       (n+p)/4 reply length
  5518. 4       n       byte-count (length of data in bytes)
  5519. 20              unused
  5520. n       LISTofCARD8     data
  5521. p               unused, p=pad(n)
  5522. QueryPhotoflo request
  5523. # of Bytes      Value   Description
  5524. 1       CARD8   XIE major opcode
  5525. 1       24      XIE minor opcode
  5526. 2       3       request length
  5527. 8       Executable      instance
  5528. QueryPhotoflo reply
  5529. # of Bytes      Value   Description
  5530. 1       1       reply
  5531. 1       PhotofloState   state
  5532. 2       CARD16  sequence number
  5533. 4       (e+a)/2+(ep+ap)/4       reply length
  5534. 2       e       data-expected count
  5535. 2       a       data-available count
  5536. 20              unused
  5537. 2e      LISTofPhototag  data-expected
  5538. ep              unused, ep=pad(e)
  5539. 2a      LISTofPhototag  data-available
  5540. ap              unused, ap=pad(a)
  5541. Await request
  5542. # of Bytes      Value   Description
  5543. 1       CARD8   XIE major opcode
  5544. 1       25      XIE minor opcode
  5545. 2       3       request length
  5546. 8       Executable      instance
  5547. Abort request
  5548. # of Bytes      Value   Description
  5549. 1       CARD8   XIE major opcode
  5550. 1       26      XIE minor opcode
  5551. 2       3       request length
  5552. 8       Executable      instance
  5553.  
  5554. Import Elements
  5555. ImportClientLUT
  5556. # of Bytes      Value   Description
  5557. 2       1       element type
  5558. 2       8       element length
  5559. 1       DataClass       class
  5560. 1       Orientation     band-order
  5561. 2               unused
  5562. 12      TripletofCARD32 length
  5563. 12      Levels  levels
  5564. ImportClientPhoto
  5565. # of Bytes      Value   Description
  5566. 2       2       element type
  5567. 2       12+n    element length
  5568. 1       BOOL    notify
  5569. 1       DataClass       class
  5570. 2               unused
  5571. 12      TripletofCARD32 width
  5572. 12      TripletofCARD32 height
  5573. 12      Levels  levels
  5574. 2       DecodeTechnique decode
  5575. 2       n       length of decode-params
  5576. 4n      <technique-dependent>   decode-params
  5577. ImportClientROI
  5578. # of Bytes      Value   Description
  5579. 2       3       element type
  5580. 2       2       element length
  5581. 4       CARD32  rectangles
  5582. ImportDrawable
  5583. # of Bytes      Value   Description
  5584. 2       4       element type
  5585. 2       6       element length
  5586. 4       DRAWABLE        drawable
  5587. 2       INT16   src-x
  5588. 2       INT16   src-y
  5589. 2       CARD16  width
  5590. 2       CARD16  height
  5591. 4       CARD32  fill
  5592. 1       BOOL    notify
  5593. 3               unused
  5594. ImportDrawablePlane
  5595. # of Bytes      Value   Description
  5596. 2       5       element type
  5597. 2       7       element length
  5598. 4       DRAWABLE        drawable
  5599. 2       INT16   src-x
  5600. 2       INT16   src-y
  5601. 2       CARD16  width
  5602. 2       CARD16  height
  5603. 4       CARD32  fill
  5604. 4       CARD32  bit-plane
  5605. 1       BOOL    notify
  5606. 3               unused
  5607. ImportLUT
  5608. # of Bytes      Value   Description
  5609. 2       6       element type
  5610. 2       2       element length
  5611. 4       LUT     lut
  5612. ImportPhotomap
  5613. # of Bytes      Value   Description
  5614. 2       7       element type
  5615. 2       3       element length
  5616. 4       Photomap        photomap
  5617. 1       BOOL    notify
  5618. 3               unused
  5619. ImportROI
  5620. # of Bytes      Value   Description
  5621. 2       8       element type
  5622. 2       2       element length
  5623. 4       ROI     roi
  5624.  
  5625. Process Elements
  5626. Arithmetic
  5627. # of Bytes      Value   Description
  5628. 2       9       element type
  5629. 2       8       element length
  5630. 2       Phototag        src-1
  5631. 2       Phototag        src-2
  5632. 10      ProcessDomain   domain
  5633. 1       ArithmeticOp    operator
  5634. 1       CARD8   band-mask
  5635. 12      Constant        constant
  5636. BandCombine
  5637. # of Bytes      Value   Description
  5638. 2       10      element type
  5639. 2       3       element length
  5640. 2       Phototag        src-1
  5641. 2       Phototag        src-2
  5642. 2       Phototag        src-3
  5643. 2               unused
  5644. BandExtract
  5645. # of Bytes      Value   Description
  5646. 2       11      element type
  5647. 2       7       element length
  5648. 2       Phototag        src
  5649. 2               unused
  5650. 4       CARD32  levels
  5651. 4       Float   bias
  5652. 12      Constant        coefficients
  5653. BandSelect
  5654. # of Bytes      Value   Description
  5655. 2       12      element type
  5656. 2       2       element length
  5657. 2       Phototag        src
  5658. 1       CARD8   band-number
  5659. 1               unused
  5660. Blend
  5661. # of Bytes      Value   Description
  5662. 2       13      element type
  5663. 2       10      element length
  5664. 2       Phototag        src-1
  5665. 2       Phototag        src-2
  5666. 2       Phototag        alpha
  5667. 2               unused
  5668. 10      ProcessDomain   domain
  5669. 1       CARD8   band-mask
  5670. 1               unused
  5671. 12      Constant        constant
  5672. 4       Float   alpha-const
  5673. Compare
  5674. # of Bytes      Value   Description
  5675. 2       14      element type
  5676. 2       9       element length
  5677. 2       Phototag        src-1
  5678. 2       Phototag        src-2
  5679. 10      ProcessDomain   domain
  5680. 1       CompareOp       operator
  5681. 1       BOOL    combine
  5682. 12      Constant        constant
  5683. 1       CARD8   band-mask
  5684. 3               unused
  5685. Constrain
  5686. # of Bytes      Value   Description
  5687. 2       15      element type
  5688. 2       6+n     element length
  5689. 2       Phototag        src
  5690. 2               unused
  5691. 12      Levels  levels
  5692. 2       ConstrainTechnique      constrain
  5693. 2       n       length of constrain-params
  5694. 4n      <technique-dependent>   constrain-params
  5695. ConvertFromIndex
  5696. # of Bytes      Value   Description
  5697. 2       16      element type
  5698. 2       3       element length
  5699. 2       Phototag        src
  5700. 1       DataClass       class
  5701. 1       CARD8   precision (valid range 1..16)
  5702. 4       COLORMAP        colormap
  5703. ConvertFromRGB
  5704. # of Bytes      Value   Description
  5705. 2       17      element type
  5706. 2       3+n     element length
  5707. 2       Phototag        src
  5708. 2               unused
  5709. 2       ConvertFromRGBTechnique convert
  5710. 2       n       length of convert-params
  5711. 4n      <technique-dependent>   convert-params
  5712. ConvertToIndex
  5713. # of Bytes      Value   Description
  5714. 2       18      element type
  5715. 2       5+n     element length
  5716. 2       Phototag        src
  5717. 1       BOOL    notify
  5718. 1               unused
  5719. 4       COLORMAP        colormap
  5720. 4       ColorList       color-list
  5721. 2       ColorAllocTechnique     color-alloc
  5722. 2       n       length of color-alloc-params
  5723. 4n      <technique-dependent>   color-alloc-params
  5724. ConvertToRGB
  5725. # of Bytes      Value   Description
  5726. 2       19      element type
  5727. 2       3+n     element length
  5728. 2       Phototag        src
  5729. 2               unused
  5730. 2       ConvertToRGBTechnique   convert
  5731. 2       n       length of convert-params
  5732. 4n      <technique-dependent>   convert-params
  5733. Convolve
  5734. # of Bytes      Value   Description
  5735. 2       20      element type
  5736. 2       6+n2+m  element length
  5737. 2       Phototag        src
  5738. 2               unused
  5739. 10      ProcessDomain   domain
  5740. 1       CARD8   band-mask
  5741. 1       n       kernel-size
  5742. 2       ConvolveTechnique       convolve
  5743. 2       m       length of convolve-params
  5744. 4n2     LISTofFloat     kernel
  5745. 4m      <technique-dependent>   convolve-params
  5746. Dither
  5747. # of Bytes      Value   Description
  5748. 2       21      element type
  5749. 2       6+n     element length
  5750. 2       Phototag        src
  5751. 1       CARD8   band-mask
  5752. 1               unused
  5753. 12      Levels  levels
  5754. 2       DitherTechnique dither
  5755. 2       n       length of dither-params
  5756. 4n      <technique-dependent>   dither-params
  5757. Geometry
  5758. # of Bytes      Value   Description
  5759. 2       22      element type
  5760. 2       14+n    element length
  5761. 2       Phototag        src
  5762. 1       CARD8   band-mask
  5763. 1               unused
  5764. 4       CARD32  width
  5765. 4       CARD32  height
  5766. 4       Float   coefficients: a
  5767. 4       Float   coefficients: b
  5768. 4       Float   coefficients: c
  5769. 4       Float   coefficients: d
  5770. 4       Float   coefficients: tx
  5771. 4       Float   coefficients: ty
  5772. 12      Constant        constant
  5773. 2       GeometryTechnique       sample
  5774. 2       n       length of sample-params
  5775. 4n      <technique-dependent>   sample-params
  5776. Logical
  5777. # of Bytes      Value   Description
  5778. 2       23      element type
  5779. 2       8       element length
  5780. 2       Phototag        src-1
  5781. 2       Phototag        src-2
  5782. 10      ProcessDomain   domain
  5783. 1       GCfunction*     operator
  5784. 1       CARD8   band-mask
  5785. 12      Constant        constant
  5786. (* see note on page 7-20)
  5787. MatchHistogram
  5788. # of Bytes      Value   Description
  5789. 2       24      element type
  5790. 2       6+n     element length
  5791. 2       Phototag        src
  5792. 2               unused
  5793. 10      ProcessDomain   domain
  5794. 2               unused
  5795. 2       HistogramShape  shape
  5796. 2       n       length of shape-params
  5797. 4n      <technique-dependent>   shape-params
  5798. Math
  5799. # of Bytes      Value   Description
  5800. 2       25      element type
  5801. 2       5       element length
  5802. 2       Phototag        src
  5803. 2               unused
  5804. 10      ProcessDomain   domain
  5805. 1       MathOp  operator
  5806. 1       CARD8   band-mask
  5807. PasteUp
  5808. # of Bytes      Value   Description
  5809. 2       26      element type
  5810. 2       7+3n    element length
  5811. 2       n       number of tiles
  5812. 2               unused
  5813. 4       CARD32  width
  5814. 4       CARD32  height
  5815. 12      Constant        constant
  5816. 12n     LISTofTile      tiles
  5817. Point
  5818. # of Bytes      Value   Description
  5819. 2       27      element type
  5820. 2       5       element length
  5821. 2       Phototag        src
  5822. 2       Phototag        lut
  5823. 10      ProcessDomain   domain
  5824. 1       CARD8   band-mask
  5825. 1               unused
  5826. Unconstrain
  5827. # of Bytes      Value   Description
  5828. 2       28      element type
  5829. 2       2       element length
  5830. 2       Phototag        src
  5831. 2               unused
  5832.  
  5833. Export Elements
  5834. ExportClientHistogram
  5835. # of Bytes      Value   Description
  5836. 2       29      element type
  5837. 2       5       element length
  5838. 2       Phototag        src
  5839. 1       ExportNotify    notify
  5840. 1               unused
  5841. 10      ProcessDomain   domain
  5842. 2               unused
  5843. ExportClientLUT
  5844. # of Bytes      Value   Description
  5845. 2       30      element type
  5846. 2       8       element length
  5847. 2       Phototag        src
  5848. 1       ExportNotify    notify
  5849. 1       Orientation     band-order
  5850. 12      TripletofCARD32 start
  5851. 12      TripletofCARD32 length
  5852. ExportClientPhoto
  5853. # of Bytes      Value   Description
  5854. 2       31      element type
  5855. 2       3+n     element length
  5856. 2       Phototag        src
  5857. 1       ExportNotify    notify
  5858. 1               unused
  5859. 2       EncodeTechnique encode (any except Encode_ServerChoice)
  5860. 2       n       length of encode-params
  5861. 4n      <technique-dependent>   encode-params
  5862. ExportClientROI
  5863. # of Bytes      Value   Description
  5864. 2       32      element type
  5865. 2       2       element length
  5866. 2       Phototag        src
  5867. 1       ExportNotify    notify
  5868. 1               unused
  5869. ExportDrawable
  5870. # of Bytes      Value   Description
  5871. 2       33      element type
  5872. 2       5       element length
  5873. 2       Phototag        src
  5874. 2       INT16   dst-x
  5875. 2       INT16   dst-y
  5876. 2               unused
  5877. 4       DRAWABLE        drawable
  5878. 4       GCONTEXT        gc
  5879. ExportDrawablePlane
  5880. # of Bytes      Value   Description
  5881. 2       34      element type
  5882. 2       5       element length
  5883. 2       Phototag        src
  5884. 2       INT16   dst-x
  5885. 2       INT16   dst-y
  5886. 2               unused
  5887. 4       DRAWABLE        drawable
  5888. 4       GCONTEXT        gc
  5889. ExportLUT
  5890. # of Bytes      Value   Description
  5891. 2       35      element type
  5892. 2       6       element length
  5893. 2       Phototag        src
  5894. 1       BOOL    merge
  5895. 1               unused
  5896. 4       LUT     lut
  5897. 12      TripletofCARD32 start
  5898. ExportPhotomap
  5899. # of Bytes      Value   Description
  5900. 2       36      element type
  5901. 2       4+n     element length
  5902. 2       Phototag        src
  5903. 2               unused
  5904. 4       Photomap        photomap
  5905. 2       EncodeTechnique encode
  5906. 2       n       length of encode-params
  5907. 4n      <technique-dependent>   encode-params
  5908. ExportROI
  5909. # of Bytes      Value   Description
  5910. 2       37      element type
  5911. 2       3       element length
  5912. 2       Phototag        src
  5913. 2               unused
  5914. 4       ROI     roi
  5915.  
  5916. Technique Parameters
  5917. ColorAlloc
  5918. Default
  5919. # of Bytes      Value   Description
  5920. 0               <no parameters>
  5921. AllocAll
  5922. # of Bytes      Value   Description
  5923. 4       CARD32  fill
  5924. Match
  5925. # of Bytes      Value   Description
  5926. 4       Float   match-limit
  5927. 4       Float   gray-limit
  5928. Requantize
  5929. # of Bytes      Value   Description
  5930. 4       CARD32  max-cells
  5931. Constrain
  5932. ClipScale
  5933. # of Bytes      Value   Description
  5934. 12      Constant        input-low
  5935. 12      Constant        input-high
  5936. 12      Levels  output-low
  5937. 12      Levels  output - high
  5938. HardClip
  5939. # of Bytes      Value   Description
  5940. 0               <no parameters>
  5941. ConvertFromRGB
  5942. CIELab
  5943. # of Bytes      Value   Description
  5944. 36      Matrix  matrix
  5945. 2       WhiteAdjustTechnique    white-adjust
  5946. 2       w       length of white-params
  5947. 4w      <technique-dependent>   white-params
  5948. CIEXYZ
  5949. # of Bytes      Value   Description
  5950. 36      Matrix  matrix
  5951. 2       WhiteAdjustTechnique    white-adjust
  5952. 2       w       length of white-params
  5953. 4w      <technique-dependent>   white-params
  5954. YCbCr
  5955. # of Bytes      Value   Description
  5956. 12      Levels  levels
  5957. 12      Constant        luma { red, green, blue }
  5958. 12      Constant        bias
  5959. YCC
  5960. # of Bytes      Value   Description
  5961. 12      Levels  levels
  5962. 12      Constant        luma { red, green, blue }
  5963. 4       Float   scale
  5964. ConvertToRGB
  5965. CIELab
  5966. # of Bytes      Value   Description
  5967. 36      Matrix  matrix
  5968. 2       WhiteAdjustTechnique    white-adjust
  5969. 2       w       length of white-params
  5970. 2       GamutTechnique  gamut-compress
  5971. 2       g       length of gamut-params
  5972. 4w      <technique-dependent>   white-params
  5973. 4g      <technique-dependent>   gamut-params
  5974. CIEXYZ
  5975. # of Bytes      Value   Description
  5976. 36      Matrix  matrix
  5977. 2       WhiteAdjustTechnique    white-adjust
  5978. 2       w       length of white-params
  5979. 2       GamutTechnique  gamut-compress
  5980. 2       g       length of gamut-params
  5981. 4w      <technique-dependent>   white-params
  5982. 4g      <technique-dependent>   gamut-params
  5983. YCbCr
  5984. # of Bytes      Value   Description
  5985. 12      Levels  levels
  5986. 12      Constant        luma { red, green, blue }
  5987. 12      Constant        bias
  5988. 2       GamutTechnique  gamut-compress
  5989. 2       g       length of gamut-params
  5990. 4g      <technique-dependent>   gamut-params
  5991. YCC
  5992. # of Bytes      Value   Description
  5993. 12      Levels  levels
  5994. 12      Constant        luma { red, green, blue }
  5995. 4       Float   scale
  5996. 2       GamutTechnique  gamut-compress
  5997. 2       g       length of gamut-params
  5998. 4g      <technique-dependent>   gamut-params
  5999. Convolve
  6000. Default
  6001. # of Bytes      Value   Description
  6002. 0               <no parameters>
  6003. Constant
  6004. # of Bytes      Value   Description
  6005. 12      Constant        constant
  6006. Replicate
  6007. # of Bytes      Value   Description
  6008. 0               <no parameters>
  6009. Decode
  6010. UncompressedSingle
  6011. # of Bytes      Value   Description
  6012. 1       Orientation     fill-order
  6013. 1       Orientation     pixel-order
  6014. 1       CARD8   pixel-stride
  6015. 1       CARD8   left-pad
  6016. 1       CARD8   scanline-pad
  6017. 3               unused
  6018. UncompressedTriple
  6019. # of Bytes      Value   Description
  6020. 3       TripletofCARD8  left-pad
  6021. 1       Orientation     fill-order
  6022. 3       TripletofCARD8  pixel-stride
  6023. 1       Orientation     pixel-order
  6024. 3       TripletofCARD8  scanline-pad
  6025. 1       Orientation     band-order
  6026. 1       Interleave      interleave
  6027. 3               unused
  6028. CITT-G31D
  6029. # of Bytes      Value   Description
  6030. 1       Orientation     encoded-order
  6031. 1       BOOL    normal
  6032. 1       BOOL    radiometric
  6033. 1               unused
  6034. CCITT-G32D
  6035. # of Bytes      Value   Description
  6036. 1       Orientation     encoded-order
  6037. 1       BOOL    normal
  6038. 1       BOOL    radiometric
  6039. 1               unused
  6040. CCITT-G42D
  6041. # of Bytes      Value   Description
  6042. 1       Orientation     encoded-order
  6043. 1       BOOL    normal
  6044. 1       BOOL    radiometric
  6045. 1               unused
  6046. JPEG-Baseline
  6047. # of Bytes      Value   Description
  6048. 1       Interleave      interleave
  6049. 1       Orientation     band-order
  6050. 1       BOOL    up-sample
  6051. 1               unused
  6052. JPEG-Lossless
  6053. # of Bytes      Value   Description
  6054. 1       Interleave      interleave
  6055. 1       Orientation     band-order
  6056. 2               unused
  6057. TIFF-2
  6058. # of Bytes      Value   Description
  6059. 1       Orientation     encoded-order
  6060. 1       BOOL    normal
  6061. 1       BOOL    radiometric
  6062. 1               unused
  6063. TIFF-PackBits
  6064. # of Bytes      Value   Description
  6065. 1       Orientation     encoded-order
  6066. 1       BOOL    normal
  6067. 2               unused
  6068. Dither
  6069. Default
  6070. # of Bytes      Value   Description
  6071. 0               <no parameters>
  6072. ErrorDiffusion
  6073. # of Bytes      Value   Description
  6074. 0               <no parameters>
  6075. Ordered
  6076. # of Bytes      Value   Description
  6077. 1       CARD8   threshold-order
  6078. 3               unused
  6079. Encode
  6080. ServerChoice
  6081. # of Bytes      Value   Description
  6082. 1       CARD8   preference:
  6083.         0               PreferDefault
  6084.         1               PreferSpace
  6085.         2               PreferTime
  6086. 3               unused
  6087. UncompressedSingle
  6088. # of Bytes      Value   Description
  6089. 1       Orientation     fill-order
  6090. 1       Orientation     pixel-order
  6091. 1       CARD8   pixel-stride
  6092. 1       CARD8   scanline-pad
  6093. UncompressedTriple
  6094. # of Bytes      Value   Description
  6095. 3       TripletofCARD8  pixel-stride
  6096. 1       Orientation     pixel-order
  6097. 3       TripletofCARD8  scanline-pad
  6098. 1       Orientation     fill-order
  6099. 1       Orientation     band-order
  6100. 1       Interleave      interleave
  6101. 2               unused
  6102. CCITT-G31D
  6103. # of Bytes      Value   Description
  6104. 1       Orientation     encoded-order
  6105. 1       BOOL    align-eol
  6106. 1       BOOL    radiometric
  6107. 1               unused
  6108. CCITT-G32D
  6109. # of Bytes      Value   Description
  6110. 1       Orientation     encoded-order
  6111. 1       BOOL    align-eol
  6112. 1       BOOL    radiometric
  6113. 1       BOOL    uncompressed
  6114. 4       CARD32  k-factor
  6115. CCITT-G42D
  6116. # of Bytes      Value   Description
  6117. 1       Orientation     encoded-order
  6118. 1       BOOL    radiometric
  6119. 1       BOOL    uncompressed
  6120. 1               unused
  6121. JPEG-Baseline
  6122. # of Bytes      Value   Description
  6123. 1       Interleave      interleave
  6124. 1       Orientation     band-order
  6125. 3       TripletofCARD8  horizontal-samples[0..2]
  6126. 3       TripletofCARD8  vertical-samples[0..2]
  6127. 2       q       length of q-table (multiple of 4)
  6128. 2       a       length of ac-table (multiple of 4)
  6129. 2       d       length of dc-table (multiple of 4)
  6130. 2               unused
  6131. q       LISTofCARD8     q-table
  6132. a       LISTofCARD8     ac-table
  6133. d       LISTofCARD8     dc-table
  6134. JPEG-Lossless
  6135. # of Bytes      Value   Description
  6136. 1       Interleave      interleave
  6137. 1       Orientation     band-order
  6138. 2       t       length of table (multiple of 4)
  6139. 3       TripletofCARD8  predictor[0..2]:
  6140.              0          PredictorNone
  6141.              1          PredictorA
  6142.              2          PredictorB
  6143.              3          PredictorC
  6144.              4          PredictorABC
  6145.              5          PredictorABC2
  6146.              6          PredictorBAC2
  6147.              7          PredictorAB2
  6148. 1               unused
  6149. t       LISTofCARD8     table
  6150. TIFF-2
  6151. # of Bytes      Value   Description
  6152. 1       Orientation     encoded-order
  6153. 1       BOOL    radiometric
  6154. 2               unused
  6155. TIFF-PackBits
  6156. # of Bytes      Value   Description
  6157. 1       Orientation     encoded-order
  6158. 3               unused
  6159. Gamut
  6160. Default
  6161. # of Bytes      Value   Description
  6162. 0               <no parameters>
  6163. None
  6164. # of Bytes      Value   Description
  6165. 0               <no parameters>
  6166. ClipRGB
  6167. # of Bytes      Value   Description
  6168. 0               <no parameters>
  6169. Geometry
  6170. Default
  6171. # of Bytes      Value   Description
  6172. 0               <no parameters>
  6173. Antialias
  6174. # of Bytes      Value   Description
  6175. 0               <no parameters>
  6176. AntialiasByArea
  6177. # of Bytes      Value   Description
  6178. 2       INT16   simple
  6179. 2               unused
  6180. AntialiasByLowpass
  6181. # of Bytes      Value   Description
  6182. 2       INT16   kernel-size
  6183. 2               unused
  6184. BilinearInterpolation
  6185. # of Bytes      Value   Description
  6186. 0               <no parameters>
  6187. Gaussian
  6188. # of Bytes      Value   Description
  6189. 1       CARD8   radius
  6190. 1       BOOL    simple
  6191. 2               unused
  6192. 4       Float   sigma
  6193. 4       Float   normalize
  6194. NearestNeighbor
  6195. # of Bytes      Value   Description
  6196. 1       CARD8   modify:
  6197.              1          FavorDown
  6198.              2          FavorUp
  6199.              3          RoundNW
  6200.              4          RoundNE
  6201.              5          RoundSE
  6202.              6          RoundSW
  6203. 3               unused
  6204. Histogram
  6205. Flat
  6206. # of Bytes      Value   Description
  6207. 0               <no parameters>
  6208. Gaussian
  6209. # of Bytes      Value   Description
  6210. 4       Float   mean
  6211. 4       Float   sigma
  6212. Hyperbolic
  6213. # of Bytes      Value   Description
  6214. 1       BOOL    shape-factor
  6215. 3               unused
  6216. 4       Float   constant
  6217. WhiteAdjust
  6218. Default
  6219. # of Bytes      Value   Description
  6220. 0               <no parameters>
  6221. None
  6222. # of Bytes      Value   Description
  6223. 0               <no parameters>
  6224. CIELabShift
  6225. # of Bytes      Value   Description
  6226. 12      Constant        white-point
  6227.  
  6228. Events
  6229. ColorAlloc
  6230. # of Bytes      Value   Description
  6231. 1       0       XIE event code: ColorAlloc
  6232. 1               unused
  6233. 2       CARD16  sequence-number
  6234. 4       TIMESTAMP       time
  6235. 8       Executable      instance
  6236. 2       Phototag        src
  6237. 2               type:
  6238.         18              ConvertToIndex
  6239. 4       ColorList       color-list
  6240. 2       ColorAllocTechnique     color-alloc technique
  6241. 2               unused
  6242. 4       CARD32  color-alloc specific data
  6243. DecodeNotify
  6244. # of Bytes      Value   Description
  6245. 1       1       XIE event code: DecodeNotify
  6246. 1       CARD8   band-number
  6247. 2       CARD16  sequence-number
  6248. 4       TIMESTAMP       time
  6249. 8       Executable      instance
  6250. 2       Phototag        src
  6251. 2               type:
  6252.              2          ImportClientPhoto
  6253.              7          ImportPhotomap
  6254. 2       DecodeTechnique decode technique
  6255. 1       BOOL    aborted
  6256. 1               unused
  6257. 4       CARD32  data-width
  6258. 4       CARD32  data-height
  6259. ExportAvailable
  6260. # of Bytes      Value   Description
  6261. 1       2       XIE event code: ExportAvailable
  6262. 1       CARD8   band-number
  6263. 2       CARD16  sequence-number
  6264. 4       TIMESTAMP       time
  6265. 8       Executable      instance
  6266. 2       Phototag        src
  6267. 2               type:
  6268.              29         ExportClientHistogram
  6269.              30         ExportClientLUT
  6270.              31         ExportClientPhoto
  6271.              32         ExportClientROI
  6272. 12      TripletofCARD32 data[0..2]
  6273. ImportObscured
  6274. # of Bytes      Value   Description
  6275. 1       3       XIE event code: ImportObscured
  6276. 1               unused
  6277. 2       CARD16  sequence-number
  6278. 4       TIMESTAMP       time
  6279. 8       Executable      instance
  6280. 2       Phototag        src
  6281. 2               type:
  6282.              4          ImportDrawable
  6283.              5          ImportDrawablePlane
  6284. 4       WINDOW  window
  6285. 2       INT16   x
  6286. 2       INT16   y
  6287. 2       CARD16  width
  6288. 2       CARD16  height
  6289. PhotofloDone
  6290. # of Bytes      Value   Description
  6291. 1       4       XIE event code: PhotofloDone
  6292. 1       PhotofloOutcome outcome
  6293. 2       CARD16  sequence-number
  6294. 4       TIMESTAMP       time
  6295. 8       Executable      instance
  6296. 16              unused
  6297.  
  6298. Errors
  6299. ColorList
  6300. # of Bytes      Value   Description
  6301. 1       0       Error
  6302. 1       0       XIE error code: ColorList
  6303. 2       CARD16  sequence-number
  6304. 4       ColorList       color-list id
  6305. 2       CARD16  minor-opcode
  6306. 1       CARD8   major-opcode
  6307. 21              unused
  6308. LUT
  6309. # of Bytes      Value   Description
  6310. 1       0       Error
  6311. 1       1       XIE error code: LUT
  6312. 2       CARD16  sequence-number
  6313. 4       LUT     lut id
  6314. 2       CARD16  minor-opcode
  6315. 1       CARD8   major-opcode
  6316. 21              unused
  6317. Photoflo
  6318. # of Bytes      Value   Description
  6319. 1       0       Error
  6320. 1       2       XIE error code: Photoflo
  6321. 2       CARD16  sequence-number
  6322. 4       Photoflo        photoflo id
  6323. 2       CARD16  minor-opcode
  6324. 1       CARD8   major-opcode
  6325. 21              unused
  6326. Photomap
  6327. # of Bytes      Value   Description
  6328. 1       0       Error
  6329. 1       3       XIE error code: Photomap
  6330. 2       CARD16  sequence-number
  6331. 4       Photomap        photomap id
  6332. 2       CARD16  minor-opcode
  6333. 1       CARD8   major-opcode
  6334. 21              unused
  6335. Photospace
  6336. # of Bytes      Value   Description
  6337. 1       0       Error
  6338. 1       4       XIE error code: Photospace
  6339. 2       CARD16  sequence-number
  6340. 4       Photospace      photospace id
  6341. 2       CARD16  minor-opcode
  6342. 1       CARD8   major-opcode
  6343. 21              unused
  6344. ROI
  6345. # of Bytes      Value   Description
  6346. 1       0       Error
  6347. 1       5       XIE error code: ROI
  6348. 2       CARD16  sequence-number
  6349. 4       ROI     roi id
  6350. 2       CARD16  minor-opcode
  6351. 1       CARD8   major-opcode
  6352. 21              unused
  6353. FloAccess
  6354. # of Bytes      Value   Description
  6355. 1       0       Error
  6356. 1       6       XIE error code: Flo...
  6357. 2       CARD16  sequence-number
  6358. 4       CARD32  executable flo-id
  6359. 2       CARD16  minor-opcode
  6360. 1       CARD8   major-opcode
  6361. 1       1       flo-error-code: FloAccess
  6362. 4       CARD32  executable name-space
  6363. 2       Phototag        phototag
  6364. 2       CARD16  type
  6365. 12              unused
  6366. FloAlloc
  6367. # of Bytes      Value   Description
  6368. 1       0       Error
  6369. 1       6       XIE error code: Flo...
  6370. 2       CARD16  sequence-number
  6371. 4       CARD32  executable flo-id
  6372. 2       CARD16  minor-opcode
  6373. 1       CARD8   major-opcode
  6374. 1       2       flo-error-code: FloAlloc
  6375. 4       CARD32  executable name-space
  6376. 2       Phototag        phototag
  6377. 2       CARD16  type
  6378. 12              unused
  6379. FloColormap
  6380. # of Bytes      Value   Description
  6381. 1       0       Error
  6382. 1       6       XIE error code: Flo...
  6383. 2       CARD16  sequence-number
  6384. 4       CARD32  executable flo-id
  6385. 2       CARD16  minor-opcode
  6386. 1       CARD8   major-opcode
  6387. 1       3       flo-error-code: FloColormap
  6388. 4       CARD32  executable name-space
  6389. 2       Phototag        phototag
  6390. 2       CARD16  type
  6391. 4       COLORMAP        colormap id
  6392. 8               unused
  6393. FloColorList
  6394. # of Bytes      Value   Description
  6395. 1       0       Error
  6396. 1       6       XIE error code: Flo...
  6397. 2       CARD16  sequence-number
  6398. 4       CARD32  executable flo-id
  6399. 2       CARD16  minor-opcode
  6400. 1       CARD8   major-opcode
  6401. 1       4       flo-error-code: FloColorList
  6402. 4       CARD32  executable name-space
  6403. 2       Phototag        phototag
  6404. 2       CARD16  type
  6405. 4       ColorList       color-list id
  6406. 8               unused
  6407. FloDomain
  6408. # of Bytes      Value   Description
  6409. 1       0       Error
  6410. 1       6       XIE error code: Flo...
  6411. 2       CARD16  sequence-number
  6412. 4       CARD32  executable flo-id
  6413. 2       CARD16  minor-opcode
  6414. 1       CARD8   major-opcode
  6415. 1       5       flo-error-code: FloDomain
  6416. 4       CARD32  executable name-space
  6417. 2       Phototag        phototag
  6418. 2       CARD16  type
  6419. 2       Phototag        domain source
  6420. 10              unused
  6421. FloDrawable
  6422. # of Bytes      Value   Description
  6423. 1       0       Error
  6424. 1       6       XIE error code: Flo...
  6425. 2       CARD16  sequence-number
  6426. 4       CARD32  executable flo-id
  6427. 2       CARD16  minor-opcode
  6428. 1       CARD8   major-opcode
  6429. 1       6       flo-error-code: FloDrawable
  6430. 4       CARD32  executable name-space
  6431. 2       Phototag        phototag
  6432. 2       CARD16  type
  6433. 4       DRAWABLE        drawable id
  6434. 8               unused
  6435. FloElement
  6436. # of Bytes      Value   Description
  6437. 1       0       Error
  6438. 1       6       XIE error code: Flo...
  6439. 2       CARD16  sequence-number
  6440. 4       CARD32  executable flo-id
  6441. 2       CARD16  minor-opcode
  6442. 1       CARD8   major-opcode
  6443. 1       7       flo-error-code: FloElement
  6444. 4       CARD32  executable name-space
  6445. 2       Phototag        phototag
  6446. 2       CARD16  type
  6447. 12              unused
  6448. FloGC
  6449. # of Bytes      Value   Description
  6450. 1       0       Error
  6451. 1       6       XIE error code: Flo...
  6452. 2       CARD16  sequence-number
  6453. 4       CARD32  executable flo-id
  6454. 2       CARD16  minor-opcode
  6455. 1       CARD8   major-opcode
  6456. 1       8       flo-error-code: FloGC
  6457. 4       CARD32  executable name-space
  6458. 2       Phototag        phototag
  6459. 2       CARD16  type
  6460. 4       GCONTEXT        gc id
  6461. 8               unused
  6462. FloID
  6463. # of Bytes      Value   Description
  6464. 1       0       Error
  6465. 1       6       XIE error code: Flo...
  6466. 2       CARD16  sequence-number
  6467. 4       CARD32  executable flo-id
  6468. 2       CARD16  minor-opcode
  6469. 1       CARD8   major-opcode
  6470. 1       9       flo-error-code: FloID
  6471. 4       CARD32  executable name-space
  6472. 16              unused
  6473. FloLength
  6474. # of Bytes      Value   Description
  6475. 1       0       Error
  6476. 1       6       XIE error code: Flo...
  6477. 2       CARD16  sequence-number
  6478. 4       CARD32  executable flo-id
  6479. 2       CARD16  minor-opcode
  6480. 1       CARD8   major-opcode
  6481. 1       10      flo-error-code: FloLength
  6482. 4       CARD32  executable name-space
  6483. 2       Phototag        phototag
  6484. 2       CARD16  type
  6485. 12              unused
  6486. FloLUT
  6487. # of Bytes      Value   Description
  6488. 1       0       Error
  6489. 1       6       XIE error code: Flo...
  6490. 2       CARD16  sequence-number
  6491. 4       CARD32  executable flo-id
  6492. 2       CARD16  minor-opcode
  6493. 1       CARD8   major-opcode
  6494. 1       11      flo-error-code: FloLUT
  6495. 4       CARD32  executable name-space
  6496. 2       Phototag        phototag
  6497. 2       CARD16  type
  6498. 4       LUT     lut id
  6499. 8               unused
  6500. FloMatch
  6501. # of Bytes      Value   Description
  6502. 1       0       Error
  6503. 1       6       XIE error code: Flo...
  6504. 2       CARD16  sequence-number
  6505. 4       CARD32  executable flo-id
  6506. 2       CARD16  minor-opcode
  6507. 1       CARD8   major-opcode
  6508. 1       12      flo-error-code: FloMatch
  6509. 4       CARD32  executable name-space
  6510. 2       Phototag        phototag
  6511. 2       CARD16  type
  6512. 12              unused
  6513. FloOperator
  6514. # of Bytes      Value   Description
  6515. 1       0       Error
  6516. 1       6       XIE error code: Flo...
  6517. 2       CARD16  sequence-number
  6518. 4       CARD32  executable flo-id
  6519. 2       CARD16  minor-opcode
  6520. 1       CARD8   major-opcode
  6521. 1       13      flo-error-code: FloOperator
  6522. 4       CARD32  executable name-space
  6523. 2       Phototag        phototag
  6524. 2       CARD16  type
  6525. 1       CARD8   operator
  6526. 11              unused
  6527. FloPhotomap
  6528. # of Bytes      Value   Description
  6529. 1       0       Error
  6530. 1       6       XIE error code: Flo...
  6531. 2       CARD16  sequence-number
  6532. 4       CARD32  executable flo-id
  6533. 2       CARD16  minor-opcode
  6534. 1       CARD8   major-opcode
  6535. 1       14      flo-error-code: FloPhotomap
  6536. 4       CARD32  executable name-space
  6537. 2       Phototag        phototag
  6538. 2       CARD16  type
  6539. 4       Photomap        photomap id
  6540. 8               unused
  6541. FloROI
  6542. # of Bytes      Value   Description
  6543. 1       0       Error
  6544. 1       6       XIE error code: Flo...
  6545. 2       CARD16  sequence-number
  6546. 4       CARD32  executable flo-id
  6547. 2       CARD16  minor-opcode
  6548. 1       CARD8   major-opcode
  6549. 1       15      flo-error-code: FloROI
  6550. 4       CARD32  executable name-space
  6551. 2       Phototag        phototag
  6552. 2       CARD16  type
  6553. 4       ROI     roi id
  6554. 8               unused
  6555. FloSource
  6556. # of Bytes      Value   Description
  6557. 1       0       Error
  6558. 1       6       XIE error code: Flo...
  6559. 2       CARD16  sequence-number
  6560. 4       CARD32  executable flo-id
  6561. 2       CARD16  minor-opcode
  6562. 1       CARD8   major-opcode
  6563. 1       16      flo-error-code: FloSource
  6564. 4       CARD32  executable name-space
  6565. 2       Phototag        phototag
  6566. 2       CARD16  type
  6567. 12              unused
  6568. FloTechnique
  6569. # of Bytes      Value   Description
  6570. 1       0       Error
  6571. 1       6       XIE error code: Flo...
  6572. 2       CARD16  sequence-number
  6573. 4       CARD32  executable flo-id
  6574. 2       CARD16  minor-opcode
  6575. 1       CARD8   major-opcode
  6576. 1       17      flo-error-code: FloTechnique
  6577. 4       CARD32  executable name-space
  6578. 2       Phototag        phototag
  6579. 2       CARD16  type
  6580. 2       CARD16  technique-number
  6581. 2       CARD16  length of tech-params that were supplied
  6582. 1       TechniqueGroup  technique-group
  6583. 7               unused
  6584. FloValue
  6585. # of Bytes      Value   Description
  6586. 1       0       Error
  6587. 1       6       XIE error code: Flo...
  6588. 2       CARD16  sequence-number
  6589. 4       CARD32  executable flo-id
  6590. 2       CARD16  minor-opcode
  6591. 1       CARD8   major-opcode
  6592. 1       18      flo-error-code: FloValue
  6593. 4       CARD32  executable name-space
  6594. 2       Phototag        phototag
  6595. 2       CARD16  type
  6596. 4       <32-bits>       bad-value
  6597. 8               unused
  6598. FloImplementation
  6599. # of Bytes      Value   Description
  6600. 1       0       Error
  6601. 1       6       XIE error code: Flo...
  6602. 2       CARD16  sequence-number
  6603. 4       CARD32  executable flo-id
  6604. 2       CARD16  minor-opcode
  6605. 1       CARD8   major-opcode
  6606. 1       19      flo-error-code: FloImplementation
  6607. 4       CARD32  executable name-space
  6608. 2       Phototag        phototag
  6609. 2       CARD16  type
  6610. 12              unused
  6611.  
  6612. Protocol Endings   C-40
  6613.  
  6614.  
  6615.