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

  1. XIElib
  2. Specification
  3.  
  4.  
  5. Gary Rogers
  6. AGE Logic, Inc.
  7.  
  8. This document contains reference pages for each XIElib function.
  9. Revision History
  10.  
  11. Gary Rogers, AGE Logic, Inc., Public Review Draft, April, 1994
  12.  
  13. Syd Logan, NetManage, Inc., Minor technical edits, correction of errors, October, 1996
  14.  
  15.  
  16.  
  17. Copyright ⌐ 1994 AGE Logic, Inc.
  18.  
  19.  
  20. Permission to use, copy, modify, distribute, and sell this documentation for any purpose is hereby granted
  21. without fee, provided that the above copyright notices and this permission notice appear in all copies.
  22. AGE Logic makes no representations about the suitability for any purpose of the information in this
  23. document. This documentation is only a draft standard of the X consortium and is therefore subject to
  24. change.
  25.  
  26.  
  27.  
  28. Acknowledgments
  29.  
  30. XIElib was provided by the X Consortium, with cooperation from AGE Logic, Inc. of San Diego, CA.
  31. It is a C subroutine library that provides a low level C binding of all features that are defined by
  32. Version 5.0 of the XIE Protocol.
  33.  
  34. Various parts of the text were borrowed from the Version 5.0 XIE Protocol Reference Manual, edited
  35. by Bob Shelley of AGE Logic, Inc.. Bob provided suggestions and comments that were invaluable in
  36. preparing this document. Dean Verheiden and Syd Logan, both of AGE Logic, Inc., graciously
  37. volunteered to review the original manuscript.
  38.  
  39. The author would like to thank Ralph Mor of the X Consortium for his careful review of this
  40. document. Ralph designed the XIElib and wrote its sample implementation, and his technical advice
  41. was indispensable. Adrian Nye, Editor for O'Reilly & Associates, Inc., provided substantive assistance
  42. in the preparation of this document, for which the author is very thankful.
  43.  
  44.  
  45.  
  46. Table of Contents
  47. Introduction    1
  48. Startup Functions
  49. XieInitialize   3
  50. XieQueryTechniques      5
  51. XieCreateColorList      8
  52. XieDestroyColorList     9
  53. XiePurgeColorList       10
  54. XieQueryColorList       11
  55. LUT Functions
  56. XieCreateLUT    12
  57. XieDestroyLUT   13
  58. Photomap Functions
  59. XieCreatePhotomap       14
  60. XieDestroyPhotomap      15
  61. XieQueryPhotomap        16
  62. ROI Functions
  63. XieCreateROI    18
  64. XieDestroyROI   19
  65. Photoflo Functions
  66. XieCreatePhotospace     20
  67. XieDestroyPhotospace    21
  68. XieExecuteImmediate     22
  69. XieAllocatePhotofloGraph        24
  70. XieCreatePhotoflo       25
  71. XieDestroyPhotoflo      27
  72. XieExecutePhotoflo      28
  73. XieModifyPhotoflo       29
  74. XieRedefinePhotoflo     31
  75. XieQueryPhotoflo        32
  76. Client Data Functions
  77. XiePutClientData        34
  78. XieGetClientData        36
  79. Abort and Await Functions
  80. XieAbort        38
  81. XieAwait        39
  82. Photoflo Element Functions
  83. XieFloImportClientLUT   40
  84. XieFloImportClientPhoto 43
  85. XieFloImportClientROI   46
  86. XieFloImportDrawable    47
  87. XieFloImportDrawablePlane       49
  88. XieFloImportLUT 51
  89. XieFloImportPhotomap    52
  90. XieFloImportROI 54
  91. XieFloArithmetic        55
  92. XieFloBandCombine       58
  93. XieFloBandExtract       60
  94. XieFloBandSelect        62
  95. XieFloBlend     63
  96. XieFloCompare   66
  97. XieFloConstrain 69
  98. XieFloConvertFromIndex  71
  99. XieFloConvertFromRGB    73
  100. XieFloConvertToIndex    75
  101. XieFloConvertToRGB      78
  102. XieFloConvolve  80
  103. XieFloDither    83
  104. XieFloGeometry  85
  105. XieFloLogical   88
  106. XieFloMatchHistogram    91
  107. XieFloMath      93
  108. XieFloPasteUp   95
  109. XieFloPoint     97
  110. XieFloUnconstrain       99
  111. XieFloExportClientHistogram     100
  112. XieFloExportClientLUT   102
  113. XieFloExportClientPhoto 104
  114. XieFloExportClientROI   106
  115. XieFloExportDrawable    108
  116. XieFloExportDrawablePlane       110
  117. XieFloExportLUT 112
  118. XieFloExportPhotomap    114
  119. XieFloExportROI 116
  120. Technique Functions
  121. XieTecColorAllocAll     117
  122. XieTecColorAllocMatch   118
  123. XieTecColorAllocRequantize      120
  124. XieTecRGBToCIELab       121
  125. XieTecRGBToCIEXYZ       123
  126. XieTecRGBToYCbCr        125
  127. XieTecRGBToYCC  127
  128. XieTecCIELabToRGB       129
  129. XieTecCIEXYZToRGB       132
  130. XieTecYCbCrToRGB        134
  131. XieTecYCCToRGB  136
  132. XieTecClipScale 138
  133. XieTecConvolveConstant  140
  134. XieTecDecodeUncompressedSingle  141
  135. XieTecDecodeUncompressedTriple  143
  136. XieTecDecodeG31D        146
  137. XieTecDecodeG32D        148
  138. XieTecDecodeG42D        150
  139. XieTecDecodeTIFF2       152
  140. XieTecDecodeTIFFPackBits        154
  141. XieTecDecodeJPEGBaseline        156
  142. XieTecDecodeJPEGLossless        158
  143. XieTecDitherOrdered     160
  144. XieTecEncodeUncompressedSingle  161
  145. XieTecEncodeUncompressedTriple  163
  146. XieTecEncodeG31D        166
  147. XieTecEncodeG32D        168
  148. XieTecEncodeG42D        170
  149. XieTecEncodeServerChoice        172
  150. XieTecEncodeJPEGBaseline        174
  151. XieTecEncodeJPEGLossless        177
  152. XieTecEncodeTIFF2       179
  153. XieTecEncodeTIFFPackBits        181
  154. XieTecGeomAntialiasByArea       183
  155. XieTecGeomAntialiasByLowpass    185
  156. XieTecGeomGaussian      187
  157. XieTecGeomNearestNeighbor       189
  158. XieTecHistogramGaussian 191
  159. XieTecHistogramHyperbolic       192
  160. XieTecWhiteAdjustCIELabShift    194
  161. Free Functions
  162. XieFreeTechniques       195
  163. XieFreePhotofloGraph    196
  164. XieFreeEncodeJPEGBaseline       197
  165. XieFreeEncodeJPEGLossless       198
  166. XieFreePasteUpTiles     199
  167. XIElib Events
  168. ColorAlloc Event        Events-1
  169. DecodeNotify Event      Events-2
  170. ExportAvailable Event   Events-3
  171. ImportObscured Event    Events-4
  172. PhotofloDone Event      Events-5
  173. XIElib Errors
  174. Resource Errors Errors-1
  175. Photoflo Errors Errors-2
  176.  
  177.  
  178.  
  179.  
  180.  XIElib - Function Group        Introduction
  181. The following pages describe the format of the reference pages for each XIElib function. Every effort
  182. has been made to maintain consistency with the format used in Xlib Reference Manual for Version 11
  183. (A. Nye, ed., O'Reilly & Associates, Inc., 1992). The reader is also referred to X Image Extension
  184. Protocol Reference Manual, Version 5.0 (R. Shelley, ed., 1994) for a complete definition of the XIE
  185. protocol.
  186. Name
  187. XieFunctionName - brief description of the function
  188. Syntax
  189. The Syntax section presents the calling syntax for the routine, including the declarations of the
  190. arguments and the return type. For example:
  191.  
  192. returntype XieFunctionName (arg1, arg2_ret)
  193. type1 arg1;
  194. type2 *arg2_ret;
  195. Arguments
  196. The Arguments section describes each of the arguments used by the function. There are two sorts of
  197. arguments: arguments to specify data to the function and arguments that return data from the
  198. function. An example of each type follows:
  199.  
  200. arg1    Specifies information for XieFunctionName. The description for
  201. this type of argument always starts with the word "Specifies."
  202. arg2_ret        Returns information from XieFunctionName. The description for
  203. this type of argument always starts with the word "Returns."
  204. Returns
  205. This section is present when XieFunctionName returns a value and describes what is returned.
  206. Description
  207. The Description section describes what the function does, what it returns, and what events or side
  208. effects it causes. It also may contain pertinent definitions, algorithms, and tables. A description of
  209. each XIE event structure is presented in the section XIElib Events.
  210. Output Attributes
  211. This section, which presents a table of element output attributes, is present if
  212. XieFloFunctionName specifies an element that produces output data.
  213.  
  214. Class   Data class of output data
  215.  - single band (achromatic or index)
  216.  - triple band (trichromatic)
  217. Type    Data type
  218.  - constrained (quantization levels is Levels)
  219.  - unconstrained (quantization levels is unknown)
  220. Width   Width of output (in pixels per band)
  221. Height  Height of output (in pixels per band)
  222. Levels  Depends on type
  223.  - constrained: number of quantization levels
  224.  - unconstrained: unknown
  225. Structures
  226. The Structures section contains the C definitions of the XIE-specific data types used by
  227. XieFunctionName as arguments or return values. It also contains definitions of important
  228. constants used by the function.
  229. Errors
  230. The Errors section is present when an action of XieFunctionName could generate an error. A
  231. table of errors that can be generated and their causes is presented. The full list of errors is presented
  232. in the section XIElib Errors.
  233. See Also
  234. This section lists other functions that contain information related to XieFunctionName.
  235.  XIElib - Startup Functions     XieInitialize
  236. Name
  237. XieInitialize - initialize the XIE extension
  238. Syntax
  239. Status XieInitialize (display, extinfo_ret)
  240. Display *display;
  241. XieExtensionInfo **extinfo_ret;
  242. Arguments
  243. display Specifies a connection to an X server.
  244. extinfo_ret     Returns the pointer to an XieExtensionInfo structure, which contains
  245. information about the XIE server's capabilities.
  246. Returns
  247. Zero on failure, nonzero on success.
  248. Description
  249. XieInitialize initializes the interface to the XIE extension and returns information about the
  250. XIE server's capabilities. XieInitialize should be called to establish version compatibility
  251. between client and server prior to making any other XIE request.
  252.  
  253. If successful, XieInitialize allocates and fills the XieExtensionInfo structure as follows:
  254.  
  255. *       The server_major_rev and server_minor_rev members are set to specify the highest
  256. version of the XIE protocol that the server supports. If the server version is higher than the
  257. XIElib version, the server will return the lower version, if it supports it.
  258. *       The service_class member is set to the service-class supported by the XIE server. Service-
  259. class defines the recognized image-processing service sets supported by the X Image Extension
  260. standard; the two service classes currently defined are Full, the entire XIE protocol, and DIS, the
  261. Document Image Subset, a proper subset of Full XIE. The service_class member can be set
  262. to one of the standard values:
  263.  
  264. xieValFull
  265. xieValDIS
  266.  
  267. *       The alignment member is set to the pixel and scanline alignment for image data supported by
  268. the server. Values for this member can be either xieValAlignable or xieValArbitrary.
  269. xieValAlignable data units must fit evenly within a byte, or they must fill a byte, or fill a
  270. multiple of bytes; xieValArbitrary data units may fall at any bit address.
  271. *       The uncnst_mantissa member is set to the number of bits in the servers floating-point
  272. format (including the sign bit). If the server uses fixed point, uncnst_mantissa is set to zero.
  273. *       The uncnst_min_exp member is set to the smallest (most negative) value n such that 2n is
  274. representable in the servers unconstrained data format.
  275. *       The uncnst_max_exp member is set to the largest value n such that 2n - 1 is representable in
  276. the servers unconstrained data format.
  277. *       The n_cnst_levels member is the number of items in the list cnst_levels.
  278. *       The items in the list cnst_levels are set to the levels that are recommended for constrained
  279. data by the server. A value of zero means 232 levels.
  280. *       The first_event member is set to the value from which subsequent XIE events values are
  281. based.
  282. *       The first_error member is set to the value from which subsequent XIE error values are
  283. based.
  284.  
  285. The memory allocated to extinfo_ret is freed when display is closed via XCloseDisplay;
  286. the client should not free this memory.
  287.  
  288. If not successful, XieInitialize sets **extinfo_ret to NULL.
  289. Structures
  290. typedef struct {
  291.         unsigned server_major_rev;
  292.         unsigned server_minor_rev;
  293.         XieServiceClass service_class;
  294.         XieAlignment alignment;
  295.         int uncnst_mantissa;
  296.         int uncnst_min_exp;
  297.         int uncnst_max_exp;
  298.         int n_cnst_levels;
  299.         unsigned long *cnst_levels;
  300.         int major_opcode;
  301.         int first_event;
  302.         int first_error;
  303. } XieExtensionInfo;
  304.  
  305. /* Definitions of Extension Name and Version Number */
  306. #define xieMajorVersion 5
  307. #define xieMinorVersion 0
  308. #define xieEarliestMinorVersion 0
  309. #define xieLatestMinorVersion   0
  310.  
  311. /* Definitions of ServiceClass */
  312. #define xieValFull      1
  313. #define xieValDIS       2
  314.  
  315. /* Definitions of Alignment */
  316. #define xieValAlignable 1
  317. #define xieValArbitrary 2
  318.  XIElib - Startup Functions     XieQueryTechniques
  319. Name
  320. XieQueryTechniques - return information about the standard and private techniques that are
  321. supported by the server
  322. Syntax
  323. Status XieQueryTechniques (display, technique_group, ntechniques_ret,
  324. techniques_ret)
  325. Display *display;
  326. XieTechniqueGroup technique_group;
  327. int *ntechniques_ret;
  328. XieTechnique **techniques_ret;
  329. Arguments
  330. display Specifies a connection to an X server.
  331. technique_group Specifies the group of techniques for which the server is to return
  332. information.
  333. ntechniques_ret Returns the number of items in the list of XieTechnique structures.
  334. techniques_ret  Returns the pointer to the list of XieTechnique structures, which
  335. contains the information about the selected group of techniques.
  336. Returns
  337. Zero on failure, nonzero on success.
  338. Description
  339. If successful, XieQueryTechniques allocates and fills each XieTechnique structure in the
  340. list as follows:
  341.  
  342. *       The member needs_param is set to True if the technique requires additional parameters;
  343. needs_param is set to False if the technique takes no parameters, or it has parameters that
  344. are optional. If parameters are optional, they must be totally omitted, or they must all be supplied.
  345. *       The member group is set to the group the technique belongs to.
  346. *       The member number is set to the numeric identifier assigned to the technique.
  347. *       The member speed is set to the server's assessment of the speed of this technique relative to
  348. other techniques in the same group, where 0 is slowest and 255 is fastest.
  349. *       The member name is set to the XIE compliant technique name string.
  350.  
  351. To free the memory allocated to techniques_ret, use XieFreeTechniques.
  352.  
  353. On failure, ntechniques_ret is set to zero and *techniques_ret is set to NULL.
  354.  
  355. The standard technique group names that can be queried using XieQueryTechniques are:
  356.  
  357. Technique group
  358. Meaning
  359. xieValDefault
  360. Select all default techniques
  361. xieValAll
  362. Select all supported techniques
  363. xieValColorAlloc
  364. Select color allocation techniques
  365. xieValConstrain
  366. Select techniques for constraining data
  367. xieValConvertFromRGB
  368. Select colorspace conversion techniques (for conversion
  369. from the RGB colorspace)
  370. xieValConvertToRGB
  371. Select colorspace conversion techniques (for conversion to
  372. the RGB colorspace)
  373. xieValConvolve
  374. Select techniques for handling convolution edge conditions
  375. xieValDecode
  376. Select image decoding (decompression) techniques
  377. xieValDither
  378. Select dithering techniques
  379. xieValEncode
  380. Select image encoding (compression) techniques
  381. xieValGamut
  382. Select colorspace conversion gamut compression
  383. techniques
  384. xieValGeometry
  385. Select geometric sampling techniques
  386. xieValHistogram
  387. Select match-histogram shapes
  388. xieValWhiteAdjust
  389. Select colorspace conversion white point adjustment
  390. techniques
  391.  
  392. If a vendor defined an additional private technique group, it could be discovered by querying for all
  393. groups.
  394. Structures
  395. typedef unsigned XieTechniqueGroup;
  396. typedef struct {
  397.         Bool needs_param;
  398.         XieTechniqueGroup group;
  399.         unsigned int number;
  400.         unsigned int speed;
  401.         char *name;
  402. } XieTechnique;
  403.  
  404. /* Definitions for TechniqueGroups */
  405. #define xieValDefault   0
  406. #define xieValAll       1
  407. #define xieValColorAlloc        2
  408. #define xieValConstrain 4
  409. #define xieValConvertFromRGB    6
  410. #define xieValConvertToRGB      8
  411. #define xieValConvolve  10
  412. #define xieValDecode    12
  413. #define xieValDither    14
  414. #define xieValEncode    16
  415. #define xieValGamut     18
  416. #define xieValGeometry  20
  417. #define xieValHistogram 22
  418. #define xieValWhiteAdjust       24
  419. Errors
  420. BadAlloc        Insufficient resources
  421. BadValue        Unknown technique_group
  422. See Also
  423. XieFreeTechniques
  424.  XIElib - Color List Functions  XieCreateColorList
  425. Name
  426. XieCreateColorList - create a color list
  427. Syntax
  428. XieColorList XieCreateColorList (display)
  429. Display *display;
  430. Arguments
  431. display Specifies a connection to an X server.
  432. Returns
  433. The color list identifier.
  434. Description
  435. XieCreateColorList creates a color list resource and returns its color list ID.
  436.  
  437. The color list created is an unpopulated server resource that can be used to store the list of colors
  438. allocated by XieFloConvertToIndex. The Colormap allocations that are recorded in a color list
  439. belong to the client that executed the photoflo that populated the resource (this is not necessarily the
  440. same client that created the color list). A color list cannot be the target of more than one active
  441. photoflo at a time. The contents of a color list may be queried using XieQueryColorList. All
  442. allocated cells can be explicitly purged from a color list using XiePurgeColorList. A color list
  443. can be destroyed using XieDestroyColorList.
  444. Structures
  445. typedef XID XieColorList;
  446. Errors
  447. BadAlloc        Insufficient resources
  448. BadIdChoice     Invalid color list
  449. See Also
  450. XieDestroyColorList, XiePurgeColorList, XieQueryColorList, XieFloConvertToIndex
  451.  XIElib - Color List Functions  XieDestroyColorList
  452. Name
  453. XieDestroyColorList - destroy a color list
  454. Syntax
  455. void XieDestroyColorList (display, color_list)
  456. Display *display;
  457. XieColorList color_list;
  458. Arguments
  459. display Specifies a connection to an X server.
  460. color_list      Specifies the color list to be destroyed.
  461. Description
  462. XieDestroyColorList destroys the color list resource identified by color_list. Once
  463. destroyed, color list ID is no longer valid.
  464. Structures
  465. typedef XID XieColorList;
  466. Errors
  467. xieErrNoColorlist       Invalid color_list
  468. See Also
  469. XieCreateColorList
  470.  XIElib - Color List Functions  XiePurgeColorList
  471. Name
  472. XiePurgeColorList - purge all allocated cells from a color list
  473. Syntax
  474. void XiePurgeColorList (display, color_list)
  475. Display *display;
  476. XieColorList color_list;
  477. Arguments
  478. display Specifies a connection to an X server.
  479. color_list      Specifies the color list to be purged.
  480. Description
  481. XiePurgeColorList frees the colors from the specified color list.
  482. Structures
  483. typedef XID XieColorList;
  484. Errors
  485. BadAccess       Attempt to purge colors when color list is being written by a photoflo
  486. xieErrNoColorlist       Invalid color_list
  487. See Also
  488. XieCreateColorList, XieDestroyColorList, XieQueryColorList, XieFloConvertToIndex
  489.  XIElib - Color List Functions  XieQueryColorList
  490. Name
  491. XieQueryColorList - obtain a list of allocated Colormap indices
  492. Syntax
  493. Status XieQueryColorList (display, color_list, colormap_ret,
  494. ncolors_ret, colors_ret)
  495. Display *display;
  496. XieColorList color_list;
  497. Colormap *colormap_ret;
  498. unsigned *ncolors_ret;
  499. unsigned long **colors_ret;
  500. Arguments
  501. display Specifies a connection to an X server.
  502. color_list      Specifies the color list to query.
  503. colormap_ret    Returns the Colormap from which the colors were allocated.
  504. ncolors_ret     Returns the number of Colormap indices in the list.
  505. colors_ret      Returns the list of allocated Colormap indices.
  506. Returns
  507. Zero on failure, nonzero on success.
  508. Description
  509. XieQueryColorList allocates and returns a list of colors allocated by a ConvertToIndex element.
  510.  
  511. When there are no colors in color list, a zero status is returned, the value zero is returned for the
  512. colormap, and the list of colors is of length zero. The pointer to the list of allocated Colormap indices
  513. is set to NULL.
  514.  
  515. To free the memory allocated to colors_ret, use XFree.
  516. Structures
  517. typedef XID XieColorList;
  518. Errors
  519. BadAlloc        Insufficient resources
  520. xieErrNoColorlist       Invalid color list
  521. See Also
  522. XieCreateColorList, XieDestroyColorList, XieQueryColorList, XieFloConvertToIndex
  523.  XIElib - LUT Functions XieCreateLUT
  524. Name
  525. XieCreateLUT - create a lookup table
  526. Syntax
  527. XieLut XieCreateLUT (display)
  528. Display *display;
  529. Arguments
  530. display Specifies a connection to an X server.
  531. Returns
  532. The lookup table (LUT) identifier.
  533. Description
  534. XieCreateLUT creates a server resource that is used as a lookup table (LUT) by a Point element. A
  535. lookup table consists of one or three single-dimension arrays, each long enough to contain an entry
  536. for all possible pixels values in the image data to which the Point element will be applied.
  537.  
  538. The LUT is populated (or repopulated) with lookup table entries after the successful execution of a
  539. photoflo containing an ExportLUT element that targets lut. LUT data can be imported into a photoflo
  540. using an ImportLUT element.
  541. Structures
  542. typedef XID XieLut;
  543. Errors
  544. BadAlloc        Insufficient resources
  545. BadIDChoice     Invalid LUT
  546. See Also
  547. XieDestroyLUT, XieFloImportLUT, XieFloExportLUT
  548.  XIElib - LUT Functions XieDestroyLUT
  549. Name
  550. XieDestroyLUT - destroy a lookup table
  551. Syntax
  552. void XieDestroyLUT (display, lut)
  553. Display *display;
  554. XieLut lut;
  555. Arguments
  556. display Specifies a connection to an X server.
  557. lut     Specifies the ID of the LUT to be destroyed.
  558. Description
  559. XieDestroyLUT destroys the lookup table (LUT) identified by lut. Once destroyed, LUT ID is no
  560. longer valid.
  561. Structures
  562. typedef XID XieLut;
  563. Errors
  564. xieErrNoLut     The value for the lut argument does not name a defined LUT
  565. See Also
  566. XieDestroyLUT, XieFloImportLUT, XieFloExportLUT
  567.  XIElib - Photomap Functions    XieCreatePhotomap
  568. Name
  569. XieCreatePhotomap - create a photomap
  570. Syntax
  571. XiePhotomap XieCreatePhotomap (display)
  572. Display *display;
  573. Arguments
  574. display Specifies a connection to an X server.
  575. Returns
  576. The photomap identifier.
  577. Description
  578. XieCreatePhotomap creates a photomap, a server resource that stores image data. Photomap
  579. data may be rendered for display or used as input to control or modify the rendition of another image.
  580.  
  581. Photomap attributes are defined when a photoflo containing an ExportPhotomap element populates
  582. the photomap with data.
  583. Structures
  584. typedef XID XiePhotomap;
  585. Errors
  586. BadAlloc        Insufficient resources
  587. BadIdChoice     Invalid photomap
  588. See Also
  589. XieDestroyPhotomap, XieQueryPhotomap, XieFloImportPhotomap, XieFloExportPhotomap
  590.  XIElib - Photomap Functions    XieDestroyPhotomap
  591. Name
  592. XieDestroyPhotomap - destroy a photomap
  593. Syntax
  594. void XieDestroyPhotomap (display, photomap)
  595. Display *display;
  596. XiePhotomap photomap;
  597. Arguments
  598. display Specifies a connection to an X server.
  599. photomap        Specifies the ID of the photomap to be destroyed.
  600. Description
  601. XieDestroyPhotomap destroys the photomap identified by photomap. Once destroyed, the
  602. photomap ID is no longer valid. A photomap is the XIE resource used to store image data in the
  603. server.
  604. Structures
  605. typedef XID XiePhotomap;
  606. Errors
  607. xieErrNoPhotomap        The value for the photomap argument does not name a defined
  608. photomap
  609. See Also
  610. XieCreatePhotomap , XieQueryPhotomap, XieFloImportPhotomap, XieFloExportPhotomap
  611.  XIElib - Photomap Functions    XieQueryPhotomap
  612. Name
  613. XieQueryPhotomap - return the queriable attributes of a photomap
  614. Syntax
  615. Status XieQueryPhotomap (display, photomap, populated_ret,
  616. datatype_ret, class_ret, decode_technique_ret, width_ret,
  617. height_ret, levels_ret)
  618. Display *display;
  619. XiePhotomap photomap;
  620. Bool *populated_ret;
  621. XieDataType *datatype_ret;
  622. XieDataClass *class_ret;
  623. XieDecodeTechnique *decode_technique_ret;
  624. XieLTriplet width_ret;
  625. XieLTriplet height_ret;
  626. XieLTriplet levels_ret;
  627. Arguments
  628. display Specifies a connection to an X server.
  629. photomap        Specifies the photomap to be queried.
  630. populated_ret   Returns the status of the photomap.
  631. datatype_ret    Returns the type of data in the photomap.
  632. class_ret       Returns the class of data in the photomap.
  633. decode_technique_ret    Returns the decode technique required to interpret the data.
  634. width_ret       Returns the width, in pixels per band.
  635. height_ret      Returns the height, in pixels per band.
  636. levels_ret      Returns the number of quantization levels per band.
  637. Returns
  638. Zero on failure, nonzero on success.
  639. Description
  640. A photomap is a server resource that stores image data. XieQueryPhotomap sets
  641. populated_ret to indicate whether or not photomap has been populated with attributes and
  642. data. If populated_ret is False, all remaining fields contain zeros.
  643.  
  644. datatype_ret reports whether the photomap contains constrained or unconstrained data, and is
  645. set to one of the following standard data type values:
  646.  
  647. xieValConstrained
  648. xieValUnconstrained
  649.  
  650. class_ret is the class of image data (that is, single-band or triple-band) and is set to one of the
  651. following standard data class values:
  652.  
  653. xieValSingleBand
  654. xieValTripleBand
  655.  
  656. width_ret and height_ret are set to the dimensions of the image data in pixels (per band).
  657. levels_ret is set to the potential dynamic range, or number of quantization levels (per band). If
  658. datatype_ret is set to unconstrained, the returned values for levels are zeros. If class_ret is
  659. xieValSingleBand, width_ret, height_ret, and levels_ret are only valid for element
  660. 0 in each of these vectors; elements 1 and 2 are unused and are returned as zeros.
  661.  
  662. decode_technique_ret is set to the decode technique that will be required to interpret or
  663. decompress the data. Decode techniques define the techniques that can be used to interpret
  664. uncompressed image data or decode compressed images. decode_technique_ret can be set to
  665. one of the following standard decode technique values:
  666.  
  667. xieValDecodeUncompressedSingle
  668. xieValDecodeUncompressedTriple
  669. xieValDecodeG31D
  670. xieValDecodeG32D
  671. xieValDecodeG42D
  672. xieValDecodeJPEGBaseline
  673. xieValDecodeJPEGLossless
  674. xieValDecodeTIFF2
  675. xieValDecodeTIFFPackBits
  676.  
  677. If a vendor defined additional private decode techniques, decode_technique_ret can be set to
  678. the values given to these techniques.
  679. Structures
  680. typedef unsigned XieDataClass;
  681. typedef unsigned XieDataType;
  682. typedef unsigned XieDecodeTechnique;
  683. typedef unsigned long XieLTriplet[3];
  684. typedef XID XiePhotomap;
  685.  
  686. /* Definitions of DataType */
  687. #define xieValConstrained       1
  688. #define xieValUnconstrained     2
  689.  
  690. /* Definitions of DataClass */
  691. #define xieValSingleBand        1
  692. #define xieValTripleBand        2
  693.  
  694. /* Definitions for DecodeTechniques */
  695. #define xieValDecodeUncompressedSingle  2
  696. #define xieValDecodeUncompressedTriple  3
  697. #define xieValDecodeG31D        4
  698. #define xieValDecodeG32D        6
  699. #define xieValDecodeG42D        8
  700. #define xieValDecodeJPEGBaseline        10
  701. #define xieValDecodeJPEGLossless        12
  702. #define xieValDecodeTIFF2       14
  703. #define xieValDecodeTIFFPackBits        16
  704. Errors
  705. xieErrNoPhotomap        The value for the photomap argument does not name a defined
  706. photomap.
  707. xieErrNoFloAlloc        Insufficient resources (for exmple, memory)
  708.  XIElib - ROI Functions XieCreateROI
  709. Name
  710. XieCreateROI - create a Rectangles-Of-Interest
  711. Syntax
  712. XieRoi XieCreateROI (display)
  713. Display *display;
  714. Arguments
  715. display Specifies a connection to an X server.
  716. Returns
  717. The ROI (Rectangles-Of-Interest) identifier.
  718. Description
  719. XieCreateROI creates a server ROI (Rectangles-Of-Interest) resource, and returns its resource ID
  720. to the client.
  721. Structures
  722. typedef XID XieRoi;
  723. Errors
  724. BadAlloc        Insufficient resources
  725. BadIDChoice     Invalid ROI
  726. See Also
  727. XieDestroyROI, XieFloImportROI, XieFloExportROI
  728.  XIElib - ROI Functions XieDestroyROI
  729. Name
  730. XieDestroyROI - destroy a Rectangles-Of-Interest
  731. Syntax
  732. void XieDestroyROI (display, roi)
  733. Display *display;
  734. XieRoi roi;
  735. Arguments
  736. display Specifies a connection to an X server.
  737. roi     Specifies the ID of the ROI to be destroyed.
  738. Description
  739. XieDestroyROI destroys the Rectangles-Of-Interest (ROI) identified by roi. Once destroyed,
  740. roi is no longer valid.
  741. Structures
  742. typedef XID XieRoi;
  743. Errors
  744. xieErrNoROI     The value for the roi argument does not name a defined ROI
  745. See Also
  746. XieCreateROI
  747.  XIElib - Immediate Photoflo Functions  XieCreatePhotospace
  748. Name
  749. XieCreatePhotospace - create a photospace
  750. Syntax
  751. XiePhotospace XieCreatePhotospace (display)
  752. Display *display;
  753. Arguments
  754. display Specifies a connection to an X server.
  755. Returns
  756. The photospace identifier.
  757. Description
  758. XieCreatePhotospace returns a resource-id for a new photospace that can be used to
  759. accommodate immediate photoflos instantiated by a client. Any client that needs to instantiate
  760. immediate photoflos must create at least one photospace.
  761. Structures
  762. typedef XID XiePhotospace;
  763. Errors
  764. BadAlloc        Insufficient resources
  765. BadIDChoice     Invalid photospace
  766. See Also
  767. XieDestroyPhotospace, XieExecuteImmediate
  768.  XIElib - Immediate Photoflo Functions  XieDestroyPhotospace
  769. Name
  770. XieDestroyPhotospace - destroy a photospace
  771. Syntax
  772. void XieDestroyPhotospace (display, photospace)
  773. Display *display;
  774. XiePhotospace photospace;
  775. Arguments
  776. display Specifies a connection to an X server.
  777. photospace      Specifies the ID of the photospace to be destroyed.
  778. Description
  779. XieDestroyPhotospace destroys a photospace. Prior to destroying the photospace, all photoflos
  780. that are currently active in the photospace will be aborted, exported data pending client retrieval will
  781. be freed, and the photoflos will be destroyed.
  782. Structures
  783. typedef XID XiePhotospace;
  784. Errors
  785. xieErrNoPhotospace      The value for the photospace argument does not name a defined
  786. photospace
  787. See Also
  788. XieCreatePhotospace
  789.  XIElib - Immediate Photoflo Functions  XieExecuteImmediate
  790. Name
  791. XieExecuteImmediate - define and begin execution of an immediate photoflo
  792. Syntax
  793. void XieExecuteImmediate (display, photospace, flo_id, notify,
  794. elem_list, elem_count)
  795. Display *display;
  796. XiePhotospace photospace;
  797. unsigned long flo_id;
  798. Bool notify;
  799. XiePhotoElement *elem_list;
  800. int elem_count;
  801. Arguments
  802. display Specifies a connection to an X server.
  803. photospace      Specifies the ID of the photospace to be executed.
  804. flo_id  Specifies a particular instance of the photoflo to be executed.
  805. notify  Specifies whether a PhotofloDone event must be sent upon
  806. completion.
  807. elem_list       Specifies the import, process, and export elements to be executed.
  808. elem_count      Specifies the number of items in elem_list.
  809. Description
  810. XieExecuteImmediate begins the asynchronous execution of an immediate photoflo. The server
  811. does not save a copy of an immediate photoflo after the photoflo has completed execution and all data
  812. exported for the client have been retrieved. An immediate photoflo may therefore not be modified or
  813. totally redefined prior to subsequent executions. It is legal to have multiple unique instances of
  814. immediate photoflos (and stored photoflos) active concurrently.
  815.  
  816. The photospace/flo_id argument pair specifies the instance by which this photoflo will be
  817. identified in other requests, events, or errors. notify specifies whether a PhotofloDone event
  818. must be sent upon completion. The PhotofloDone event notifies the client that a photoflo has left
  819. the active state: it is no longer executing. elem_list defines the import, process, and export
  820. elements to be executed.
  821.  
  822. If any clients have blocked themselves during the execution of the photoflo (see XieAwait), they
  823. will become unblocked when the photoflo's state changes from active to nonexistent.
  824.  
  825. Care should be taken that the argument pair elem_list/elem_count matches a returned value
  826. (an array of XiePhotoElement structures) and argument count from a call to
  827. XieAllocatePhotofloGraph.
  828. Structures
  829. typedef XID XiePhotospace;
  830.  
  831. typedef struct {
  832.         int elemType;
  833.         /* union of ALL element types */
  834.         union {
  835.                 ...
  836.                 ...
  837.         } data;
  838. } XiePhotoElement;
  839. Errors
  840. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  841. xieErrNoFloElement      Invalid element type(s) in elem_list
  842. xieErrNoFloID   Invalid photospace/flo_id argument pair has been specified
  843. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  844. photoflo (See Photoflo Errors).
  845. See Also
  846. XieAwait, XieAllocatePhotofloGraph
  847.  XIElib - Photoflo Functions    XieAllocatePhotofloGraph
  848. Name
  849. XieAllocatePhotofloGraph - allocate an array of XiePhotoElement structures
  850. Syntax
  851. XiePhotoElement *XieAllocatePhotofloGraph (count);
  852. unsigned int count;
  853. Arguments
  854. count   Specifies the number of XiePhotoElement structures to allocate.
  855. Returns
  856. The array of XiePhotoElement structures.
  857. Description
  858. XieAllocatePhotofloGraph allocates and returns a pointer to an array of
  859. XiePhotoElement structures; each field of each structure in the array is set to zero (0).
  860.  
  861. To free the memory allocated to the list of XiePhotoElement structures, use
  862. XieFreePhotofloGraph .
  863.  
  864. If XieAllocatePhotofloGraph is unable to create an XiePhotoElement array , it returns
  865. NULL.
  866. Structures
  867. typedef struct {
  868.         int elemType;
  869.         /* union of ALL element types */
  870.         union {
  871.                 ...
  872.                 ...
  873.         } data;
  874. } XiePhotoElement;
  875. See Also
  876. XieFreePhotofloGraph, XieCreatePhotoflo, XieModifyPhotoflo, XieRedefinePhotoflo,
  877. XieExecutePhotoflo, XieExecuteImmediate
  878.  XIElib - Stored Photoflo Functions     XieCreatePhotoflo
  879. Name
  880. XieCreatePhotoflo - create a stored photoflo
  881. Syntax
  882. XiePhotoflo XieCreatePhotoflo (display, elem_list, elem_count)
  883. Display *display;
  884. XiePhotoElement *elem_list;
  885. int elem_count;
  886. Arguments
  887. display Specifies a connection to an X server.
  888. elem_list       Specifies the defining array of XiePhotoElement structures.
  889. elem_count      Specifies the number of XiePhotoElement structures in the array.
  890. Returns
  891. The photoflo identifier.
  892. Description
  893. XieCreatePhotoflo creates a stored photoflo resource, defines its complete contents using the
  894. contents of elem_list, sets it in the inactive state, and returns its resource-id. Stored photoflos
  895. persist beyond execution and may be modified or totally redefined prior to subsequent executions.
  896.  
  897. The returned photoflo identifier is a new resource-id that, along with the execution domain used for
  898. the photoflo, identifies this photoflo in other requests, events, or errors. elem_list defines the
  899. import, process, and export elements to be stored for execution. Although resources and parameters
  900. are specified at creation, no action is taken to validate them at that time. XieCreatePhotoflo
  901. will only store the photoflo's definition: parameter validation is delayed until an execute request is
  902. received.
  903. Structures
  904. typedef XID XiePhotoflo;
  905.  
  906. typedef struct {
  907.         int elemType;
  908.         /* union of ALL element types */
  909.         union {
  910.                 ...
  911.                 ...
  912.         } data;
  913. } XiePhotoElement;
  914. Errors
  915. BadAlloc        Insufficient resources
  916. BadIdChoice     Invalid photoflo
  917. xieErrNoFloAlloc        Insufficient resources (for example, memory) for elem_list
  918. xieErrNoFloElement      Invalid element type(s) in elem_list
  919. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  920. photoflo (see Photoflo Errors).
  921. See Also
  922. XieAllocatePhotofloGraph,  XieFreePhotofloGraph, XieModifyPhotoflo, XieRedefinePhotoflo,
  923. XieExecutePhotoflo, XieQueryPhotoflo, XieDestroyPhotoflo
  924.  XIElib - Stored Photoflo Functions     XieDestroyPhotoflo
  925. Name
  926. XieDestroyPhotoflo - destroy a stored photoflo
  927. Syntax
  928. void XieDestroyPhotoflo (display, photoflo)
  929. Display *display;
  930. XiePhotoflo photoflo;
  931. Arguments
  932. display Specifies a connection to an X server.
  933. photoflo        Specifies the photoflo to be destroyed.
  934. Description
  935. XieDestroyPhotoflo destroys a stored photoflo. If photoflo is active, that is, executing, it is
  936. aborted and all exported data that are pending client retrieval are freed prior to destroying
  937. photoflo.
  938. Structures
  939. typedef XID XiePhotoflo;
  940. Errors
  941. xieErrNoPhotoflo        The value for the photoflo argument does not name a defined
  942. photoflo
  943. See Also
  944. XieCreatePhotoflo
  945.  XIElib - Stored Photoflo Functions     XieExecutePhotoflo
  946. Name
  947. XieExecutePhotoflo - execute a stored photoflo
  948. Syntax
  949. void XieExecutePhotoflo (display, photoflo, notify)
  950. Display *display;
  951. XiePhotoflo photoflo;
  952. Bool notify;
  953. Arguments
  954. display Specifies a connection to an X server.
  955. photoflo        Specifies the photoflo to be executed.
  956. notify  Specifies that a PhotofloDone event must be sent upon completion.
  957. Description
  958. XieExecutePhotoflo changes a stored photoflo to the active state. Execution is asynchronous.
  959. The photoflo returns to the inactive state when execution completes and all data exported for the
  960. client have been retrieved. It is legal to have multiple stored photoflos (and immediate photoflos)
  961. active concurrently.
  962.  
  963. notify specifies that a PhotofloDone event must be sent upon completion. A PhotofloDone
  964. event notifies the client that a photoflo has left the active state (it is no longer executing).
  965.  
  966. Stored photoflos persist beyond execution and may be modified or totally redefined prior to
  967. subsequent executions.
  968. Structures
  969. typedef XID XiePhotoflo;
  970. Errors
  971. xieErrNoPhotoflo        The value for the photoflo argument does not name a defined
  972. photoflo
  973. xieErrNoFloAccess       Attempt to execute photoflo when it is already active
  974. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  975. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  976. photoflo (see Photoflo Errors).
  977. See Also
  978. XieCreatePhotoflo, XieModifyPhotoflo, XieRedefinePhotoflo, XieQueryPhotoflo,
  979. XieDestroyPhotoflo, XieAbort, XieAwait, XieGetClientData, XiePutClientData
  980.  XIElib - Stored Photoflo Functions     XieModifyPhotoflo
  981. Name
  982. XieModifyPhotoflo - modify a stored photoflo
  983. Syntax
  984. void XieModifyPhotoflo (display, photoflo, start, elem_list,
  985. elem_count)
  986. Display *display;
  987. XiePhotoflo photoflo;
  988. int start;
  989. XiePhotoElement *elem_list;
  990. int elem_count;
  991. Arguments
  992. display Specifies a connection to an X server.
  993. photoflo        Specifies the photoflo to be modified.
  994. start   Specifies the index where element replacement is to begin.
  995. elem_list       Specifies an array of elements that will replace existing elements.
  996. elem_count      Specifies the number of items in elem_list.
  997. Description
  998. XieModifyPhotoflo allows element parameters of a stored photoflo to be modified. Stored
  999. photoflos persist beyond execution and may be modified prior to subsequent executions.
  1000.  
  1001. start is the position or index of an element within an array of elements used to specify a photoflo;
  1002. the first element in the array has a start value of one (1).
  1003.  
  1004. XieModifyPhotoflo only allows parameter modification. No topological changes are allowed:
  1005. elements cannot be deleted, inserted, or appended.
  1006. Structures
  1007. typedef XID XiePhotoflo;
  1008.  
  1009. typedef struct {
  1010.         int elemType;
  1011.         /* union of ALL element types */
  1012.         union {
  1013.                 ...
  1014.                 ...
  1015.         } data;
  1016. } XiePhotoElement;
  1017. Errors
  1018. xieErrNoPhotoflo        The value for the photoflo argument does not name a defined
  1019. photoflo
  1020. xieErrNoFloAccess       Attempt to change photoflo when it is already active
  1021. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1022. xieErrNoFloElement      Invalid element type(s) in elem_list or
  1023. attempt to append additional element(s) to photoflo
  1024. xieErrNoFloSource       An invalid start has been specified or
  1025. attempt to change input connections of type XiePhototag in
  1026. elem_list
  1027. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  1028. photoflo (see Photoflo Errors).
  1029. See Also
  1030. XieAllocatePhotofloGraph, XieFreePhotofloGraph, XieCreatePhotoflo, XieRedefinePhotoflo,
  1031. XieExecutePhotoflo, XieQueryPhotoflo, XieDestroyPhotoflo
  1032.  XIElib - Stored Photoflo Functions     XieRedefinePhotoflo
  1033. Name
  1034. XieRedefinePhotoflo - redefine a stored photoflo
  1035. Syntax
  1036. void XieRedefinePhotoflo (display, photoflo, elem_list, elem_count)
  1037. Display *display;
  1038. XiePhotoflo photoflo;
  1039. XiePhotoElement *elem_list;
  1040. int elem_count;
  1041. Arguments
  1042. display Specifies a connection to an X server.
  1043. photoflo        Specifies the photoflo to be redefined.
  1044. elem_list       Specifies an array of elements that will replace all existing elements.
  1045. elem_count      Specifies the number of items in elem_list.
  1046. Description
  1047. XieRedefinePhotoflo allows all elements of a stored photoflo to be removed and replaced with
  1048. a new list. Stored photoflos persist beyond execution and may be totally redefined prior to subsequent
  1049. executions.
  1050.  
  1051. There are no restrictions on changing element types or the array's size.
  1052. Structures
  1053. typedef XID XiePhotoflo;
  1054.  
  1055. typedef struct {
  1056.         int elemType;
  1057.         /* union of ALL element types */
  1058.         union {
  1059.                 ...
  1060.                 ...
  1061.         } data;
  1062. } XiePhotoElement;
  1063. Errors
  1064. xieErrNoPhotoflo        The value for the photoflo argument does not name a defined
  1065. photoflo
  1066. xieErrNoFloAccess       Attempt to change photoflo when it is already active
  1067. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1068. xieErrNoFloElement      Invalid element type(s) in elem_list
  1069. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  1070. photoflo (see Photoflo Errors).
  1071. See Also
  1072. XieAllocatePhotofloGraph, XieFreePhotofloGraph, XieCreatePhotoflo, XieModifyPhotoflo,
  1073. XieExecutePhotoflo, XieQueryPhotoflo, XieDestroyPhotoflo
  1074.  XIElib - Photoflo Functions    XieQueryPhotoflo
  1075. Name
  1076. XieQueryPhotoflo - return the current status of a photoflo
  1077. Syntax
  1078. XieQueryPhotoflo(display, name_space, flo_id, state_ret,
  1079. data_expected_ret, nexpected_ret, data_available_ret,
  1080. navailable_ret)
  1081. Display *display;
  1082. unsigned long name_space;
  1083. unsigned long flo_id;
  1084. XiePhotofloState *state_ret;
  1085. XiePhototag **data_expected_ret;
  1086. unsigned int *nexpected_ret;
  1087. XiePhototag **data_available_ret;
  1088. unsigned int *navailable_ret;
  1089. Arguments
  1090. display Specifies a connection to an X server.
  1091. name_space      Specifies the execution domain used for the photoflo to query.
  1092. flo_id  Specifies a particular instance of the photoflo to query.
  1093. state_ret       Returns the state of the photoflo.
  1094. data_expected_ret       Returns a list of ImportClient elements.
  1095. nexpected_ret   Returns the length of data_expected_ret.
  1096. data_available_ret      Returns a list of ExportClient elements.
  1097. navailable_ret  Returns the length of data_available_ret.
  1098. Returns
  1099. Zero on failure, nonzero on success.
  1100. Description
  1101. XieQueryPhotoflo will return the current status of a photoflo.
  1102.  
  1103. The name_space/flo_id argument pair specifies the instance that identifies the photoflo that is
  1104. being queried. state_ret indicates the state of the photoflo, and if XieQueryPhotoflo is
  1105. successful, will return one of the following standard photoflo state values:
  1106.  
  1107. xieValInactive
  1108. xieValActive
  1109. xieValNonexistent
  1110.  
  1111. data_expected_ret is a list of ImportClient elements that are expecting data via
  1112. XiePutClientData. data_available_ret is a list of ExportClient elements from which
  1113. data are available (via XieGetClientData). Either or both of these lists may be of length zero,
  1114. indicated by the returned values of nexpected_ret and navailable_ret.
  1115.  
  1116. XieQueryPhotoflo allocates memory for the list of ImportClient elements and the list of
  1117. ExportClient elements. To free the memory allocated to data_expected_ret and
  1118. data_available_ret, use XFree.
  1119.  
  1120. Specifying an unknown or invalid instance will return a state_ret of nonexistent and zero length
  1121. data_expected_ret and data_available_ret lists.
  1122. Structures
  1123. typedef unsigned XiePhotofloState;
  1124.  
  1125. /* Definitions of PhotofloState */
  1126. #define xieValInactive  1
  1127. #define xieValActive    2
  1128. #define xieValNonexistent       3
  1129. Errors
  1130. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1131. See Also
  1132. XieCreatePhotoflo, XieModifyPhotoflo, XieRedefinePhotoflo, XieExecutePhotoflo,
  1133. XieDestroyPhotoflo, XieGetClientData, XiePutClientData
  1134.  XIElib - Client Data Functions XiePutClientData
  1135. Name
  1136. XiePutClientData - send a stream of data to an active photoflo
  1137. Syntax
  1138. void XiePutClientData (display, name_space, flo_id, element, final,
  1139. band_number, data, nbytes)
  1140. Display *display;
  1141. unsigned long name_space;
  1142. unsigned long flo_id;
  1143. XiePhototag element;
  1144. Bool final;
  1145. unsigned band_number;
  1146. unsigned char *data;
  1147. unsigned nbytes;
  1148. Arguments
  1149. display Specifies a connection to an X server.
  1150. name_space      Specifies the execution domain used for the photoflo to receive the
  1151. data.
  1152. flo_id  Specifies a particular instance of the photoflo to receive the data.
  1153. element Specifies the element to receive the data.
  1154. final   Specifies if the data is the last segment of data to be sent. If True, then
  1155. data represents the last data to be sent by the client. False indicates
  1156. that more data will be sent (during a subsequent call to
  1157. XiePutClientData).
  1158. band_number     Specifies which band of data is being sent.
  1159. data    Specifies a counted list of bytes that comprises the data stream.
  1160. nbytes  Specifies the count of bytes that comprises the data stream.
  1161. Description
  1162. XiePutClientData sends a stream of data to an active photoflo. Since the complete data object
  1163. may be larger than can fit in a single protocol request, XIE allows the stream to be segmented; the
  1164. last segment is signaled with a final flag.
  1165.  
  1166. The organization and contents of the data stream must match the parameters given to the
  1167. ImportClient element or the results are undefined. An arbitrary amount of image data can be sent per
  1168. request, whereas for nonimage data one or more complete aggregates must be sent per request (for
  1169. example, one or more LUT array entries). If too many data are sent (for example, too many
  1170. rectangles, or too many scanlines), the unwanted data are discarded.  It is an error, however, to send
  1171. too few data prior to signaling final.
  1172.  
  1173. For stored photoflos, name_space is always ServerIDSpace (the value zero) and flo_id is the
  1174. photoflo's resource-id. For immediate photoflos name_space is a photospace resource-id and
  1175. flo_id is 32-bit value that uniquely identifies the instance of the photoflo within name_space.
  1176. Structures
  1177. typedef unsigned XiePhototag;
  1178. Errors
  1179. xieErrNoFloAccess       Executable photospace/flo_id argument pair not active
  1180. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1181. xieErrNoFloElement      Invalid element type specified by element
  1182. xieErrNoFloID   Invalid photospace/flo_id argument pair has been specified
  1183. xieErrNoFloValue        Invalid band_number or
  1184. for nonimage data, data contains a partial aggregate
  1185. See Also
  1186. XieGetClientData, XieQueryPhotoflo, XieFloImportClientPhoto, XieFloImportClientROI,
  1187. XieFloImportClientLUT
  1188.  XIElib - Client Data Functions XieGetClientData
  1189. Name
  1190. XieGetClientData - retrieve data from an ExportClient element within an active photoflo
  1191. Syntax
  1192. Status XieGetClientData (display, name_space, flo_id, element,
  1193. max_bytes, terminate, band_number, new_state_ret,
  1194. data_ret, nbytes_ret)
  1195. Display *display;
  1196. unsigned long name_space;
  1197. unsigned long flo_id;
  1198. XiePhototag element;
  1199. unsigned max_bytes;
  1200. Bool terminate;
  1201. unsigned band_number;
  1202. XieExportState *new_state_ret;
  1203. unsigned char **data_ret;
  1204. unsigned *nbytes_ret;
  1205. Arguments
  1206. display Specifies a connection to an X server.
  1207. name_space      Specifies the execution domain used for the photoflo from which to
  1208. retrieve data.
  1209. flo_id  Specifies a particular instance of the photoflo from which to retrieve
  1210. data.
  1211. element Specifies the element from which to retrieve the data.
  1212. max_bytes       Specifies the maximum number of bytes that can be sent to the client.
  1213. terminate       Specifies whether more data are wanted after this request.
  1214. band_number     Specifies which band of data is being retrieved.
  1215. new_state_ret   Returns the status of the ExportClient element after this request.
  1216. data_ret        Returns a counted list of bytes that comprises the data stream.
  1217. nbytes_ret      Returns the count of bytes that comprises the data stream.
  1218. Returns
  1219. Zero on failure, nonzero on success.
  1220. Description
  1221. XieGetClientData returns data in a contiguous read-once byte stream, which can be requested
  1222. in segments that are limited in size by the amount the client desires or the amount of data available
  1223. from the server. The format of the data depends on the parameters given to the ExportClient element
  1224. from which the data are requested.
  1225.  
  1226. new_state_ret returns the state of the ExportClient element after this request and can be set to
  1227. one of the following standard export state values:
  1228.  
  1229. xieValExportDone
  1230. xieValExportMore
  1231. xieValExportEmpty
  1232. xieValExportError
  1233.  
  1234. If the request is sent to an ExportClient element that either: does not have any data, was terminated
  1235. by a previous XieGetClientData call, or has already returned all its data (ExportDone sent), the
  1236. request will return a zero length data_ret stream.
  1237.  
  1238. Image data are always retrieved from the server as a byte stream, whereas nonimage data are always
  1239. returned by the server as one or more complete aggregates. max_bytes is effectively rounded down
  1240. by the server to the match the nearest aggregate size.
  1241.  
  1242. For stored photoflos, name_space is always ServerIDSpace (the value zero) and flo_id is the
  1243. photoflo's resource-id. For immediate photoflos name_space is a photospace resource-id and
  1244. flo_id  is a 32-bit value that uniquely identifies the instance of the photoflo within name_space.
  1245.  
  1246. To free the memory allocated to data_ret, use XFree.
  1247. Structures
  1248. typedef unsigned XieExportState;
  1249. typedef unsigned XiePhototag;
  1250.  
  1251. /* Definitions of ExportState */
  1252. #define xieValExportDone        1
  1253. #define xieValExportMore        2
  1254. #define xieValExportEmpty       3
  1255. #define xieValExportError       4
  1256. Errors
  1257. xieErrNoFloAccess       Executable photospace/flo_id argument pair not active
  1258. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1259. xieErrNoFloElement      Invalid element type specified by element
  1260. xieErrNoFloID   Invalid photospace/flo_id argument pair has been specified
  1261. xieErrNoFloValue        Invalid band_number
  1262. See Also
  1263. XiePutClientData, XieQueryPhotoflo, XieExecutePhotoflo, XieFloExportClientHistogram,
  1264. XieFloExportClientLUT, XieFloExportClientPhoto, XieFloExportClientROI
  1265.  XIElib - Abort and Await Functions     XieAbort
  1266. Name
  1267. XieAbort - prematurely terminate execution of a photoflo
  1268. Syntax
  1269. void XieAbort (display, name_space, flo_id);
  1270. Display *display;
  1271. unsigned long name_space;
  1272. unsigned long flo_id;
  1273. Arguments
  1274. display Specifies a connection to an X server.
  1275. name_space      Specifies the execution domain used for the photoflo to abort.
  1276. flo_id  Specifies a particular instance of the photoflo to abort.
  1277. Description
  1278. XieAbort will prematurely terminate execution of the photoflo specified by name_space and
  1279. flo_id. Any output from the photoflo that is pending client retrieval is freed. Stored photoflos are
  1280. returned to the inactive state; immediate photoflos are destroyed.
  1281.  
  1282. If the photoflo specified by name_space and flo_id is either invalid or  not active, no action is
  1283. taken; it is not an error, and nothing is destroyed.
  1284.  
  1285. For stored photoflos, name_space is always ServerIDSpace (the value zero) and flo_id is the
  1286. photoflo's resource-id. For immediate photoflos name_space is a photospace resource-id and
  1287. flo_id  is 32-bit value that uniquely identifies the instance of the photoflo within name_space.
  1288. See Also
  1289. XieExecutePhotoflo, XieExecuteImmediate
  1290.  XIElib - Abort and Await Functions     XieAwait
  1291. Name
  1292. XieAwait - block all further requests for this client connection from being honored by the server while
  1293. the photoflo is active
  1294. Syntax
  1295. void XieAwait (display, name_space, flo_id);
  1296. Display *display;
  1297. unsigned long name_space;
  1298. unsigned long flo_id;
  1299. Arguments
  1300. display Specifies a connection to an X server.
  1301. name_space      Specifies the execution domain used for the photoflo to block requests.
  1302. flo_id  Specifies a particular instance of the photoflo to block requests.
  1303. Description
  1304. XieAwait blocks all further requests for this client connection from being honored by the server
  1305. while the photoflo, specified by name_space and flo_id, is active. When the photoflo transitions
  1306. from the active state, blocked requests are allowed to be processed in the order received.
  1307.  
  1308. If the photoflo specified by name_space and flo_id is either invalid or not active, no action is
  1309. taken; it is not an error, and the client is not blocked.
  1310.  
  1311. For stored photoflos, name_space is always ServerIDSpace (the value zero) and flo_id is the
  1312. photoflo's resource-id. For immediate photoflos name_space is a photospace resource-id and
  1313. flo_id  is 32-bit value that uniquely identifies the instance of the photoflo within name_space.
  1314. Warning
  1315. Calling XieAwait before sending all import data or before retrieving all export data will block the
  1316. client from sending or retrieving the remaining data. This also will prevent completion of the
  1317. photoflo and prevent any and all protocol requests from this client from being honored. This deadlock
  1318. can be broken only by another client completing or aborting the photoflo (to release the Await), or by
  1319. breaking the client connection.
  1320. Errors
  1321. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1322. See Also
  1323. XieExecutePhotoFlo, XieExecuteImmediate
  1324.  XIElib - Photoflo Element Functions    XieFloImportClientLUT
  1325. Name
  1326. XieFloImportClientLUT - specify an ImportClientLUT element and set its parameters
  1327. Syntax
  1328. void XieFloImportClientLUT (element, data_class, band_order, length,
  1329. levels)
  1330. XiePhotoElement *element;
  1331. XieDataClass data_class;
  1332. XieOrientation band_order;
  1333. XieLTriplet length;
  1334. XieLevels levels;
  1335. Arguments
  1336. element Specifies the XiePhotoElement structure to use.
  1337. data_class      Specifies the number of lookup arrays to expect.
  1338. band_order      Specifies the order of triple band arrays.
  1339. length  Specifies the number of entries per array.
  1340. levels  Specifies the number of quantization levels represented per array.
  1341. Description
  1342. An ImportClientLUT element accepts lookup table data from the protocol stream. The transport of
  1343. data through the protocol stream is accomplished using XiePutClientData. This data is accepted
  1344. by the Point, ExportLUT, and ExportClientLUT elements.
  1345.  
  1346. data_class, which specifies the number of lookup arrays to expect, can be set to one of the
  1347. following standard data class values:
  1348.  
  1349. xieValSingleBand
  1350. xieValTripleBand
  1351.  
  1352. The length of each array should match the number of source image levels that will be remapped
  1353. through the array. When a triple band image is to be remapped through a single band array, the
  1354. length of the array should match the product of the source image levels of all three bands; in this
  1355. case, band_order specifies the order in which pixels from a triple band image should be combined
  1356. to form indices for a single band array. band_order can be set to one of the following standard
  1357. orientation values:
  1358.  
  1359. xieValLSFirst
  1360. xieValMSFirst
  1361.  
  1362. The least significant band of trichromatic data is the first band mentioned in the common name of the
  1363. colorspace: for example, red is the least significant band of RGB data. When one LUT array is used
  1364. with triple band data, the algorithm for computing combined array indices, based on band_order,
  1365. is:
  1366.  
  1367. LUT band order
  1368. LUT indexing algorithm for combining pixel values
  1369. LSFirst
  1370. index = value[0] + value[1] x levels[0] + value[2] x levels[0] x levels[1]
  1371. MSFirst
  1372. index = value[2] + value[1] x levels[2] + value[0] x levels[2] x levels[1]
  1373.  
  1374. When three LUT arrays are used, band_order specifies whether this band corresponds with the
  1375. least significant or most significant LUT array. Each array is transported as a separate data stream.
  1376. For example, if the colorspace of the image data is RGB:
  1377.  
  1378. band
  1379. LSFirst
  1380. MSFirst
  1381. 0
  1382. Red array
  1383. Blue array
  1384. 1
  1385. Green array
  1386. Green array
  1387. 2
  1388. Blue array
  1389. Red array
  1390. Structures
  1391. XieFloImportClientLUT sets the XiePhotoElement structure field elemType to
  1392. xieElemImportClientLUT, which identifies the element as an ImportClientLUT, and sets the
  1393. fields of the member structure ImportClientLUT using the arguments in the argument list.
  1394.  
  1395. typedef unsigned XieDataClass;
  1396. typedef unsigned XieOrientation;
  1397. typedef unsigned long XieLTriplet[3];
  1398. typedef unsigned long XieLevels[3];
  1399.  
  1400. typedef struct {
  1401.         int elemType;
  1402.         union {
  1403.                 ...
  1404.                 struct {
  1405.                         XieDataClass data_class;
  1406.                         XieOrientation band_order;
  1407.                         XieLTriplet length;
  1408.                         XieLevels levels;
  1409.                 } ImportClientLUT;
  1410.                 ...
  1411.         } data;
  1412. } XiePhotoElement;
  1413.  
  1414. /* Definitions of DataClass */
  1415. #define xieValSingleBand        1
  1416. #define xieValTripleBand        2
  1417.  
  1418. /* Definitions of Orientation Types */
  1419. #define xieValLSFirst   1
  1420. #define xieValMSFirst   2
  1421. Errors
  1422. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1423. xieErrNoFloMatch        levels is incompatible with the server's depth-handling capabilities
  1424. xieErrNoFloValue        Invalid data_class or band_order
  1425. See Also
  1426. XiePutClientData, XieQueryPhotoflo, XieFloExportLUT, XieFloExportClientLUT, XieFloPoint,
  1427. XieFloImportLUT
  1428.  XIElib - Photoflo Element Functions    XieFloImportClientPhoto
  1429. Name
  1430. XieFloImportClientPhoto - specify an ImportClientPhoto element and set its parameters
  1431. Syntax
  1432. void XieFloImportClientPhoto (element, data_class, width, height,
  1433. levels, notify, decode_tech, decode_param)
  1434. XiePhotoElement *element;
  1435. XieDataClass data_class;
  1436. XieLTriplet width;
  1437. XieLTriplet height;
  1438. XieLevels levels;
  1439. Bool notify;
  1440. XieDecodeTechnique decode_tech;
  1441. XiePointer decode_param;
  1442. Arguments
  1443. element Specifies the XiePhotoElement structure to use.
  1444. data_class      Specifies whether the data is single band or triple band.
  1445. width   Specifies the width of the image in pixels per band.
  1446. height  Specifies the height of the image in pixels per band.
  1447. levels  Specifies the number of quantization levels per band.
  1448. notify  Specifies whether to enable sending DecodeNotify events.
  1449. decode_tech     Specifies the decode technique required to interpret the image.
  1450. decode_param    Specifies the list of additional parameters required by decode_tech.
  1451. Description
  1452. An ImportClientPhoto element accepts image data from the protocol stream. This data may be
  1453. processed for display or used as process domain data. A process domain is inserted in many element
  1454. definitions and is used to restrict the element's processing to a subset of the source data pixels. The
  1455. attributes and organization of the expected data stream are fully specified by the parameters. The
  1456. actual transport of image data through the protocol stream is requested using XiePutClientData.
  1457.  
  1458. notify enables DecodeNotify events to be sent if anomalies are encountered while interpreting
  1459. the imported image data: either an error has been encountered while decoding an image or the image
  1460. data received does not satisfy the expected dimensions.
  1461.  
  1462. Only constrained data can be sent through the protocol stream; therefore, levels must be valid.
  1463.  
  1464. data_class specifies whether the data is single band or triple band and can be set to one of the
  1465. following standard data class values:
  1466.  
  1467. xieValSingleBand
  1468. xieValTripleBand
  1469.  
  1470. Decode techniques define the techniques that can be used to interpret uncompressed image data or
  1471. decode compressed images. decode_tech can be assigned one of the following standard decode
  1472. technique values:
  1473.  
  1474. xieValDecodeUncompressedSingle
  1475. xieValDecodeUncompressedTriple
  1476. xieValDecodeG31D
  1477. xieValDecodeG32D
  1478. xieValDecodeG42D
  1479. xieValDecodeJPEGBaseline
  1480. xieValDecodeJPEGLossless
  1481. xieValDecodeTIFF2
  1482. xieValDecodeTIFFPackBits
  1483.  
  1484. If a vendor defined additional private decode techniques, the values given to these techniques can be
  1485. assigned to decode_tech.
  1486. Output Attributes
  1487. Class   class of imported image
  1488. Type    constrained
  1489. Width   width of imported image (in pixels)
  1490. Height  height of imported image (in pixels)
  1491. Levels  levels of imported image
  1492. Structures
  1493. XieFloImportClientPhoto sets the XiePhotoElement structure field elemType to
  1494. xieElemImportClientPhoto, which identifies the element as an ImportClientPhoto, and sets
  1495. the fields of the member structure ImportClientPhoto using the arguments in the argument list.
  1496.  
  1497. typedef unsigned XieDataClass;
  1498. typedef unsigned XieDecodeTechnique;
  1499. typedef unsigned long XieLTriplet[3];
  1500. typedef unsigned long XieLevels[3];
  1501.  
  1502. typedef struct {
  1503.         int elemType;
  1504.         union {
  1505.                 ...
  1506.                 struct {
  1507.                         XieDataClass data_class;
  1508.                         XieLTriplet width;
  1509.                         XieLTriplet height;
  1510.                         XieLevels levels;
  1511.                         Bool notify;
  1512.                         XieDecodeTechnique decode_tech;
  1513.                         XiePointer decode_param;
  1514.                 } ImportClientPhoto;
  1515.                 ...
  1516.         } data;
  1517. } XiePhotoElement;
  1518.  
  1519. /* Definitions of DataClass */
  1520. #define xieValSingleBand        1
  1521. #define xieValTripleBand        2
  1522.  
  1523. /* Definitions for DecodeTechniques */
  1524. #define xieValDecodeUncompressedSingle  2
  1525. #define xieValDecodeUncompressedTriple  3
  1526. #define xieValDecodeG31D        4
  1527. #define xieValDecodeG32D        6
  1528. #define xieValDecodeG42D        8
  1529. #define xieValDecodeJPEGBaseline        10
  1530. #define xieValDecodeJPEGLossless        12
  1531. #define xieValDecodeTIFF2       14
  1532. #define xieValDecodeTIFFPackBits        16
  1533. Errors
  1534. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1535. xieErrNoFloMatch        levels is incompatible with the server's depth-handling capabilities
  1536. xieErrNoFloTechnique    Invalid decode_tech or decode_param
  1537. xieErrNoFloValue        Invalid width, height, levels (zero) or
  1538. invalid data_class
  1539. See Also
  1540. XieTecDecodeUncompressedSingle, XieTecDecodeUncompressedTriple, XieTecDecodeG31D,
  1541. XieTecDecodeG32D, XieTecDecodeG42D, XieTecDecodeTIFF2, XieTecDecodeTIFFPackBits,
  1542. XieTecDecodeJPEGBaseline, XieTecDecodeJPEGLossless
  1543.  XIElib - Photoflo Element Functions    XieFloImportClientROI
  1544. Name
  1545. XieFloImportClientROI - specify an ImportClientROI element and set its parameters
  1546. Syntax
  1547. void XieFloImportClientROI (element, rectangles);
  1548. XiePhotoElement *element;
  1549. unsigned int rectangles;
  1550. Arguments
  1551. element Specifies the XiePhotoElement structure to use.
  1552. rectangles      Specifies the number of rectangles expected.
  1553. Description
  1554. An ImportClientROI element accepts a list of rectangles from the protocol stream. These data can be
  1555. used as input to a process domain or an ExportROI or ExportClientROI element. A process domain is
  1556. inserted in many element definitions and is used to restrict the element's processing to a subset of the
  1557. source data pixels. The actual transport of data through the protocol stream is accomplished using
  1558. XiePutClientData (the band_number parameter of XiePutClientData is ignored).
  1559. Structures
  1560. XieFloImportClientROI sets the XiePhotoElement structure field elemType to
  1561. xieElemImportClientROI, which identifies the element as an ImportClientROI, and sets the
  1562. fields of the member structure ImportClientROI using the arguments in the argument list.
  1563.  
  1564. typedef struct {
  1565.         int elemType;
  1566.         union {
  1567.                 ...
  1568.                 struct {
  1569.                         unsigned int rectangles;
  1570.                 } ImportClientROI;
  1571.                 ...
  1572.         } data;
  1573. } XiePhotoElement;
  1574. Errors
  1575. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1576. See Also
  1577. XiePutClientData, XieQueryPhotoflo
  1578. XieFloExportROI, XieFloExportClientROI, XieFloImportROI
  1579.  XIElib - Photoflo Element Functions    XieFloImportDrawable
  1580. Name
  1581. XieFloImportDrawable - specify an ImportDrawable element and set its parameters
  1582. Syntax
  1583. void XieFloImportDrawable (element, drawable, src_x, src_y, width,
  1584. height, fill, notify)
  1585. XiePhotoElement *element;
  1586. Drawable drawable;
  1587. int src_x;
  1588. int src_y;
  1589. unsigned int width;
  1590. unsigned int height;
  1591. unsigned long fill;
  1592. Bool notify;
  1593. Arguments
  1594. element Specifies the XiePhotoElement structure to use.
  1595. drawable        Specifies the Drawable resource supplying the data.
  1596. src_x   Specifies the left corner of the region of the data to be imported.
  1597. src_y   Specifies the upper corner of the region of the data to be imported.
  1598. width   Specifies the width of the region of the data to be imported.
  1599. height  Specifies the height of the region of the data to be imported.
  1600. fill    Specifies the Colormap index to use for all regions that are obscured.
  1601. notify  Specifies whether to enable sending ImportObscured events.
  1602. Description
  1603. An ImportDrawable element allows access to data existing in a Drawable. This data may be
  1604. processed for display or, if drawable is one bit deep, used as process domain data. A process
  1605. domain is inserted in many element definitions and is used to restrict the element's processing to a
  1606. subset of the source data pixels.
  1607.  
  1608. notify enables ImportObscured events to be sent if data for one or more regions of a Window
  1609. are obscured and cannot be retrieved from backing store. The arguments src_x, src_y, width,
  1610. and height specify the region of data to be imported from drawable, where src_x and src_y
  1611. define the upper-left corner of the region.
  1612. Output Attributes
  1613. Class   single band
  1614. Type    constrained
  1615. Width   width
  1616. Height  height
  1617. Levels  2depth (that is, drawable depth)
  1618. Structures
  1619. XieFloImportDrawable sets the XiePhotoElement structure field elemType to
  1620. xieElemImportDrawable, which identifies the element as an ImportDrawable, and sets the
  1621. fields of the member structure ImportDrawable using the arguments in the argument list.
  1622.  
  1623. typedef struct {
  1624.         int elemType;
  1625.         union {
  1626.                 ...
  1627.                 struct {
  1628.                         Drawable drawable;
  1629.                         int src_x;
  1630.                         int src_y;
  1631.                         unsigned int width;
  1632.                         unsigned int height;
  1633.                         unsigned long fill;
  1634.                         Bool notify;
  1635.                 } ImportDrawable;
  1636.                 ...
  1637.         } data;
  1638. } XiePhotoElement;
  1639. Errors
  1640. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1641. xieErrNoFloDrawable     Invalid drawable
  1642. xieErrNoFloValue        Invalid region width, height, src_x, src_y
  1643.  XIElib - Photoflo Element Functions    XieFloImportDrawablePlane
  1644. Name
  1645. XieFloImportDrawablePlane - specify an ImportDrawablePlane element and set its parameters
  1646. Syntax
  1647. void XieFloImportDrawablePlane (element, drawable, src_x, src_y,
  1648. width, height, fill, bit_plane, notify)
  1649. XiePhotoElement *element;
  1650. Drawable drawable;
  1651. int src_x;
  1652. int src_y;
  1653. unsigned int width;
  1654. unsigned int height;
  1655. unsigned long fill;
  1656. unsigned long bit_plane;
  1657. Bool notify;
  1658. Arguments
  1659. element Specifies the XiePhotoElement structure to use.
  1660. drawable        Specifies the Drawable resource supplying the data.
  1661. src_x   Specifies the left corner of the region of the data to be imported.
  1662. src_y   Specifies the upper corner of the region of the data to be imported.
  1663. width   Specifies the width of the region of the data to be imported.
  1664. height  Specifies the height of the region of the data to be imported.
  1665. fill    Specifies the Colormap index to use for all regions that are obscured.
  1666. bit_plane       Specifies the plane to be imported from drawable.
  1667. notify  Specifies whether to enable sending ImportObscured events.
  1668. Description
  1669. An ImportDrawablePlane event allows access to a single plane of data existing in a Drawable. This
  1670. data may be processed for display or used as process domain data. A process domain is inserted in
  1671. many element definitions and is used to restrict the element's processing to a subset of the source data
  1672. pixels.
  1673.  
  1674. notify enables ImportObscured events to be sent if data for one or more regions of a Window
  1675. are obscured and cannot be retrieved from backing store. The arguments src_x, src_y, width,
  1676. and height specify the region of data to be imported from drawable, where src_x and src_y
  1677. define the upper-left corner of the region.
  1678.  
  1679. bit_plane must have exactly one bit set to one (1), and the value of bit_plane must be less than
  1680. or equal to  , where n is the depth of drawable. This single bit selects the corresponding bit to
  1681. be extracted from pixels within drawable.
  1682. Output Attributes
  1683. Class   single band
  1684. Type    constrained
  1685. Width   width
  1686. Height  height
  1687. Levels  2
  1688. Structures
  1689. XieFloImportDrawablePlane sets the XiePhotoElement structure field elemType to
  1690. xieElemImportDrawablePlane, which identifies the element as an ImportDrawablePlane, and
  1691. sets the fields of the member structure ImportDrawablePlane using the arguments in the
  1692. argument list.
  1693.  
  1694. typedef struct {
  1695.         int elemType;
  1696.         union {
  1697.                 ...
  1698.                 struct {
  1699.                         Drawable drawable;
  1700.                         int src_x;
  1701.                         int src_y;
  1702.                         unsigned int width;
  1703.                         unsigned int height;
  1704.                         unsigned long fill;
  1705.                         unsigned long bit_plane;
  1706.                         Bool notify;
  1707.                 } ImportDrawablePlane;
  1708.                 ...
  1709.         } data;
  1710. } XiePhotoElement;
  1711. Errors
  1712. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1713. xieErrNoFloDrawable     Invalid drawable
  1714. xieErrNoFloValue        Invalid bit_plane or region width, height, src_x, src_y
  1715.  XIElib - Photoflo Element Functions    XieFloImportLUT
  1716. Name
  1717. XieFloImportLUT - specify an ImportLUT element and set its parameters
  1718. Syntax
  1719. void XieFloImportLUT (element, lut)
  1720. XiePhotoElement *element;
  1721. XieLut lut;
  1722. Arguments
  1723. element Specifies the XiePhotoElement structure to use.
  1724. lut     Specifies the LUT resource supplying the lookup table.
  1725. Description
  1726. An ImportLUT element allows access to lookup table data existing in a LUT resource. These data are
  1727. accepted by the Point, ExportLUT, and ExportClientLUT elements.
  1728.  
  1729. Attributes of the lookup table data are inherited from lut.
  1730. Structures
  1731. XieFloImportLUT sets the XiePhotoElement structure field elemType to
  1732. xieElemImportLUT, which identifies the element as an ImportLUT, and sets the fields of the
  1733. member structure ImportLUT using the arguments in the argument list.
  1734.  
  1735. typedef XID XieLut;
  1736.  
  1737. typedef struct {
  1738.         int elemType;
  1739.         union {
  1740.                 ...
  1741.                 struct {
  1742.                         XieLut lut;
  1743.                 } ImportLUT;
  1744.                 ...
  1745.         } data;
  1746. } XiePhotoElement;
  1747. Errors
  1748. xieErrNoFloAccess       Attempt to import from lut before it has been populated
  1749. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1750. xieErrNoFloLUT  An unknown lut has been specified
  1751.  XIElib - Photoflo Element Functions    XieFloImportPhotomap
  1752. Name
  1753. XieFloImportPhotomap - specify an ImportPhotomap element and set its parameters
  1754. Syntax
  1755. void XieFloImportPhotomap (element, photomap, notify)
  1756. XiePhotoElement *element;
  1757. XiePhotomap photomap;
  1758. Bool notify;
  1759. Arguments
  1760. element Specifies the XiePhotoElement structure to use.
  1761. photomap        Specifies the photomap resource supplying image data.
  1762. notify  Specifies whether to enable sending DecodeNotify events.
  1763. Description
  1764. An ImportPhotomap element allows access to image data existing in a photomap; a photomap is a
  1765. server resource that can be used to store image data. This data may be processed for display or used as
  1766. process domain data (if its levels attribute is 2), or it may be used as source to ExportPhotomap or
  1767. ExportClientPhoto or any other element which takes image data as input. A process domain is
  1768. inserted in many element definitions and is used to restrict the element's processing to a subset of the
  1769. source data pixels.
  1770.  
  1771. notify enables DecodeNotify events to be sent if anomalies are encountered while decoding
  1772. compressed data: either an error has been encountered while decoding an image or the image data
  1773. received does not satisfy the expected dimensions.
  1774.  
  1775. Attributes of the source data are inherited from photomap.
  1776. Output Attributes
  1777. Class   same as photomap
  1778. Type    same as photomap
  1779. Width   same as photomap
  1780. Height  same as photomap
  1781. Levels  same as photomap
  1782. Structures
  1783. XieFloImportPhotomap sets the XiePhotoElement structure field elemType to
  1784. xieElemImportPhotomap, which identifies the element as an ImportPhotomap, and sets the
  1785. fields of the member structure ImportPhotomap using the arguments in the argument list.
  1786.  
  1787. typedef XID XiePhotomap;
  1788.  
  1789. typedef struct {
  1790.         int elemType;
  1791.         union {
  1792.                 ...
  1793.                 struct {
  1794.                         XiePhotomap photomap;
  1795.                         Bool notify;
  1796.                 } ImportPhotomap;
  1797.                 ...
  1798.         } data;
  1799. } XiePhotoElement;
  1800. Errors
  1801. xieErrNoFloAccess       Attempt to import from photomap before it has been populated
  1802. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1803. xieErrNoFloPhotomap     An unknown photomap has been specified
  1804. See Also
  1805. XieFloExportPhotomap, XIeFloExportClientPhoto
  1806.  
  1807.  XIElib - Photoflo Element Functions    XieFloImportROI
  1808. Name
  1809. XieFloImportROI - specify an ImportROI element and set its parameters
  1810. Syntax
  1811. void XieFloImportROI (element, roi)
  1812. XiePhotoElement *element;
  1813. XieRoi roi;
  1814. Arguments
  1815. element Specifies the XiePhotoElement structure to use.
  1816. roi     Specifies the ID of the ROI supplying the list-of-rectangles.
  1817. Description
  1818. An ImportROI element allows access to a list-of-rectangles existing in a ROI resource. This data may
  1819. be referenced by a process domain, or used as input to an ExportClientROI or ExportROI element. A
  1820. process domain is inserted in many element definitions and is used to restrict the element's processing
  1821. to a subset of the source data pixels.
  1822. Structures
  1823. XieFloImportROI sets the XiePhotoElement structure field elemType to
  1824. xieElemImportROI, which identifies the element as an ImportROI, and sets the fields of the
  1825. member structure ImportROI using the arguments in the argument list.
  1826.  
  1827. typedef XID XieRoi;
  1828.  
  1829. typedef struct {
  1830.         int elemType;
  1831.         union {
  1832.                 ...
  1833.                 struct {
  1834.                         XieRoi roi;
  1835.                 } ImportROI;
  1836.                 ...
  1837.         } data;
  1838. } XiePhotoElement;
  1839. Errors
  1840. xieErrNoFloAccess       Attempt to import from roi before it has been populated
  1841. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1842. xieErrNoFloPhotomap     An unknown roi has been specified
  1843. See Also
  1844. XieFloExportROI, XieFloExportClientROI
  1845.  
  1846.  XIElib - Photoflo Element Functions    XieFloArithmetic
  1847. Name
  1848. XieFloArithmetic - specify an Arithmetic element and set its parameters
  1849. Syntax
  1850. void XieFloArithmetic (element, src1, src2, domain, constant,
  1851. operator, band_mask)
  1852. XiePhotoElement *element;
  1853. XiePhototag src1;
  1854. XiePhototag src2;
  1855. XieProcessDomain *domain;
  1856. XieConstant constant;
  1857. XieArithmeticOp operator;
  1858. unsigned int band_mask;
  1859. Arguments
  1860. element Specifies the XiePhotoElement structure to use.
  1861. src1    Specifies the phototag of the first data source.
  1862. src2    Specifies the phototag of the second data source, or 0 if none.
  1863. domain  Specifies the subset of source data that will be operated on.
  1864. constant        Specifies the constant data source (if src2 is 0).
  1865. operator        Specifies the arithmetic operation to be performed.
  1866. band_mask       Specifies which bands are to be operated on.
  1867. Description
  1868. An Arithmetic element produces output data by performing an addition, subtraction, minimum, or
  1869. maximum operation between two data sources or between a single data source and a constant.
  1870. Furthermore, multiplication, division, or gamma correction may by applied to a single data source.
  1871.  
  1872. When two sources are involved, src1 and src2 are the phototags of the elements supplying source
  1873. data (constant is ignored). A phototag is the position or index of an element within an array of
  1874. elements used to specify a photoflo; the first element in the array has a phototag value of one (1). If
  1875. the operation is to involve a constant, src1 is one operand, src2 must be zero, and constant is
  1876. used as the other operand.
  1877.  
  1878. When two sources are involved, all attributes, other than width and height, must match; all
  1879. output attributes are inherited from src1.
  1880.  
  1881. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  1882. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  1883. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  1884. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  1885. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  1886. offset_y fields are ignored.
  1887.  
  1888. Only bands selected by band_mask are subject to processing. Other bands present in the image are
  1889. passed through to the output. For example, a band_mask of 0012 indicates that only the least
  1890. significant band would be processed; operating on all bands requires a band_mask of 1112. Using
  1891. band_mask to select source data that have two (2) or less levels is not permitted.
  1892.  
  1893. Pixel computations that would lead to errors, will yield valid server-dependent values (for example,
  1894. dividing by a constrained pixel value of zero might result in a value of levels-1).
  1895.  
  1896. The valid operations for the Arithmetic process element are:
  1897.  
  1898. Operator
  1899. src1 (operator) src2
  1900. src1 (operator) constant
  1901. xieValAdd
  1902. src1 + src2
  1903. src1 + constant
  1904. xieValSub
  1905. src1 - src2
  1906. src1 - constant
  1907. xieValSubRev
  1908. src2 - src1
  1909. constant - src1
  1910. xieValMul
  1911.  
  1912. src1 * constant
  1913. xieValDiv
  1914.  
  1915. src1 / constant
  1916. xieValDivRev
  1917.  
  1918. constant / src1
  1919. xieValMin
  1920. minimum( src1, src2 )
  1921. minimum( src1, constant )
  1922. xieValMax
  1923. maximum( src1, src2 )
  1924. maximum( src1, constant )
  1925. xieValGamma
  1926. (constrained)
  1927.  
  1928. (levels - 1) * ((src1 / (levels - 1))constant)
  1929. xieValGamma
  1930. (unconstrained)
  1931.  
  1932. src1constant
  1933. Output Attributes
  1934. Class   same as src1
  1935. Type    same as src1
  1936. Width   same as src1
  1937. Height  same as src1
  1938. Levels  same as src1
  1939. Structures
  1940. XieFloArithmetic sets the XiePhotoElement structure field elemType to
  1941. xieElemArithmetic, which identifies the element as an Arithmetic, and sets the fields of the
  1942. member structure Arithmetic using the arguments in the argument list.
  1943.  
  1944. typedef unsigned XiePhototag;
  1945. typedef float XieConstant[3];
  1946. typedef unsigned XieArithmeticOp;
  1947. typedef struct {
  1948.          int offset_x;
  1949.          int offset_y;
  1950.          XiePhototag phototag;
  1951. } XieProcessDomain;
  1952.  
  1953. typedef struct {
  1954.         int elemType;
  1955.         union {
  1956.                 ...
  1957.                 struct {
  1958.                         XiePhototag src1;
  1959.                         XiePhototag src2;
  1960.                         XieProcessDomain domain;
  1961.                         XieConstant constant;
  1962.                         XieArithmeticOp operator;
  1963.                         unsigned int band_mask;
  1964.                 } Arithmetic;
  1965.                 ...
  1966.         } data;
  1967. } XiePhotoElement;
  1968.  
  1969. /* Definitions of ArithmeticOperations */
  1970. #define xieValAdd       1
  1971. #define xieValSub       2
  1972. #define xieValSubRev    3
  1973. #define xieValMul       4
  1974. #define xieValDiv       5
  1975. #define xieValDivRev    6
  1976. #define xieValMin       7
  1977. #define xieValMax       8
  1978. #define xieValGamma     9
  1979. Errors
  1980. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  1981. xieErrNoFloDomain       Invalid domain
  1982. xieErrNoFloMatch        Class, type, or levels differ between src1 and src2 or
  1983. selected data source are bitonal
  1984. xieErrNoFloOperator     Invalid operator
  1985. xieErrNoFloSource       Invalid src1 or src2 or
  1986. src2 has been specified with a monadic operator
  1987.  XIElib - Photoflo Element Functions    XieFloBandCombine
  1988. Name
  1989. XieFloBandCombine - specify a BandCombine element and set its parameters
  1990. Syntax
  1991. void XieFloBandCombine (element, src1, src2, src3)
  1992. XiePhotoElement *element;
  1993. XiePhototag src1;
  1994. XiePhototag src2;
  1995. XiePhototag src3;
  1996. Arguments
  1997. element Specifies the XiePhotoElement structure to use.
  1998. src1    Specifies the first element supplying source data.
  1999. src2    Specifies the second element supplying source data.
  2000. src3    Specifies the third element supplying source data.
  2001. Description
  2002. A BandCombine element merges three single band data sources to produce a triple band result. The
  2003. arguments src1, src2, and src3 must be of the same type, and each source must be single band.
  2004. Other attributes that are taken from the individual sources may differ. The output will be triple band.
  2005. Output Attributes
  2006. Class   triple band
  2007. Type    same as src1
  2008. Width   same as srcs
  2009. Height  same as srcs
  2010. Levels  same as srcs
  2011. Structures
  2012. XieFloBandCombine sets the XiePhotoElement structure field elemType to
  2013. xieElemBandCombine, which identifies the element as a BandCombine, and sets the fields of the
  2014. member structure BandCombine using the arguments in the argument list.
  2015.  
  2016. typedef unsigned XiePhototag;
  2017.  
  2018. typedef struct {
  2019.         int elemType;
  2020.         union {
  2021.                 ...
  2022.                 struct {
  2023.                         XiePhototag src1;
  2024.                         XiePhototag src2;
  2025.                         XiePhototag src3;
  2026.                 } BandCombine;
  2027.                 ...
  2028.         } data;
  2029. } XiePhotoElement;
  2030.  
  2031. Errors
  2032. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2033. xieErrNoFloMatch        A source has more than one band or
  2034. type differs between sources
  2035. xieErrNoFloSource       Invalid src1, src2, or src3
  2036.  XIElib - Photoflo Element Functions    XieFloBandExtract
  2037. Name
  2038. XieFloBandExtract - specify a BandExtract element and set its parameters
  2039. Syntax
  2040. void XieFloBandExtract (element, src, levels, bias, coefficients)
  2041. XiePhotoElement *element;
  2042. XiePhototag src;
  2043. unsigned int levels;
  2044. double bias;
  2045. XieConstant coefficients;
  2046. Arguments
  2047. element Specifies the XiePhotoElement structure to use.
  2048. src     Specifies the element supplying source data.
  2049. levels  Specifies the number of quantization levels for the output.
  2050. bias    Specifies the value to be added to each output pixel.
  2051. coefficients    Specifies the proportion of each band in src to pixelsin the single
  2052. band result.
  2053. Description
  2054. A BandExtract element produces single band output data from a triple band source by multiplying a
  2055. pixel value from each source band by its corresponding coefficient and then summing the results with
  2056. the bias value.
  2057.  
  2058. coefficients is a three-element array that determines the proportion of each source band pixel
  2059. that is used to form the output. levels is used as the levels attribute of the output data if the src
  2060. data are constrained; otherwise, it is ignored.
  2061.  
  2062. The source data must be triple band, and all bands must have equal dimensions. The output data will
  2063. be single band, with levels taken from the levels parameter, if the data type is constrained. All
  2064. other attributes are inherited from src.
  2065. Output Attributes
  2066. Class   single band
  2067. Type    same as src
  2068. Width   same as src
  2069. Height  same as src
  2070. Levels  levels if src is contrained, else unknown
  2071. Structures
  2072. XieFloBandExtract sets the XiePhotoElement structure field elemType to
  2073. xieElemBandExtract, which identifies the element as a BandExtract, and sets the fields of the
  2074. member structure BandExtract using the arguments in the argument list.
  2075.  
  2076. typedef float XieConstant[3];
  2077. typedef unsigned XiePhototag;
  2078.  
  2079. typedef struct {
  2080.         int elemType;
  2081.         union {
  2082.                 ...
  2083.                 struct {
  2084.                         XiePhototag src;
  2085.                         unsigned int levels;
  2086.                         float bias;
  2087.                         XieConstant coefficients;
  2088.                 } BandExtract;
  2089.                 ...
  2090.         } data;
  2091. } XiePhotoElement;
  2092. Errors
  2093. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2094. xieErrNoFloMatch        src is not triple band or
  2095. unequal interband dimensions
  2096. xieErrNoFloSource       Invalid src
  2097.  XIElib - Photoflo Element Functions    XieFloBandSelect
  2098. Name
  2099. XieFloBandSelect - specify a BandSelect element and set its parameters
  2100. Syntax
  2101. void XieFloBandSelect (element, src, band_number)
  2102. XiePhotoElement *element;
  2103. XiePhototag src;
  2104. unsigned int band_number;
  2105. Arguments
  2106. element Specifies the XiePhotoElement structure to use.
  2107. src     Specifies the element supplying source data.
  2108. band_number     Specifies which src band is to be selected to provide the output data.
  2109. Description
  2110. A BandSelect element produces single band output data by selecting a single band from a triple band
  2111. source.
  2112. Output Attributes
  2113. Class   single band
  2114. Type    same as src
  2115. Width   same as band selected from src
  2116. Height  same as band selected from src
  2117. Levels  same as band selected from src
  2118. Structures
  2119. XieFloBandSelect sets the XiePhotoElement structure field elemType to
  2120. xieElemBandSelect, which identifies the element as a BandSelect, and sets the fields of the
  2121. member structure BandSelect using the arguments in the argument list.
  2122.  
  2123. typedef unsigned XiePhototag;
  2124.  
  2125. typedef struct {
  2126.         int elemType;
  2127.         union {
  2128.                 ...
  2129.                 struct {
  2130.                         XiePhototag src;
  2131.                         unsigned int band_number;
  2132.                 } BandSelect;
  2133.                 ...
  2134.         } data;
  2135. } XiePhotoElement;
  2136. Errors
  2137. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2138. xieErrNoFloMatch        src is not triple band
  2139. xieErrNoFloSource       Invalid src
  2140. xieErrNoFloValue        Invalid band_number
  2141.  XIElib - Photoflo Element Functions    XieFloBlend
  2142. Name
  2143. XieFloBlend - specify a Blend element and set its parameters
  2144. Syntax
  2145. void XieFloBlend (element, src1, src2, src_constant, alpha,
  2146. alpha_const, domain, band_mask)
  2147. XiePhotoElement *element;
  2148. XiePhototag src1;
  2149. XiePhototag src2;
  2150. XieConstant src_constant;
  2151. XiePhototag alpha;
  2152. double alpha_const;
  2153. XieProcessDomain *domain;
  2154. unsigned int band_mask;
  2155. Arguments
  2156. element Specifies the XiePhotoElement structure to use.
  2157. src1    Specifies the phototag of the first data source.
  2158. src2    Specifies the phototag of the second data source, else 0.
  2159. src_constant    Specifies a constant data source, if src2 is 0.
  2160. alpha   Specifies the blend proportion for each processed pixel.
  2161. alpha_const     Specifies the constant blend proportion for each processed pixel.
  2162. domain  Specifies the subset of source data that will be operated on.
  2163. band_mask       Specifies which bands are to be operated on.
  2164. Description
  2165. A Blend element produces output data from two data sources or a single data source and a constant.
  2166. Each output pixel is a percentage combination of the source values, as controlled by an alpha input
  2167. image or an alpha constant.
  2168.  
  2169. When two sources are involved, src1 and src2 are the phototags of the elements supplying source
  2170. data; src_constant is ignored. A phototag is the position or index of an element within an array
  2171. of elements used to specify a photoflo; the first element in the array has a phototag value of one (1). If
  2172. the operation is to involve a constant, src1 is one operand, src2 must be zero, and
  2173. src_constant is used as the other operand. If alpha is nonzero, it controls the blend proportion
  2174. for each pixel that is processed, otherwise alpha_const provides this control. Domain may control
  2175. the subset of source data that will be operated on. Only bands selected by the band_mask are subject
  2176. to processing. Other bands present in the image are passed through to the output. For example, a
  2177. band_mask of 0012 indicates that only the least significant band would be processed; operating on
  2178. all bands requires a band_mask of 1112. Using band_mask to select source data that have two (2)
  2179. or less levels is not permitted.
  2180.  
  2181. When two sources are involved, all attributes, other that width and height, must match. If alpha
  2182. is nonzero, it must be a source of constrained data.
  2183.  
  2184. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  2185. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  2186. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  2187. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  2188. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  2189. offset_y fields are ignored.
  2190.  
  2191. Within the intersection of the source(s) and domain, each output pixel is a blend of the
  2192. corresponding pixels from src1 and src2 (or src1 pixels blended with src_constant). The
  2193. degree of blend is determined by the corresponding pixel taken from alpha or the value of
  2194. alpha_const. If alpha is nonzero, the proportion of blend is further scaled by alpha_const:
  2195.  
  2196. output = src1 * (1 - alpha / alpha_const) + src2 * (alpha / alpha_const)
  2197. (where alpha_const is greater than 0.0)
  2198.  
  2199. if alpha is zero:
  2200.  
  2201. output = src1 * (1 - alpha_const) + src2 * alpha_const
  2202. (where alpha_const is in the range [0.0, 1.0])
  2203. Output Attributes
  2204. Class   same as src1
  2205. Type    same as src1
  2206. Width   same as src1
  2207. Height  same as src1
  2208. Levels  same as src1
  2209. Structures
  2210. XieFloBlend sets the XiePhotoElement structure field elemType to xieElemBlend,
  2211. which identifies the element as a Blend, and sets the fields of the member structure Blend using the
  2212. arguments in the argument list.
  2213.  
  2214. typedef unsigned XiePhototag;
  2215. typedef float XieConstant[3];
  2216. typedef struct {
  2217.          int offset_x;
  2218.          int offset_y;
  2219.          XiePhototag phototag;
  2220. } XieProcessDomain;
  2221.  
  2222. typedef struct {
  2223.         int elemType;
  2224.         union {
  2225.                 ...
  2226.                 struct {
  2227.                         XiePhototag src1;
  2228.                         XiePhototag src2;
  2229.                         XieConstant src_constant;
  2230.                         XiePhototag alpha;
  2231.                         float alpha_constant;
  2232.                         XieProcessDomain domain;
  2233.                         unsigned int band_mask;
  2234.                 } Blend;
  2235.                 ...
  2236.         } data;
  2237. } XiePhotoElement;
  2238. Errors
  2239. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2240. xieErrNoFloMatch        Incompatible attributes between src1 and src2 or
  2241. alpha is unconstrained or
  2242. selected source data are bitonal
  2243. xieErrNoFloSource       Invalid src1, src2, or alpha
  2244. xieErrNoFloValue        alpha is zero and alpha_const is outside the range [0.0,1.0], or
  2245. alpha is nonzero and alpha_const is nonpositive
  2246.  XIElib - Photoflo Element Functions    XieFloCompare
  2247. Name
  2248. XieFloCompare - specify a Compare element and set its parameters
  2249. Syntax
  2250. void XieFloCompare (element, src1, src2, domain, constant, operator,
  2251. combine, band_mask)
  2252. XiePhotoElement *element;
  2253. XiePhototag src1;
  2254. XiePhototag src2;
  2255. XieProcessDomain *domain;
  2256. XieConstant constant;
  2257. XieCompareOp operator;
  2258. Bool combine;
  2259. unsigned int band_mask;
  2260. Arguments
  2261. element Specifies the XiePhotoElement structure to use.
  2262. src1    Specifies the first data source.
  2263. src2    Specifies the second data source.
  2264. domain  Specifies the subset of source data that will be operated on.
  2265. constant        Specifies the constant data source.
  2266. operator        Specifies the logical predicate operator used in the comparison.
  2267. combine Specifies whether the comparison should be done on a per-band or on
  2268. an all-bands basis.
  2269. band_mask       Specifies which bands are to be operated on.
  2270. Description
  2271. A Compare element takes two data sources or a single data source and a constant and generates a
  2272. Boolean bitmap output that reflects the results of a pointwise comparison. The output data has a value
  2273. of one wherever the comparison is true, and a value of zero everywhere else (that is, comparison false
  2274. or comparison not performed). The comparison may be performed on a per-band basis or for all bands
  2275. taken together.
  2276.  
  2277. When two sources are involved, src1 and src2 are the phototags of the elements supplying source
  2278. data; constant is ignored. A phototag is the position or index of an element within an array of
  2279. elements used to specify a photoflo; the first element in the array has a phototag value of one (1). If
  2280. the operation is to involve a constant, src1 is one operand, src2 must be zero, and constant is
  2281. used as the other operand.
  2282.  
  2283. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  2284. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  2285. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  2286. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  2287. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  2288. offset_y fields are ignored.
  2289.  
  2290. operator is the logical predicate operator used in the comparison. The valid operators for the
  2291. Compare process element are:
  2292.  
  2293. Operator
  2294. src1 (operator) src2
  2295. src1 (operator) constant
  2296. xieValLT
  2297. src1 *  src2
  2298. src1 * constant
  2299. xieValLE
  2300. src1 * src2
  2301. src1 * constant
  2302. xieValEQ
  2303. src1 * src2
  2304. src1 * constant
  2305. xieValNE
  2306. src1 * src2
  2307. src1 * constant
  2308. xieValGT
  2309. src1 * src2
  2310. src1 * constant
  2311. xieValGE
  2312. src1 * src2
  2313. src1 * constant
  2314.  
  2315. combine is a Boolean that determines whether the comparison should be done on a per-band basis
  2316. or on an all-bands basis. Only bands selected by band_mask are subject to processing. Other bands
  2317. present in the image are passed through to the output. For example, a band_mask of 0012 indicates
  2318. that only the least significant band would be processed; operating on all bands requires a
  2319. band_mask of 1112.
  2320.  
  2321. If combine is True or src1 is single band, the output data will form a single Boolean bitmap. If
  2322. src1 is triple band and combine is False, the output data will yield three separate boolean
  2323. bitmaps (for this case band_mask must specify all bands).
  2324.  
  2325. If src1 is triple band and combine is True, only the EQ and NE operators are allowed; equality is
  2326. established for each band selected by band_mask, and then the result is logically ANDed to derive
  2327. equality (inequality is a logical NOT of this result). For this case, width and height must match for all
  2328. bands selected by band_mask.
  2329.  
  2330. The relationship between combine and data class dependencies is given in the following table:
  2331.  
  2332. combine
  2333. input class
  2334. band_mask
  2335. output class
  2336. True
  2337. single band
  2338. n/a
  2339. single band
  2340.  
  2341. triple band
  2342. selected bands
  2343. single band
  2344. False
  2345. single band
  2346. n/a
  2347. single band
  2348.  
  2349. triple band
  2350. all bands
  2351. triple band
  2352. Output Attributes
  2353. Class   see Description
  2354. Type    constrained
  2355. Width   same as src1
  2356. Height  same as src1
  2357. Levels  2 per band (see Description)
  2358. Structures
  2359. XieFloCompare sets the XiePhotoElement structure field elemType to
  2360. xieElemCompare, which identifies the element as a Compare, and sets the fields of the member
  2361. structure Compare using the arguments in the argument list.
  2362.  
  2363. typedef unsigned XiePhototag;
  2364. typedef float XieConstant[3];
  2365. typedef struct {
  2366.          int offset_x;
  2367.          int offset_y;
  2368.          XiePhototag phototag;
  2369. } XieProcessDomain;
  2370.  
  2371. typedef struct {
  2372.         int elemType;
  2373.         union {
  2374.                 ...
  2375.                 struct {
  2376.                         XiePhototag src1;
  2377.                         XiePhototag src2;
  2378.                         XieProcessDomain domain;
  2379.                         XieConstant constant;
  2380.                         XieCompareOp operator;
  2381.                         Bool combine;
  2382.                         unsigned int band_mask;
  2383.                 } Compare;
  2384.                 ...
  2385.         } data;
  2386. } XiePhotoElement;
  2387.  
  2388. /* Definitions of Compare Operators */
  2389. #define xieValLT        1
  2390. #define xieValLE        2
  2391. #define xieValEQ        3
  2392. #define xieValNE        4
  2393. #define xieValGT        5
  2394. #define xieValGE        6
  2395. Errors
  2396. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2397. xieErrNoFloDomain       Invalid domain
  2398. xieErrNoFloMatch        Class differs between src1 and src2 or
  2399. invalid combination of operator and combine or
  2400. triple band, and combine is false, and band_mask incomplete
  2401. xieErrNoFloOperator     Invalid operator
  2402. xieErrNoFloSource       Invalid src1 or src2
  2403.  XIElib - Photoflo Element Functions    XieFloConstrain
  2404. Name
  2405. XieFloConstrain - specify a Constrain element and set its parameters
  2406. Syntax
  2407. void XieFloConstrain (element, src, levels, constrain_tech,
  2408. constrain_param)
  2409. XiePhotoElement *element;
  2410. XiePhototag src;
  2411. XieLevels levels;
  2412. XieConstrainTechnique constrain_tech;
  2413. XiePointer constrain_param;
  2414. Arguments
  2415. element Specifies the XiePhotoElement structure to use.
  2416. src     Specifies the element supplying source data.
  2417. levels  Specifies the number of quantization levels desired in the output data.
  2418. constrain_tech  Specifies the technique to be used when constraining the data.
  2419. constrain_param Specifies the list of additional parameters required by constrain.
  2420. Description
  2421. A Constrain element applies a quantization model to the image data to convert the data to a fixed
  2422. number of quantization levels. Application of the quantization model may involve steps such as range
  2423. shifting, scaling, clipping, and rounding.
  2424.  
  2425. src is the phototag of the element supplying source data. A phototag is the position or index of an
  2426. element within an array of elements used to specify a photoflo; the first element in the array has a
  2427. phototag value of one (1). Levels is the number of quantization levels desired in the output data.
  2428. constrain_tech specifies the constrain technique to be used when constraining the data.
  2429. constrain_param is the list of additional parameters required by constrain_tech.
  2430.  
  2431. If the input image is already constrained, the data will be reconstrained.
  2432.  
  2433. One of the following standard constrain technique values can be assigned to constrain_tech :
  2434.  
  2435. xieValConstrainClipScale
  2436. xieValConstrainHardClip
  2437.  
  2438. If a vendor defined additional private constrain techniques, the values given to these techniques can
  2439. be assigned to constrain_tech.
  2440. Output Attributes
  2441. Class   same as src
  2442. Type    constrained
  2443. Width   same as src
  2444. Height  same as src
  2445. Levels  levels
  2446. Structures
  2447. XieFloConstrain sets the XiePhotoElement structure field elemType to
  2448. xieElemConstrain, which identifies the element as a Constrain, and sets the fields of the
  2449. member structure Constrain using the arguments in the argument list.
  2450.  
  2451. typedef unsigned XiePhototag;
  2452. typedef unsigned long XieLevels[3];
  2453. typedef unsigned XieConstrainTechnique;
  2454.  
  2455. typedef struct {
  2456.         int elemType;
  2457.         union {
  2458.                 ...
  2459.                 struct {
  2460.                         XiePhototag src;
  2461.                         XieLevels levels;
  2462.                         XieConstrainTechnique constrain_tech;
  2463.                         XiePointer constrain_param;
  2464.                 } Constrain;
  2465.                 ...
  2466.         } data;
  2467. } XiePhotoElement;
  2468.  
  2469. /* Definitions for ConstrainTechniques */
  2470. #define xieValConstrainClipScale        2
  2471. #define xieValConstrainHardClip 4
  2472. Errors
  2473. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2474. xieErrNoFloSource       Invalid src
  2475. xieErrNoFloTechnique    Invalid constrain_tech or constrain_param
  2476. See Also
  2477. XieTecClipScale
  2478.  XIElib - Photoflo Element Functions    XieFloConvertFromIndex
  2479. Name
  2480. XieFloConvertFromIndex - specify a ConvertFromIndex element and set its parameters
  2481. Syntax
  2482. void XieFloConvertFromIndex (element, src, colormap, data_class,
  2483. precision)
  2484. XiePhotoElement *element;
  2485. XiePhototag src;
  2486. Colormap colormap;
  2487. XieDataClass data_class;
  2488. unsigned int precision;
  2489. Arguments
  2490. element Specifies the XiePhotoElement structure to use.
  2491. src     Specifies the element supplying source data.
  2492. colormap        Specifies the Colormap from which to obtain output pixel values.
  2493. data_class      Specifies whether the output data is single band or triple band.
  2494. precision       Specifies the number of bits to be used from  colormap's RGB
  2495. values.
  2496. Description
  2497. A ConvertFromIndex element converts Colormap index data into achromatic or trichromatic data.
  2498.  
  2499. data_class specifies whether  the output data is single band or triple band and can be set to one of
  2500. the following standard data class values:
  2501.  
  2502. xieValSingleBand
  2503. xieValTripleBand
  2504.  
  2505. If data_class is single band and a trichromatic colormap is specified (static color, pseudo color,
  2506. true color, or direct color), the gray shade for each pixel is taken from the red values in colormap.
  2507. If data_class is triple band and an achromatic colormap is specified (static gray or gray scale),
  2508. the red band will be replicated to populate the green and blue output bands.
  2509.  
  2510. The depth of colormap must match the Levels attribute of src (that is, 2depth must equal Levels).
  2511. Output Attributes
  2512. Class   data_class
  2513. Type    constrained
  2514. Width   same as src
  2515. Height  same as src
  2516. Levels  2precision (per band)
  2517. Structures
  2518. XieFloConvertFromIndex sets the XiePhotoElement structure field elemType to
  2519. xieElemConvertFromIndex, which identifies the element as a ConvertFromIndex, and sets the
  2520. fields of the member structure ConvertFromIndex using the arguments in the argument list.
  2521.  
  2522. typedef unsigned XieDataClass;
  2523. typedef unsigned XiePhototag;
  2524.  
  2525. typedef struct {
  2526.         int elemType;
  2527.         union {
  2528.                 ...
  2529.                 struct {
  2530.                         XiePhototag src;
  2531.                         Colormap colormap;
  2532.                         XieDataClass data_class;
  2533.                         unsigned int precision;
  2534.                 } ConvertFromIndex;
  2535.                 ...
  2536.         } data;
  2537. } XiePhotoElement;
  2538.  
  2539. /* Definitions of DataClass */
  2540. #define xieValSingleBand        1
  2541. #define xieValTripleBand        2
  2542. Errors
  2543. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2544. xieErrNoFloColormap     Invalid colormap
  2545. xieErrNoFloMatch        Levels of src do not match depth of colormap
  2546. xieErrNoFloSource       Invalid src
  2547. xieErrNoFloValue        Invalid data_class or precision
  2548.  XIElib - Photoflo Element Functions    XieFloConvertFromRGB
  2549. Name
  2550. XieFloConvertFromRGB - specify a ConvertFromRGB element and set its parameters
  2551. Syntax
  2552. void XieFloConvertFromRGB (element, src, color_space, color_param)
  2553. XiePhotoElement *element;
  2554. XiePhototag src;
  2555. XieColorspace color_space;
  2556. XiePointer color_param;
  2557. Arguments
  2558. element Specifies the XiePhotoElement structure to use.
  2559. src     Specifies the element supplying source data (RGB assumed).
  2560. color_space     Specifies the technique to be used in the conversion.
  2561. color_param     Specifies the list of additional parameters required by color_space.
  2562. Description
  2563. A ConvertFromRGB element converts RGB source data to an alternate colorspace.
  2564.  
  2565. The source data must be triple band, and all bands must have equal dimensions. The type and levels
  2566. of the output data are determined by the color_space's technique parameters. All other attributes
  2567. are inherited from src.
  2568.  
  2569. ConvertFromRGB techniques define the trichromatic colorspaces known to a ConvertFromRGB
  2570. element. One of the following standard ConvertFromRGB technique values can be assigned to
  2571. color_space:
  2572.  
  2573. xieValRGBToCIELab
  2574. xieValRGBToCIEXYZ
  2575. xieValRGBToYCbCr
  2576. xieValRGBToYCC
  2577.  
  2578. If a vendor defined additional private ConvertFromRGB techniques, the private technique values
  2579. given to these techniques can be assigned to color_space.
  2580. Output Attributes
  2581. Class   triple band
  2582. Type    color_space dependent
  2583. Width   same as src
  2584. Height  same as src
  2585. Levels  color_space dependent
  2586. Structures
  2587. XieFloConvertFromRGB sets the XiePhotoElement structure field elemType to
  2588. xieElemConvertFromRGB, which identifies the element as a ConvertFromRGB, and sets the
  2589. fields of the member structure ConvertFromRGB using the arguments in the argument list.
  2590.  
  2591. typedef unsigned XiePhototag;
  2592. typedef unsigned XieColorspace;
  2593.  
  2594. typedef struct {
  2595.         int elemType;
  2596.         union {
  2597.                 ...
  2598.                 struct {
  2599.                         XiePhototag src;
  2600.                         XieColorspace color_space;
  2601.                         XiePointer color_param;
  2602.                 } ConvertFromRGB;
  2603.                 ...
  2604.         } data;
  2605. } XiePhotoElement;
  2606.  
  2607. /* Definitions for Colorspace Conversions */
  2608. #define xieValRGBToCIELab       2
  2609. #define xieValRGBToCIEXYZ       4
  2610. #define xieValRGBToYCbCr        6
  2611. #define xieValRGBToYCC  8
  2612. Errors
  2613. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2614. xieErrNoFloMatch        src is not triple band or
  2615. unequal inter-band dimensions
  2616. xieErrNoFloSource       Invalid src
  2617. xieErrNoFloTechnique    Invalid color_space or color_param
  2618. See Also
  2619. XieFloConvertToRGB, XieTecRGBToCIELab, XieTecRGBToCIEXYZ, XieTecRGBToYCbCr,
  2620. XieTecRGBToYCC
  2621.  XIElib - Photoflo Element Functions    XieFloConvertToIndex
  2622. Name
  2623. XieFloConvertToIndex - specify a ConvertToIndex element and set its parameters
  2624. Syntax
  2625. void XieFloConvertToIndex (element, src, colormap, color_list,
  2626. notify, color_alloc_tech, color_alloc_param)
  2627. XiePhotoElement *element;
  2628. XiePhototag src;
  2629. Colormap colormap;
  2630. XieColorList color_list;
  2631. Bool notify;
  2632. XieColorAllocTechnique color_alloc_tech;
  2633. XiePointer color_alloc_param;
  2634. Arguments
  2635. element Specifies the XiePhotoElement structure to use.
  2636. src     Specifies the element supplying the constrained source data.
  2637. colormap        Specifies the Colormap from which to obtain output pixel values.
  2638. color_list      Specifies the list where Colormap indices are to be stored.
  2639. notify  Specifies whether to enable sending ColorAlloc events.
  2640. color_alloc_tech        Specifies the desired color allocation technique.
  2641. color_alloc_param       Specifies the list of additional parameters required by
  2642. color_alloc_tech.
  2643. Description
  2644. A ConvertToIndex element allocates and/or matches colors or gray shades, as required, from a
  2645. Colormap. It produces pixel indices as output data, and records indices that it allocates in
  2646. color_list.
  2647.  
  2648. The specified color_alloc_tech technique may generate a ColorAlloc event to warn the
  2649. client that results are of lesser fidelity than desired. Notify allows the client to be notified about
  2650. inferior results from color allocation or matching.
  2651.  
  2652. src is the phototag of the element supplying constrained source data. A phototag is the position or
  2653. index of an element within an array of elements used to specify a photoflo; the first element in the
  2654. array has a phototag value of one (1). Colormap is the Colormap from which colors or gray shades
  2655. are allocated and/or matched. Color_list is the list where allocated Colormap indices are to be stored.
  2656. color_alloc_tech specifies the desired color allocation technique. color_alloc_params is
  2657. the list of additional parameters required by color_alloc_tech.
  2658.  
  2659. color_list is purged of any colors it already contains when photoflo execution begins. Allocated
  2660. Colormap indices can be freed using XiePurgeColorList, XieDestroyColorList, or by
  2661. making color_list the target of an active photoflo. Care must be taken to ensure that
  2662. color_list is not referenced by more than one executing photoflo at any time; it is a protocol
  2663. error to allow more than one executing photoflo access the same color_list.
  2664.  
  2665. ColorAlloc techniques define the recognized color allocation techniques used by the ConvertToIndex
  2666. element. One of the following standard ColorAlloc technique values can be assigned to
  2667. color_alloc_tech:
  2668.  
  2669. xieValColorAllocDefault
  2670. xieValColorAllocAll
  2671. xieValColorAllocMatch
  2672. xieValColorAllocRequantize
  2673.  
  2674. If a vendor defined additional private ColorAlloc techniques, the private technique values given to
  2675. these techniques can be assigned to color_alloc_tech.
  2676.  
  2677. The server is required to support the default technique that is bound to one of the standard techniques
  2678. defined or a private technique.
  2679. Output Attributes
  2680. Class   single band
  2681. Type    constrained
  2682. Width   same as src
  2683. Height  same as src
  2684. Levels  2depth (that is, colormap depth)
  2685. Structures
  2686. XieFloConvertToIndex sets the XiePhotoElement structure field elemType to
  2687. xieElemConvertToIndex, which identifies the element as a ConvertToIndex, and sets the fields
  2688. of the member structure ConvertToIndex using the arguments in the argument list.
  2689.  
  2690. typedef unsigned XiePhototag;
  2691. typedef XID XieColorList;
  2692. typedef unsigned XieColorAllocTechnique;
  2693.  
  2694. typedef struct {
  2695.         int elemType;
  2696.         union {
  2697.                 ...
  2698.                 struct {
  2699.                         XiePhototag src;
  2700.                         Colormap colormap;
  2701.                         XieColorList color_list;
  2702.                         Bool notify;
  2703.                         XieColorAllocTechnique color_alloc_tech;
  2704.                         XiePointer color_alloc_param;
  2705.                 } ConvertToIndex;
  2706.                 ...
  2707.         } data;
  2708. } XiePhotoElement;
  2709.  
  2710. /* Definitions for ColorAlloc Techniques */
  2711. #define xieValColorAllocDefault 0
  2712. #define xieValColorAllocAll     2
  2713. #define xieValColorAllocMatch   4
  2714. #define xieValColorAllocRequantize      6
  2715. Errors
  2716. xieErrNoFloAccess       color_list already being used by another active photoflo
  2717. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2718. xieErrNoFloColorlist    Invalid color_list
  2719. xieErrNoFloColormap     Invalid colormap
  2720. xieErrNoFloMatch        Unequal inter-band dimensions
  2721. xieErrNoFloSource       Invalid src
  2722. xieErrNoFloTechnique    Invalid color_alloc_tech or color_alloc_param
  2723. See Also
  2724. XieCreateColorList, XiePurgeColorList, XieDestroyColorList
  2725. XieTecColorAllocAll, XieTecColorAllocMatch, XieTecColorAllocRequantize
  2726.  XIElib - Photoflo Element Functions    XieFloConvertToRGB
  2727. Name
  2728. XieFloConvertToRGB - specify a ConvertToRGB element and set its parameters
  2729. Syntax
  2730. void XieFloConvertToRGB (element, src, color_space, color_param)
  2731. XiePhotoElement *element;
  2732. XiePhototag src;
  2733. XieColorspace color_space;
  2734. XiePointer color_param;
  2735. Arguments
  2736. element Specifies the XiePhotoElement structure to use.
  2737. src     Specifies the element supplying source data.
  2738. color_space     Specifies the technique that will be used for the conversion.
  2739. color_param     Specifies the list of additional parameters required by color_space.
  2740. Description
  2741. A ConvertToRGB element converts alternate colorspace source data into RGB data.
  2742.  
  2743. The source data must be triple band, and all bands must have equal dimensions. The type and levels
  2744. of the output data are determined by the color_space's technique parameters. All other attributes
  2745. are inherited from src.
  2746.  
  2747. ConvertToRGB techniques define the trichromatic colorspaces known to a ConvertToRGB element.
  2748. One of the following standard ConvertFromRGB technique values can be assigned to
  2749. color_space:
  2750.  
  2751. xieValCIELabToRGB
  2752. xieValCIEXYZToRGB
  2753. xieValYCbCrToRGB
  2754. xieValYCCToRGB
  2755.  
  2756. If a vendor defined additional private ConvertToRGB techniques, the private technique values given
  2757. to these techniques can be assigned to color_space.
  2758. Output Attributes
  2759. Class   triple band
  2760. Type    color_space dependent
  2761. Width   same as src
  2762. Height  same as src
  2763. Levels  color_space dependent
  2764. Structures
  2765. XieFloConvertToRGB sets the XiePhotoElement structure field elemType to
  2766. xieElemConvertToRGB, which identifies the element as a ConvertToRGB, and sets the fields of
  2767. the member structure ConvertToRGB using the arguments in the argument list.
  2768.  
  2769. typedef unsigned XieColorspace;
  2770. typedef unsigned XiePhototag;
  2771.  
  2772. typedef struct {
  2773.         int elemType;
  2774.         union {
  2775.                 ...
  2776.                 struct {
  2777.                         XiePhototag src;
  2778.                         XieColorspace color_space;
  2779.                         XiePointer color_param;
  2780.                 } ConvertToRGB;
  2781.                 ...
  2782.         } data;
  2783. } XiePhotoElement;
  2784.  
  2785. /* Definitions for Colorspace Conversions */
  2786. #define xieValCIELabToRGB       2
  2787. #define xieValCIEXYZToRGB       4
  2788. #define xieValYCbCrToRGB        6
  2789. #define xieValYCCToRGB  8
  2790. Errors
  2791. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2792. xieErrNoFloMatch        src is not triple band or
  2793. unequal inter-band dimensions
  2794. xieErrNoFloSource       Invalid src
  2795. xieErrNoFloTechnique    Invalid color_space or color_param
  2796. See Also
  2797. XieTecCIELabToRGB, XieTecCIEXYZToRGB, XieTecYCbCrToRGB, XieTecYCCToRGB,
  2798. XieConvertFromRGB
  2799.  XIElib - Photoflo Element Functions    XieFloConvolve
  2800. Name
  2801. XieFloConvolve - specify a Convolve element and set its parameters
  2802. Syntax
  2803. void XieFloConvolve (element, src, domain, kernel, kernel_size,
  2804. band_mask, convolve_tech, convolve_param)
  2805. XiePhotoElement *element;
  2806. XiePhototag src;
  2807. XieProcessDomain *domain;
  2808. float *kernel;
  2809. int kernel_size;
  2810. unsigned int band_mask;
  2811. XieConvolveTechnique convolve_tech;
  2812. XiePointer convolve_param;
  2813. Arguments
  2814. element Specifies the XiePhotoElement structure to use.
  2815. src     Specifies the element supplying source data.
  2816. domain  Specifies the subset of the image that will be operated on.
  2817. kernel  Specifies the coefficients used in the convolution process.
  2818. kernel_size     Specifies the dimension of kernel.
  2819. band_mask       Specifies which bands are to be operated on.
  2820. convolve_tech   Specifies the technique for handling edge conditions.
  2821. convolve_param  Specifies the list of additional parameters required by
  2822. convolve_tech.
  2823. Description
  2824. A Convolve element produces output data by convolving each input pixel value (and surrounding
  2825. area) with the specified convolution kernel.
  2826.  
  2827. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  2828. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  2829. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  2830. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  2831. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  2832. offset_y fields are ignored.
  2833.  
  2834. kernel represents a square array of float data that has odd dimensions.  Thus, a single dimension is
  2835. used to specify kernel_size.
  2836.  
  2837. Only bands selected by the band_mask are subject to processing. Other bands present in the image
  2838. are passed through to the output. For example, a band_mask of 0012 indicates that only the least
  2839. significant band would be processed; operating on all bands requires a band_mask of 1112. Using
  2840. band_mask to select source data that have two (2) or less levels is not permitted.
  2841.  
  2842. All output data attributes are inherited from the source data.
  2843.  
  2844. Convolve techniques provide various methods of handling edge conditions. These techniques
  2845. determine what pixel values are used when Convolve requires data beyond the image bounds. One of
  2846. the following standard convolve technique values can be assigned to convolve_tech:
  2847.  
  2848. xieValConvolveDefault
  2849. xieValConvolveConstant
  2850. xieValConvolveReplicate
  2851.  
  2852. If a vendor defined additional private convolve techniques, the private technique values given to these
  2853. techniques can be assigned to convolve_tech.
  2854.  
  2855. The server is required to support the default technique that is bound to one of the standard techniques
  2856. defined above or a private technique.
  2857. Output Attributes
  2858. Class   same as src
  2859. Type    same as src
  2860. Width   same as src
  2861. Height  same as src
  2862. Levels  same as src
  2863. Structures
  2864. XieFloConvolve sets the XiePhotoElement structure field elemType to
  2865. xieElemConvolve, which identifies the element as a Convolve, and sets the fields of the member
  2866. structure Convolve using the arguments in the argument list.
  2867.  
  2868. typedef unsigned XieConvolveTechnique;
  2869. typedef unsigned XiePhototag;
  2870. typedef struct {
  2871.          int offset_x;
  2872.          int offset_y;
  2873.          XiePhototag phototag;
  2874. } XieProcessDomain;
  2875.  
  2876. typedef struct {
  2877.         int elemType;
  2878.         union {
  2879.                 ...
  2880.                 struct {
  2881.                         XiePhototag src;
  2882.                         XieProcessDomain domain;
  2883.                         float *kernel;
  2884.                         int kernel_size;
  2885.                         unsigned int band_mask;
  2886.                         XieConvolveTechnique convolve_tech;
  2887.                         XiePointer convolve_param;
  2888.                 } Convolve;
  2889.                 ...
  2890.         } data;
  2891. } XiePhotoElement;
  2892.  
  2893. /* Definitions for ConvolveTechniques */
  2894. #define xieValConvolveDefault   0
  2895. #define xieValConvolveConstant  2
  2896. #define xieValConvolveReplicate 4
  2897. Errors
  2898. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2899. xieErrNoFloDomain       Invalid domain
  2900. xieErrNoFloMatch        Selected source data are bitonal
  2901. xieErrNoFloSource       Invalid src
  2902. xieErrNoFloTechnique    Invalid convolve_tech or convolve_param
  2903. xieErrNoFloValue        Invalid kernel_size (for example, not odd)
  2904. See Also
  2905. XieTecConvolveConstant
  2906.  XIElib - Photoflo Element Functions    XieFloDither
  2907. Name
  2908. XieFloDither - specify a Dither element and set its parameters
  2909. Syntax
  2910. void XieFloDither (element, src, band_mask, levels, dither_tech,
  2911. dither_param)
  2912. XiePhotoElement *element;
  2913. XiePhototag src;
  2914. unsigned int band_mask;
  2915. XieLevels levels;
  2916. XieDitherTechnique dither_tech;
  2917. XiePointer dither_param;
  2918. Arguments
  2919. element Specifies the XiePhotoElement structure to use.
  2920. src     Specifies the element supplying source data.
  2921. band_mask       Specifies which bands are to be operated on.
  2922. levels  Specifies the number of levels desired in the output data.
  2923. dither_tech     Specifies the desired dither technique.
  2924. dither_param    Specifies the list of additional parameters required by dither_tech.
  2925. Description
  2926. The Dither element is used to reduce the number of quantization levels in an image. It accomplishes
  2927. this by affecting adjacent pixels (area affect) to make up for the lack of depth resolution.
  2928.  
  2929. Only bands selected by the band_mask are subject to processing. Other bands present in the image
  2930. are passed through to the output. For example, a band_mask of 0012 indicates that only the least
  2931. significant band would be processed; operating on all bands requires a band_mask of 1112. Using
  2932. band_mask to select source data that have two (2) or less levels is not permitted.
  2933.  
  2934. The source data must be constrained.
  2935.  
  2936. Dither techniques define the technique that can be used to dither an image. One of the following
  2937. standard dither technique values can be assigned to dither_tech:
  2938.  
  2939. xieValDitherDefault
  2940. xieValDitherErrorDiffusion
  2941. xieValDitherOrdered
  2942.  
  2943. If a vendor defined additional private dither techniques, the private technique values given to these
  2944. techniques can be assigned to dither_tech.
  2945.  
  2946. The server is required to support the default technique that is bound to one of the standard techniques
  2947. defined  or a private technique.
  2948. Output Attributes
  2949. Class   same as src
  2950. Type    constrained
  2951. Width   same as src
  2952. Height  same as src
  2953. Levels  levels
  2954. Structures
  2955. XieFloDither sets the XiePhotoElement structure field elemType to xieElemDither,
  2956. which identifies the element as a Dither, and sets the fields of the member structure Dither using
  2957. the arguments in the argument list.
  2958.  
  2959. typedef unsigned XiePhototag;
  2960. typedef unsigned long XieLevels[3];
  2961. typedef unsigned XieDitherTechnique;
  2962.  
  2963. typedef struct {
  2964.         int elemType;
  2965.         union {
  2966.                 ...
  2967.                 struct {
  2968.                         XiePhototag src;
  2969.                         XieLevels levels;
  2970.                         unsigned int band_mask;
  2971.                         XieDitherTechnique dither_tech;
  2972.                         XiePointer dither_param;
  2973.                 } Dither;
  2974.                 ...
  2975.         } data;
  2976. } XiePhotoElement;
  2977.  
  2978. /* Definitions for DitherTechniques */
  2979. #define xieValDitherDefault     0
  2980. #define xieValDitherErrorDiffusion      2
  2981. #define xieValDitherOrdered     4
  2982. Errors
  2983. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  2984. xieErrNoFloDomain       Invalid domain
  2985. xieErrNoFloMatch        Unconstrained src data or
  2986. selected source data are bitonal
  2987. xieErrNoFloSource       Invalid src
  2988. xieErrNoFloTechnique    Invalid dither_tech or dither_param
  2989. xieErrNoFloValue        Invalid output levels: less than two or greater than src levels
  2990. See Also
  2991. XieTecDitherOrdered
  2992.  XIElib - Photoflo Element Functions    XieFloGeometry
  2993. Name
  2994. XieFloGeometry - specify a Geometry element and set its parameters
  2995. Syntax
  2996. void XieFloGeometry (element, src, width, height, coefficients,
  2997. constant, band_mask, sample_tech, sample_param)
  2998. XiePhotoElement *element;
  2999. XiePhototag src;
  3000. unsigned int width;
  3001. unsigned int height;
  3002. float coefficients[6];
  3003. XieConstant constant;
  3004. unsigned int band_mask;
  3005. XieGeometryTechnique sample_tech;
  3006. XiePointer sample_param;
  3007. Arguments
  3008. element Specifies the XiePhotoElement structure to use.
  3009. src     Specifies the element supplying source data.
  3010. width   Specifies the horizontal dimension of the output data.
  3011. height  Specifies the vertical dimension of the output data.
  3012. coefficients    Specifies an affine transformation to be applied to pixels in src.
  3013. constant        Specifies the fill value used for output pixels that do not map back to a
  3014. src pixel.
  3015. band_mask       Specifies which bands are to be operated on.
  3016. sample_tech     Specifies the technique to be used for retrospectively resampling src.
  3017. sample_param    Specifies the list of additional parameters required by sample_tech.
  3018. Description
  3019. A Geometry element is used to perform geometric transformations on image data. Linear geometric
  3020. resampling operations are implemented, such as: crop, mirror, scale, shear, rotate, translate, and
  3021. combinations thereof.
  3022.  
  3023. A Geometry element can be visualized as stepping through each possible output pixel location in turn
  3024. and computing the location from which to obtain each input pixel value. Each pixel (x',y') in the
  3025. output image is mapped to the coordinate location (x,y) in src by:
  3026.  
  3027.  
  3028.  
  3029. The coordinate mapping coefficients (a,b,c,d,tx,ty), together with the output width and
  3030. height, fully specify the geometric transformation. The following briefly (and approximately)
  3031. summarizes the intuitive role of each parameter:
  3032.  
  3033. a, d    Scaling parameters. Increasing a and d will make the output image appear smaller,
  3034. whereas decreasing them will make the output pixels appear larger.
  3035. b, c    Rotation/skew parameters. If b and c are zero, the output image will be a rectangular
  3036. scaling of the input image. If a and d are both zero, b is one, and c is negative one, the
  3037. image will appear rotated. The magnitude of b and c will affect scaling as well if a and d
  3038. are zero. If more than two of (a,b,c,d) are nonzero, the effect is complicated. The image
  3039. may appear skewed and scaled.
  3040. tx, ty  Translation parameters. Used to specify the offset between input and output coordinate
  3041. systems.
  3042. width, height   These specify the output image dimensions of the selected band(s). Note that
  3043. increasing the output image height and width over the input image size will not by itself
  3044. cause magnification * if a and d are one (1) and b and c are zero (0), the output image
  3045. will have the same appearance as the input, except that the borders will shrink or
  3046. expand (as determined by width and height) and new areas of the image will be filled
  3047. with constant.
  3048.  
  3049. The region to be cropped in the input image is implicitly defined by the dimensions of the output
  3050. image and the mapping from output to input coordinates. Depending on the size of the input and
  3051. output images, the amount of scaling specified, and the amount of translation in the mapping, pixels
  3052. in the output image may map off the edge of the input image and the constant value is used.
  3053.  
  3054. Trichromatic image bands can be operated individually, all together, or in any combination, using
  3055. band_mask. Since applying the same (a,b,c,d,tx,ty) mapping to inputs with diverse sizes will specify
  3056. different transformations, operating on all bands in unison (band_mask of 1112) is most appropriate
  3057. if the dimensions of all bands are equal.
  3058.  
  3059. Often a given output pixel location (x,y) will not correspond exactly to a single pixel in the input
  3060. image. The sample_tech technique is used to determine how the input data will be interpolated to
  3061. produce each output pixel value. One of the following standard geometry technique values can be
  3062. assigned to sample_tech:
  3063.  
  3064. xieValGeomDefault
  3065. xieValGeomAntialias
  3066. xieValGeomAntialiasByArea
  3067. xieValGeomAntialiasByLPF
  3068. xieValGeomBilinearInterp
  3069. xieValGeomGaussian
  3070. xieValGeomNearestNeighbor
  3071.  
  3072. If a vendor defined additional private geometry techniques, the private technique values given to these
  3073. techniques can be assigned to sample_tech.
  3074.  
  3075. The server is required to support the default technique that is bound to one of the standard techniques
  3076. defined  or a private technique.
  3077. Output Attributes
  3078. Class   same as src
  3079. Type    same as src
  3080. Width   width
  3081. Height  height
  3082. Levels  same as src
  3083. Structures
  3084. XieFloGeometry sets the XiePhotoElement structure field elemType to
  3085. xieElemGeometry, which identifies the element as a Geometry, and sets the fields of the member
  3086. structure Geometry using the arguments in the argument list.
  3087.  
  3088. typedef unsigned XiePhototag;
  3089. typedef float XieConstant[3];
  3090. typedef unsigned XieGeometryTechnique;
  3091.  
  3092. typedef struct {
  3093.         int elemType;
  3094.         union {
  3095.                 ...
  3096.                 struct {
  3097.                         XiePhototag src;
  3098.                         unsigned int width;
  3099.                         unsigned int height;
  3100.                         float coefficients[6];
  3101.                         XieConstant constant;
  3102.                         unsigned int band_mask;
  3103.                         XieGeometryTechnique sample_tech;
  3104.                         XiePointer sample_param;
  3105.                 } Geometry;
  3106.                 ...
  3107.         } data;
  3108. } XiePhotoElement;
  3109.  
  3110. /* Definitions for GeometryTechniques */
  3111. #define xieValGeomDefault       0
  3112. #define xieValGeomAntialias     2
  3113. #define xieValGeomAntialiasByArea       4
  3114. #define xieValGeomAntialiasByLPF        6
  3115. #define xieValGeomBilinearInterp        8
  3116. #define xieValGeomGaussian      10
  3117. #define xieValGeomNearestNeighbor       12
  3118. Errors
  3119. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3120. xieErrNoFloSource       Invalid src
  3121. xieErrNoFloTechnique    Invalid sample_tech or sample_param
  3122. xieErrNoFloValue        Invalid coefficients
  3123. See Also
  3124. XieTecGeomAntialiasByArea, XieTecGeomAntialiasByLowpass, XieTecGeomGaussian,
  3125. XieTecGeomNearestNeighbor
  3126.  XIElib - Photoflo Element Functions    XieFloLogical
  3127. Name
  3128. XieFloLogical - specify a Logical element and set its parameters
  3129. Syntax
  3130. void XieFloLogical (element, src1, src2, domain, constant, operator,
  3131. band_mask)
  3132. XiePhotoElement *element;
  3133. XiePhototag src1;
  3134. XiePhototag src2;
  3135. XieProcessDomain *domain;
  3136. XieConstant constant;
  3137. unsigned long operator;
  3138. unsigned int band_mask;
  3139. Arguments
  3140. element Specifies the XiePhotoElement structure to use.
  3141. src1    Specifies the first data source.
  3142. src2    Specifies the second data source.
  3143. domain  Specifies the subset of source data that will be operated on.
  3144. constant        Specifies the constant data source.
  3145. operator        Specifies the logical operator to be used.
  3146. band_mask       Specifies which bands are to be operated on.
  3147. Description
  3148. A Logical element performs per-pixel bitwise operations on a single data source, or between two data
  3149. sources, or between a single data source and a constant.
  3150.  
  3151. When two sources are involved, src1 and src2 are the phototags of the elements supplying source
  3152. data; constant is ignored. A phototag is the position or index of an element within an array of
  3153. elements used to specify a photoflo; the first element in the array has a phototag value of one (1). If
  3154. the operation is to involve a constant, src1 is one operand, src2 must be zero, and constant is
  3155. used as the other operand.
  3156.  
  3157. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  3158. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  3159. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  3160. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  3161. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  3162. offset_y fields are ignored.
  3163.  
  3164. The value of operator matches the GC-function values defined by the core protocol specification
  3165. for CreateGC. The output of a Logical element is determined by the number of data sources and
  3166. operator:
  3167.  
  3168. GC function
  3169. monadic operation
  3170. dyadic operation
  3171. Clear
  3172. 0
  3173. 0
  3174. And
  3175. constant AND src1
  3176. src2 AND src1
  3177. AndReverse
  3178. constant AND (NOT src1)
  3179. src2 AND (NOT src1)
  3180. Copy
  3181. constant
  3182. src2
  3183. AndInverted
  3184. (NOT constant) AND src1
  3185. (NOT src2) AND src1
  3186. NoOp
  3187. src1
  3188. src1
  3189. Xor
  3190. constant XOR src1
  3191. src2 XOR src1
  3192. Or
  3193. constant OR src1
  3194. src2 OR src1
  3195. Nor
  3196. (NOT constant) AND (NOT src1)
  3197. (NOT src2) AND (NOT src1)
  3198. Equiv
  3199. (NOT constant) XOR src1
  3200. (NOT src2) XOR src1
  3201. Invert
  3202. NOT src1
  3203. NOT src1
  3204. OrReverse
  3205. constant OR (NOT src1)
  3206. src2 OR (NOT src1)
  3207. CopyInverted
  3208. NOT constant
  3209. NOT src2
  3210. OrInverted
  3211. (NOT constant) OR src1
  3212. (NOT src2) OR src1
  3213. Nand
  3214. (NOT constant) OR (NOT src1)
  3215. (NOT src2) OR (NOT src1)
  3216. Set
  3217. 1
  3218. 1
  3219.  
  3220. Only bands selected by the band_mask are subject to processing. Other bands present in the image
  3221. are passed through to the output. For example, a band_mask of 0012 indicates that only the least
  3222. significant band would be processed; operating on all bands requires a band_mask of 1112.
  3223. Output Attributes
  3224. Class   same as src1
  3225. Type    constrained
  3226. Width   same as src1
  3227. Height  same as src1
  3228. Levels  same as src1
  3229. Structures
  3230. XieFloLogical sets the XiePhotoElement structure field elemType to
  3231. xieElemLogical, which identifies the element as a Logical, and sets the fields of the member
  3232. structure Logical using the arguments in the argument list.
  3233.  
  3234. typedef unsigned XiePhototag;
  3235. typedef float XieConstant[3];
  3236. typedef struct {
  3237.          int offset_x;
  3238.          int offset_y;
  3239.          XiePhototag phototag;
  3240. } XieProcessDomain;
  3241.  
  3242. typedef struct {
  3243.         int elemType;
  3244.         union {
  3245.                 ...
  3246.                 struct {
  3247.                         XiePhototag src1;
  3248.                         XiePhototag src2;
  3249.                         XieProcessDomain domain;
  3250.                         XieConstant constant;
  3251.                         int operator;
  3252.                         unsigned int band_mask;
  3253.                 } Logical;
  3254.                 ...
  3255.         } data;
  3256. } XiePhotoElement;
  3257. Errors
  3258. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3259. xieErrNoFloDomain       Invalid domain
  3260. xieErrNoFloMatch        Class or levels differ between src1 and src2, or
  3261. levels is not a power of 2, or
  3262. src1 or src2 in not constrained
  3263. xieErrNoFloOperator     Invalid operator
  3264. xieErrNoFloSource       Invalid src1 or src2
  3265.  XIElib - Photoflo Element Functions    XieFloMatchHistogram
  3266. Name
  3267. XieFloMatchHistogram - specify a MatchHistogram element and set its parameters
  3268. Syntax
  3269. void XieFloMatchHistogram (element, src, domain, shape, shape_param)
  3270. XiePhotoElement *element;
  3271. XiePhototag src;
  3272. XieProcessDomain *domain;
  3273. XieHistogramShape shape;
  3274. XiePointer shape_param;
  3275. Arguments
  3276. element Specifies the XiePhotoElement structure to use.
  3277. src     Specifies the element supplying source data.
  3278. domain  Specifies the subset of source data that will be operated on.
  3279. shape   Specifies the form of the desired output data histogram.
  3280. shape_param     Specifies the list of additional parameters required by shape.
  3281. Description
  3282. A MatchHistogram element produces output data that differ from the source data in terms of its pixel
  3283. value distribution, or histogram. It allows the client to specify the desired shape of the resulting data's
  3284. histogram (algorithmic description of resulting histogram shape).
  3285.  
  3286. The source data must be constrained and single band, and it must have three or more levels.
  3287.  
  3288. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  3289. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  3290. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  3291. structure. Only data that intersects with the subset specified by domain is included in the histogram,
  3292. and only that data will be affected in the result of the histogram matching operation: all other data
  3293. will pass through unchanged. If the entire source data is to be operated on, a pointer to an
  3294. XieProcessDomain structure must still be provided, with the phototag field set to zero (0); the
  3295. offset_x and offset_y fields are ignored.
  3296.  
  3297. HistogramShape defines the various match-histogram shape techniques that can be requested by a
  3298. MatchHistogram element. One of the following standard  match-histogram shape technique values
  3299. can be assigned to shape:
  3300.  
  3301. xieValHistogramFlat
  3302. xieValHistogramGaussian
  3303. xieValHistogramHyperbolic
  3304.  
  3305. If a vendor defined additional private match-histogram shape techniques, the private technique values
  3306. given to these techniques can be assigned to shape.
  3307. Output Attributes
  3308. Class   single band
  3309. Type    constrained
  3310. Width   same as src
  3311. Height  same as src
  3312. Levels  same as src
  3313. Structures
  3314. XieFloMatchHistogram sets the XiePhotoElement structure field elemType to
  3315. xieElemMatchHistogram, which identifies the element as a MatchHistogram, and sets the fields
  3316. of the member structure MatchHistogram using the arguments in the argument list.
  3317.  
  3318. typedef unsigned XiePhototag;
  3319. typedef unsigned XieHistogramShape;
  3320. typedef struct {
  3321.          int offset_x;
  3322.          int offset_y;
  3323.          XiePhototag phototag;
  3324. } XieProcessDomain;
  3325.  
  3326. typedef struct {
  3327.         int elemType;
  3328.         union {
  3329.                 ...
  3330.                 struct {
  3331.                         XiePhototag src;
  3332.                         XieProcessDomain domain;
  3333.                         XieHistogramShape shape;
  3334.                         XiePointer shape_param;
  3335.                 } MatchHistogram;
  3336.                 ...
  3337.         } data;
  3338. } XiePhotoElement;
  3339.  
  3340. /* Definitions for GeometryTechniques */
  3341. #define xieValGeomDefault       0
  3342. #define xieValGeomAntialias     2
  3343. #define xieValGeomAntialiasByArea       4
  3344. #define xieValGeomAntialiasByLPF        6
  3345. #define xieValGeomBilinearInterp        8
  3346. #define xieValGeomGaussian      10
  3347. #define xieValGeomNearestNeighbor       12
  3348. Errors
  3349. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3350. xieErrNoFloDomain       Invalid domain
  3351. xieErrNoFloMatch        Invalid src data: unconstrained, triple band, or bitonal
  3352. xieErrNoFloSource       Invalid src
  3353. xieErrNoFloTechnique    Invalid shape or shape_param
  3354. See Also
  3355. XieTecHistogramGaussian, XieTecHistogramHyperbolic
  3356.  XIElib - Photoflo Element Functions    XieFloMath
  3357. Name
  3358. XieFloMath - specify a Math element and set its parameters
  3359. Syntax
  3360. void XieFloMath (element, src, domain, operator, band_mask)
  3361. XiePhotoElement *element;
  3362. XiePhototag src;
  3363. XieProcessDomain *domain;
  3364. XieMathOp operator;
  3365. unsigned int band_mask;
  3366. Arguments
  3367. element Specifies the XiePhotoElement structure to use.
  3368. src     Specifies the element supplying source data.
  3369. domain  Specifies the subset of source data that will be operated on.
  3370. operator        Specifies the mathematical operation to be applied.
  3371. band_mask       Specifies which bands are to be operated on.
  3372. Description
  3373. A Math element applies a single operand mathematical operation to the source data on a point-wise
  3374. basis.
  3375.  
  3376. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  3377. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  3378. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  3379. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  3380. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  3381. offset_y fields are ignored.
  3382.  
  3383. Pixel computations that would lead to errors will yield valid server-dependent values (for example,
  3384. the log of a constrained pixel value of zero might result in a value of zero). Only bands selected by the
  3385. band_mask are subject to processing. Other bands present in the image are passed through to the
  3386. output. For example, a band_mask of 0012 indicates that only the least significant band would be
  3387. processed; operating on all bands requires a band_mask of 1112. Using band_mask to select
  3388. source data that have two (2) or less levels is not permitted.
  3389.  
  3390. The following valid mathematical operations that can be invoked through the Math element:
  3391.  
  3392. Operator
  3393. Meaning
  3394. xieValExp
  3395. exponential
  3396. xieValLn
  3397. natural logarithm
  3398. xieValLog2
  3399. logarithm base 2
  3400. xieValLog10
  3401. logarithm base 10
  3402. xieValSquare
  3403. square
  3404. xieValSqrt
  3405. square root
  3406.  
  3407. All output data attributes are inherited from the source data.
  3408. Output Attributes
  3409. Class   same as src
  3410. Type    same as src
  3411. Width   same as src
  3412. Height  same as src
  3413. Levels  same as src
  3414. Structures
  3415. XieFloMath sets the XiePhotoElement structure field elemType to xieElemMath, which
  3416. identifies the element as a Math, and sets the fields of the member structure Math using the
  3417. arguments in the argument list.
  3418.  
  3419. typedef unsigned XiePhototag;
  3420. typedef unsigned XieMathOp;
  3421. typedef struct {
  3422.          int offset_x;
  3423.          int offset_y;
  3424.          XiePhototag phototag;
  3425. } XieProcessDomain;
  3426.  
  3427. typedef struct {
  3428.         int elemType;
  3429.         union {
  3430.                 ...
  3431.                 struct {
  3432.                         XiePhototag src;
  3433.                         XieProcessDomain domain;
  3434.                         XieMathOp operator;
  3435.                         unsigned int band_mask;
  3436.                 } Math;
  3437.                 ...
  3438.         } data;
  3439. } XiePhotoElement;
  3440.  
  3441. /* Definitions of Math Operators */
  3442. #define xieValExp       1
  3443. #define xieValLn        2
  3444. #define xieValLog2      3
  3445. #define xieValLog10     4
  3446. #define xieValSquare    5
  3447. #define xieValSqrt      6
  3448. Errors
  3449. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3450. xieErrNoFloDomain       Invalid domain
  3451. xieErrNoFloMatch        Selected source data are bitonal
  3452. xieErrNoFloSource       Invalid src
  3453. xieErrNoFloOperator     Invalid operator
  3454.  XIElib - Photoflo Element Functions    XieFloPasteUp
  3455. Name
  3456. XieFloPasteUp - specify a PasteUp element and set its parameters
  3457. Syntax
  3458. void XieFloPasteUp (element, width, height, constant, tiles,
  3459. tile_count)
  3460. XiePhotoElement *element;
  3461. unsigned int width;
  3462. unsigned int height;
  3463. XieConstant constant;
  3464. XieTile *tiles
  3465. unsigned int tile_count;
  3466. Arguments
  3467. element Specifies the XiePhotoElement structure to use.
  3468. width   Specifies the full horizontal extent of the output data.
  3469. height  Specifies the full vertical extent of the output data.
  3470. constant        Specifies the fill value for output regions that do not intersect the
  3471. regions defined in tiles.
  3472. tiles   Specifies a list of tile descriptors.
  3473. tile_count      Specifies the number of tile descriptors in tiles.
  3474. Description
  3475. A PasteUp element is an N-input translate operation that outputs data constructed from various source
  3476. data tiles or a constant value.
  3477.  
  3478. Each of the tiles specifies a src (the phototag of the element supplying source data), and the
  3479. coordinates, dst_x and dst_y, where the tile belongs in the output data. A phototag is the position
  3480. or index of an element within an array of elements used to specify a photoflo; the first element in the
  3481. array has a phototag value of one (1).
  3482.  
  3483. Each region of the output data is defined by a tile's destination coordinates, dst_x and dst_y, and
  3484. its src dimensions. For output regions where no tile provides input, the value of constant is used.
  3485. If tiles overlap, a stacking-order rule defines which pixel value will be output: the last tile involved in
  3486. the overlap in the list of tiles will provide the output pixel.
  3487.  
  3488. At least one tile must be supplied.  Except for width and height, all attributes of each source tile
  3489. must match. In addition, for triple band input, inter-band dimensions within each tiles must
  3490. match.
  3491. Output Attributes
  3492. Class   same as tiles
  3493. Type    same as tiles
  3494. Width   width
  3495. Height  height
  3496. Levels  same as tiles
  3497. Structures
  3498. XieFloPasteUp sets the XiePhotoElement structure field elemType to
  3499. xieElemPasteUp, which identifies the element as a PasteUp, and sets the fields of the member
  3500. structure PasteUp using the arguments in the argument list.
  3501.  
  3502. typedef unsigned XiePhototag;
  3503. typedef float XieConstant[3];
  3504. typedef struct {
  3505.         XiePhototag src;
  3506.         int dst_x;
  3507.         int dst_y;
  3508. } XieTile;
  3509.  
  3510. typedef struct {
  3511.         int elemType;
  3512.         union {
  3513.                 ...
  3514.                 struct {
  3515.                         unsigned int width;
  3516.                         unsigned int height;
  3517.                         XieConstant constant;
  3518.                         XieTile *tiles;
  3519.                         unsigned int tile_count;
  3520.                 } PasteUp;
  3521.                 ...
  3522.         } data;
  3523. } XiePhotoElement;
  3524. Errors
  3525. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3526. xieErrNoFloMatch        Incompatible attributes between tiles or
  3527. unequal inter-band dimensions within a tile
  3528. xieErrNoFloSource       Invalid source tiles or
  3529. no tiles were specified
  3530. See Also
  3531. XieFreePasteUpTiles
  3532.  XIElib - Photoflo Element Functions    XieFloPoint
  3533. Name
  3534. XieFloPoint - specify a Point element and set its parameters
  3535. Syntax
  3536. void XieFloPoint (element, src, domain, lut, band_mask)
  3537. XiePhotoElement *element;
  3538. XiePhototag src;
  3539. XieProcessDomain *domain;
  3540. XieLut lut;
  3541. unsigned int band_mask;
  3542. Arguments
  3543. element Specifies the XiePhotoElement structure to use.
  3544. src     Specifies the element supplying source data.
  3545. domain  Specifies the subset of source data that will be operated on.
  3546. lut     Specifies the LUT resource supplying the lookup table.
  3547. band_mask       Specifies which bands are to be operated on.
  3548. Description
  3549. A Point element maps source pixel values to output pixel values using a lookup table (LUT).
  3550.  
  3551. src is the phototag of the element supplying constrained source data. A phototag is the position or
  3552. index of an element within an array of elements used to specify a photoflo; the first element in the
  3553. array has a phototag value of one (1). Lut is the phototag of the ImportClientLUT or ImportLUT
  3554. element supplying the lookup table data.
  3555.  
  3556. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  3557. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  3558. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  3559. structure. If the entire source data is to be operated on, a pointer to an XieProcessDomain
  3560. structure must still be provided, with the phototag field set to zero (0); the offset_x and
  3561. offset_y fields are ignored.
  3562.  
  3563. band_mask specifies which bands are to be operated on (all bands must be specified if lut is single
  3564. band and src is triple band). For example, a band_mask of 0012 indicates that only the least
  3565. significant band would be processed; operating on all bands requires a band_mask of 1112.
  3566.  
  3567. The output is constrained, with the width and height taken from src and class and levels taken from
  3568. lut. When src is single band and lut is triple band, for the bands that are indicated by
  3569. band_mask, the output bands are remapped through their respective lut bands, whereas the other
  3570. bands are just replications of the single src band. If domain is used, the class and levels of lut
  3571. must match those of src.
  3572.  
  3573. Each lut array must contain sufficient entries so that all potential pixel values found in src can
  3574. form a valid index into the array. Generally each src pixel value is used directly as an index into a
  3575. lut array. When triple band src data are remapped through a single band lut, however, pixel
  3576. values from all three src bands are combined to form an array index; for this case, width and height
  3577. must match for all bands.
  3578.  
  3579. When a single band lut is used to remap triple band src data, the following presents the algorithm
  3580. for computing combined array indices:
  3581.  
  3582. LUT band order
  3583. LUT indexing algorithm for combining pixel values
  3584. LSFirst
  3585. index = value[0] + value[1] x levels[0] + value[2] x levels[0] x levels[1]
  3586. MSFirst
  3587. index = value[2] + value[1] x levels[2] + value[0] x levels[2] x levels[1]
  3588. Output Attributes
  3589. Class   same as lut
  3590. Type    constrained
  3591. Width   same as src
  3592. Height  same as src
  3593. Levels  same as lut
  3594. Structures
  3595. XieFloPoint sets the XiePhotoElement structure field elemType to xieElemPoint,
  3596. which identifies the element as a Point, and sets the fields of the member structure Point using the
  3597. arguments in the argument list.
  3598.  
  3599. typedef XID XieLut;
  3600. typedef unsigned XiePhototag;
  3601. typedef struct {
  3602.          int offset_x;
  3603.          int offset_y;
  3604.          XiePhototag phototag;
  3605. } XieProcessDomain;
  3606.  
  3607. typedef struct {
  3608.         int elemType;
  3609.         union {
  3610.                 ...
  3611.                 struct {
  3612.                         XiePhototag src;
  3613.                         XieProcessDomain domain;
  3614.                         XieLut lut;
  3615.                         unsigned int band_mask;
  3616.                 } Point;
  3617.                 ...
  3618.         } data;
  3619. } XiePhotoElement;
  3620. Errors
  3621. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3622. xieErrNoFloDomain       Invalid domain
  3623. xieErrNoFloMatch        Unconstrained src data, or
  3624. lut does not contain enough entries, or
  3625. lut is single band and src is triple band, but band_mask is
  3626. incomplete, or
  3627. domain is being used, but lut class or levels do not match those of
  3628. src
  3629. xieErrNoFloSource       Invalid src or lut
  3630. See Also
  3631. XieFloImportLUT, XieFloImportClientLUT
  3632.  XIElib - Photoflo Element Functions    XieFloUnconstrain
  3633. Name
  3634. XieFloUnconstrain - specify an unconstrain element and set its parameters
  3635. Syntax
  3636. void XieFloUnconstrain (element, src)
  3637. XiePhotoElement *element;
  3638. XiePhototag src;
  3639. Arguments
  3640. element Specifies the XiePhotoElement structure to use.
  3641. src     Specifies the element supplying constrained source data.
  3642. Description
  3643. An Unconstrain element produces unconstrained output data from constrained input data.
  3644. Output Attributes
  3645. Class   same as src
  3646. Type    unconstrained
  3647. Width   same as src
  3648. Height  same as src
  3649. Levels  unknown
  3650. Structures
  3651. XieFloUnconstrain sets the XiePhotoElement structure field elemType to
  3652. xieElemUnconstrain, which identifies the element as an Unconstrain, and sets the fields of the
  3653. member structure Unconstrain using the arguments in the argument list.
  3654.  
  3655. typedef unsigned XiePhototag;
  3656.  
  3657. typedef struct {
  3658.         int elemType;
  3659.         union {
  3660.                 ...
  3661.                 struct {
  3662.                         XiePhototag src;
  3663.                 } Unconstrain;
  3664.                 ...
  3665.         } data;
  3666. } XiePhotoElement;
  3667. Errors
  3668. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3669. xieErrNoFloMatch        Unconstrained src data
  3670. xieErrNoFloSource       Invalid src
  3671. See Also
  3672. XieFloConstrain
  3673.  XIElib - Photoflo Element Functions    XieFloExportClientHistogram
  3674. Name
  3675. XieFloExportClientHistogram - specify an ExportClientHistogram element and set its parameters
  3676. Syntax
  3677. void XieFloExportClientHistogram (element, src, domain, notify)
  3678. XiePhotoElement *element;
  3679. XiePhototag src;
  3680. XieProcessDomain *domain;
  3681. XieExportNotify notify;
  3682. Arguments
  3683. element Specifies the XiePhotoElement structure to use.
  3684. src     Specifies the element supplying single band constrained source data.
  3685. domain  Specifies the subset of the source data from which the distribution will
  3686. be generated.
  3687. notify  Specifies whether to enable sending an ExportAvailable event.
  3688. Description
  3689. An ExportClientHistogram element generates a histogram of the pixel values found in the source
  3690. data. It prepares histogram data that can be retrieved by the client using XieGetClientData. An
  3691. event can be requested that will notify the client when histogram data becomes available.
  3692.  
  3693. The data generated for the client is a list of XieHistogramData where each entry consists of a
  3694. value (that is, a pixel value) followed by the count of pixels found with that value. If the number of
  3695. pixels for a given value exceeds the capacity of count, that count will be returned at the maximum
  3696. value (that is, 232 - 1). Pixel values that are not found in the data are not included in the histogram
  3697. data: no entries are returned where count is zero.
  3698.  
  3699. In order to specify a subset of source data that will be operated on, the phototag, offset_x, and
  3700. offset_y fields of the XieProcessDomain structure pointed to by domain must be supplied;
  3701. XIElib does not provide a convenience function to create and/or fill in an XieProcessDomain
  3702. structure. Only data that intersects with the subset specified by domain is included in the histogram.
  3703. If the entire source data is to be operated on, a pointer to an XieProcessDomain structure must
  3704. still be provided, with the phototag field set to zero (0); the offset_x and offset_y fields are
  3705. ignored.
  3706.  
  3707. One of three standard export notify values can be assigned to notify:
  3708.  
  3709. xieValDisable
  3710. xieValFirstData
  3711. xieValNewData
  3712.  
  3713. If notify was specified as xieValFirstData, this event will be sent only the first time data
  3714. become available; otherwise, if xieValNewData was specified, this event will be generated each
  3715. time the amount of data available changes from zero to nonzero.
  3716. Structures
  3717. XieFloExportClientHistogram sets the XiePhotoElement structure field elemType to
  3718. xieElemExportClientHistogram, which identifies the element as an ExportClientHistogram,
  3719. and sets the fields of the member structure ExportClientHistogram using the arguments in the
  3720. argument list.
  3721.  
  3722. typedef unsigned XieExportNotify;
  3723. typedef unsigned XiePhototag;
  3724. typedef struct {
  3725.          int offset_x;
  3726.          int offset_y;
  3727.          XiePhototag phototag;
  3728. } XieProcessDomain;
  3729. typedef struct {
  3730.         unsigned long value;
  3731.         unsigned long count;
  3732. } XieHistogramData;
  3733.  
  3734. typedef struct {
  3735.         int elemType;
  3736.         union {
  3737.                 ...
  3738.                 struct {
  3739.                         XiePhototag src;
  3740.                         XieProcessDomain domain;
  3741.                         XieExportNotify notify;
  3742.                 } ExportClientHistogram;
  3743.                 ...
  3744.         } data;
  3745. } XiePhotoElement;
  3746.  
  3747. /* Definitions of ExportNotify */
  3748. #define xieValDisable   1
  3749. #define xieValFirstData 2
  3750. #define xieValNewData   3
  3751. Errors
  3752. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3753. xieErrNoFloDomain       Invalid domain
  3754. xieErrNoFloMatch        Unconstrained src data or
  3755. triple band src data
  3756. xieErrNoFloSource       Invalid src
  3757. xieErrNoFloValue        Invalid notify
  3758. See Also
  3759. XieGetClientData
  3760.  XIElib - Photoflo Element Functions    XieFloExportClientLUT
  3761. Name
  3762. XieFloExportClientLUT - specify an ExportClientLUT element and set its parameters
  3763. Syntax
  3764. void XieFloExportClientLUT (element, src, band_order, notify, start,
  3765. length)
  3766. XiePhotoElement *element;
  3767. XiePhototag src;
  3768. XieOrientation band_order;
  3769. XieExportNotify notify;
  3770. XieLTriplet start;
  3771. XieLTriplet length;
  3772. Arguments
  3773. element Specifies the XiePhotoElement structure to use.
  3774. src     Specifies the element supplying lookup table data.
  3775. band_order      Specifies the order of triple band arrays.
  3776. notify  Specifies whether to enable sending an ExportAvailable event.
  3777. start   Specifies the index of the first array entry that should be returned.
  3778. length  Specifies the number of array entries that should be returned.
  3779. Description
  3780. An ExportClientLUT element allows data imported from an ImportLUT or an ImportClientLUT
  3781. element to be retrieved by the client. The actual transport of lookup table data through the protocol
  3782. stream is requested using XieGetClientData.
  3783.  
  3784. One of three standard export notify values can be assigned to notify:
  3785.  
  3786. xieValDisable
  3787. xieValFirstData
  3788. xieValNewData
  3789.  
  3790. If notify was specified as xieValFirstData, this event will be sent only the first time data
  3791. become available; otherwise, if xieValNewData was specified, this event will be generated each
  3792. time the amount of data available changes from zero to nonzero.
  3793.  
  3794. band_order is the order in which triple band arrays are transmitted through the protocol stream.
  3795. One of the following standard orientation values can be assigned to band_order:
  3796.  
  3797. xieValLSFirst
  3798. xieValMSFirst
  3799.  
  3800. The least significant band of trichromatic data is the first band mentioned in the common name of the
  3801. colorspace: for example, red is the least significant band of RGB data. For band-by-plane data,
  3802. band_order specifies whether this band corresponds with the least significant or most significant
  3803. LUT array. Each array is transported as a separate data stream:
  3804.  
  3805. band
  3806. LSFirst
  3807. MSFirst
  3808. 0
  3809. R7R6R5R4R3R2R1R0
  3810. B7B6B5B4B3B2B1B0
  3811. 1
  3812. G7G6G5G4G3G2G1G0
  3813. G7G6G5G4G3G2G1G0
  3814. 2
  3815. B7B6B5B4B3B2B1B0
  3816. R7R6R5R4R3R2R1R0
  3817.  
  3818. The size of each array entry is either 1, 2, or 4 bytes: the smallest size into which the output
  3819. quantization levels can be stored. When array entries require multiple bytes, the byte order per entry
  3820. is determined in the same manner as other numeric data: it is the byte orientation established at core
  3821. X connection setup time.
  3822. Structures
  3823. XieFloExportClientLUT sets the XiePhotoElement structure field elemType to
  3824. xieElemExportClientLUT, which identifies the element as an ExportClientLUT, and sets the
  3825. fields of the member structure ExportClientLUT using the arguments in the argument list.
  3826.  
  3827. typedef unsigned XieExportNotify;
  3828. typedef unsigned XieOrientation;
  3829. typedef unsigned long XieLTriplet[3];
  3830. typedef unsigned XiePhototag;
  3831.  
  3832. typedef struct {
  3833.         int elemType;
  3834.         union {
  3835.                 ...
  3836.                 struct {
  3837.                         XiePhototag src;
  3838.                         XieOrientation band_order;
  3839.                         XieExportNotify notify;
  3840.                         XieLTriplet start;
  3841.                         XieLTriplet length;
  3842.                 } ExportClientLUT;
  3843.                 ...
  3844.         } data;
  3845. } XiePhotoElement;
  3846.  
  3847. /* Definitions of ExportNotify */
  3848. #define xieValDisable   1
  3849. #define xieValFirstData 2
  3850. #define xieValNewData   3
  3851.  
  3852. /* Definitions of Orientation Types */
  3853. #define xieValLSFirst   1
  3854. #define xieValMSFirst   2
  3855. Errors
  3856. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3857. xieErrNoFloMatch        start + length exceeds number of entries in an array
  3858. xieErrNoFloSource       Invalid src
  3859. xieErrNoFloValue        Invalid notify or band_order
  3860. See Also
  3861.  XieFloImportLUT, XieFloImportClientLUT, XieGetClientData
  3862.  XIElib - Photoflo Element Functions    XieFloExportClientPhoto
  3863. Name
  3864. XieFloExportClientPhoto - specify an ExportClientPhoto element and set its parameters
  3865. Syntax
  3866. void XieFloExportClientPhoto (element, src, notify, encode_tech,
  3867. encode_param)
  3868. XiePhotoElement *element;
  3869. XiePhototag src;
  3870. XieExportNotify notify;
  3871. XieEncodeTechnique encode_tech;
  3872. XiePointer encode_param;
  3873. Arguments
  3874. element Specifies the XiePhotoElement structure to use.
  3875. src     Specifies the element supplying constrained data.
  3876. notify  Specifies whether to enable sending an ExportAvailable event.
  3877. encode_tech     Specifies the technique to compress or format the exported data.
  3878. encode_param    Specifies the list of additional parameters required by encode_tech.
  3879. Description
  3880. An ExportClientPhoto element makes image data available to the protocol stream. The attributes of
  3881. the exported data are determined by the attributes of the source data. The format of the data is
  3882. specified by the encode_tech technique and encode_param. The actual transport of image data
  3883. through the protocol stream is requested using XieGetClientData.
  3884.  
  3885. One of three standard export notify values can be assigned to notify:
  3886.  
  3887. xieValDisable
  3888. xieValFirstData
  3889. xieValNewData
  3890.  
  3891. If notify was specified as xieValFirstData, this event will be sent only the first time data
  3892. become available; otherwise, if xieValNewData was specified, this event will be generated each
  3893. time the amount of data available changes from zero to nonzero.
  3894.  
  3895. Encode techniques define the techniques that can be used to compress an image or format it as
  3896. uncompressed data. One of the following standard encode technique values can be assigned to
  3897. encode_tech:
  3898.  
  3899. xieValEncodeServerChoice
  3900. xieValEncodeUncompressedSingle
  3901. xieValEncodeUncompressedTriple
  3902. xieValEncodeG31D
  3903. xieValEncodeG32D
  3904. xieValEncodeG42D
  3905. xieValEncodeJPEGBaseline
  3906. xieValEncodeJPEGLossless
  3907. xieValEncodeTIFF2
  3908. xieValEncodeTIFFPackBits
  3909.  
  3910. If a vendor defined additional private encode techniques, the private technique values given to these
  3911. techniques can be assigned to encode_tech.
  3912. Structures
  3913. XieFloExportClientPhoto sets the XiePhotoElement structure field elemType to
  3914. xieElemExportClientPhoto, which identifies the element as an ExportClientPhoto, and sets
  3915. the fields of the member structure ExportClientPhoto using the arguments in the argument list.
  3916.  
  3917. typedef unsigned XieExportNotify;
  3918. typedef unsigned XiePhototag;
  3919. typedef unsigned XieEncodeTechnique;
  3920.  
  3921. typedef struct {
  3922.         int elemType;
  3923.         union {
  3924.                 ...
  3925.                 struct {
  3926.                         XiePhototag src;
  3927.                         XieExportNotify notify;
  3928.                         XieEncodeTechnique encode_tech;
  3929.                         XiePointer encode_param;
  3930.                 } ExportClientPhoto;
  3931.                 ...
  3932.         } data;
  3933. } XiePhotoElement;
  3934.  
  3935. /* Definitions of ExportNotify */
  3936. #define xieValDisable   1
  3937. #define xieValFirstData 2
  3938. #define xieValNewData   3
  3939.  
  3940. /* Definitions for EncodeTechniques */
  3941. #define xieValEncodeServerChoice        1
  3942. #define xieValEncodeUncompressedSingle  2
  3943. #define xieValEncodeUncompressedTriple  3
  3944. #define xieValEncodeG31D        4
  3945. #define xieValEncodeG32D        6
  3946. #define xieValEncodeG42D        8
  3947. #define xieValEncodeJPEGBaseline        10
  3948. #define xieValEncodeJPEGLossless        12
  3949. #define xieValEncodeTIFF2       14
  3950. #define xieValEncodeTIFFPackBits        16
  3951. Errors
  3952. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  3953. xieErrNoFloMatch        Unconstrained src data
  3954. xieErrNoFloSource       Invalid src
  3955. xieErrNoFloTechnique    Invalid encode_tech or encode_param
  3956. xieErrNoFloValue        Invalid notify
  3957. See Also
  3958. XieGetClientData, XieFloExportClientPhoto,
  3959. XieTecEncodeUncompressedSingle, XieTecEncodeUncompressedTriple, XieTecEncodeG31D,
  3960. XieTecEncodeG32D, XieTecEncodeG42D, XieTecEncodeServerChoice,
  3961. XieTecEncodeJPEGBaseline, XieTecEncodeJPEGLossless, XieTecEncodeTIFF2,
  3962. XieTecEncodeTIFFPackBits
  3963.  XIElib - Photoflo Element Functions    XieFloExportClientROI
  3964. Name
  3965. XieFloExportClientROI - specify an ExportClientROI element and set its parameters
  3966. Syntax
  3967. void XieFloExportClientROI (element, src, notify)
  3968. XiePhotoElement *element;
  3969. XiePhototag src;
  3970. XieExportNotify notify;
  3971. Arguments
  3972. element Specifies the XiePhotoElement structure to use.
  3973. src     Specifies the element supplying the list-of-rectangles.
  3974. notify  Specifies whether to enable sending an ExportAvailable event.
  3975. Description
  3976. An ExportClientROI element allows a list-of-rectangles, imported using an ImportROI or an
  3977. ImportClientROI element, to be retrieved by the client. The actual transport of list-of-rectangles data
  3978. through the protocol stream is requested using a GetClientData element.
  3979.  
  3980. One of three standard export notify values can be assigned to notify:
  3981.  
  3982. xieValDisable
  3983. xieValFirstData
  3984. xieValNewData
  3985.  
  3986. If notify was specified as xieValFirstData, this event will be sent only the first time data
  3987. become available; otherwise, if xieValNewData was specified, this event will be generated each
  3988. time the amount of data available changes from zero to nonzero.
  3989. Structures
  3990. XieFloExportClientROI sets the XiePhotoElement structure field elemType to
  3991. xieElemExportClientROI, which identifies the element as an ExportClientROI, and sets the
  3992. fields of the member structure ExportClientROI using the arguments in the argument list.
  3993.  
  3994. typedef unsigned XieExportNotify;
  3995. typedef unsigned XiePhototag;
  3996.  
  3997. typedef struct {
  3998.         int elemType;
  3999.         union {
  4000.                 ...
  4001.                 struct {
  4002.                         XiePhototag src;
  4003.                         XieExportNotify notify;
  4004.                 } ExportClientROI;
  4005.                 ...
  4006.         } data;
  4007. } XiePhotoElement;
  4008.  
  4009. /* Definitions of ExportNotify */
  4010. #define xieValDisable   1
  4011. #define xieValFirstData 2
  4012. #define xieValNewData   3
  4013. Errors
  4014. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4015. xieErrNoFloSource       Invalid src
  4016. xieErrNoFloValue        Invalid notify
  4017. See Also
  4018. XieFloImportROI, XieFloImportClientROI, XieGetClientData
  4019.  XIElib - Photoflo Element Functions    XieFloExportDrawable
  4020. Name
  4021. XieFloExportDrawable - specify an ExportDrawable element and set its parameters
  4022. Syntax
  4023. void XieFloExportDrawable (element, src, drawable, gc, dst_x, dst_y)
  4024. XiePhotoElement *element;
  4025. XiePhototag src;
  4026. Drawable drawable;
  4027. GC gc;
  4028. int dst_x;
  4029. int dst_y;
  4030. Arguments
  4031. element Specifies the XiePhotoElement structure to use.
  4032. src     Specifies the element supplying constrained source data.
  4033. drawable        Specifies the Window or Pixmap into which the data will be written.
  4034. gc      Specifies the GContext to be used when transferring pixels to
  4035. drawable.
  4036. dst_x   Specifies where the data should be placed in drawable.
  4037. dst_y   Specifies where the data should be placed in drawable.
  4038. Description
  4039. An ExportDrawable element allows Colormap index data to be exported to a Window or Pixmap.
  4040.  
  4041. The following components are used from gc: function, plane-mask, subwindow-mode, clip-x-origin,
  4042. clip-y-origin, and clip-mask.
  4043.  
  4044. The levels of src must exactly match the depth of drawable and gc  (that is, levels must be
  4045. 2depth).
  4046. Structures
  4047. XieFloExportDrawable sets the XiePhotoElement structure field elemType to
  4048. xieElemExportDrawable, which identifies the element as an ExportDrawable, and sets the
  4049. fields of the member structure ExportDrawable using the arguments in the argument list.
  4050.  
  4051. typedef unsigned XiePhototag;
  4052.  
  4053. typedef struct {
  4054.         int elemType;
  4055.         union {
  4056.                 ...
  4057.                 struct {
  4058.                         XiePhototag src;
  4059.                         Drawable drawable;
  4060.                         GC gc;
  4061.                         int dst_x;
  4062.                         int dst_y;
  4063.                 } ExportDrawable;
  4064.                 ...
  4065.         } data;
  4066. } XiePhotoElement;
  4067. Errors
  4068. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4069. xieErrNoFloDrawable     Invalid drawable
  4070. xieErrNoFloGC   Invalid gc
  4071. xieErrNoFloMatch        Invalid src data: triple band, unconstrained, levels does not match
  4072. depth
  4073. xieErrNoFloSource       Invalid src
  4074. See Also
  4075. XieFloExportDrawablePlane
  4076.  XIElib - Photoflo Element Functions    XieFloExportDrawablePlane
  4077. Name
  4078. XieFloExportDrawablePlane - specify an ExportDrawablePlane element and set its parameters
  4079. Syntax
  4080. void XieFloExportDrawablePlane (element, src, drawable, gc, dst_x,
  4081. dst_y)
  4082. XiePhotoElement *element;
  4083. XiePhototag src;
  4084. Drawable drawable;
  4085. GC gc;
  4086. int dst_x;
  4087. int dst_y;
  4088. Arguments
  4089. element Specifies the XiePhotoElement structure to use.
  4090. src     Specifies the element supplying constrained bitonal source data.
  4091. drawable        Specifies the Window or Pixmap into which the data will be written.
  4092. gc      Specifies the GContext to be used when transferring pixels to
  4093. drawable.
  4094. dst_x   Specifies where the data should be placed in drawable.
  4095. dst_y   Specifies where the data should be placed in drawable.
  4096. Description
  4097. An ExportDrawablePlane element allows single-band single-bit (bitonal) data to be exported to a
  4098. Window or a Pixmap.
  4099.  
  4100. The following components are used from gc: function, plane-mask, foreground, background, fill-
  4101. style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. For the fill-style component of
  4102. gc, values of FillSolid and FillTiled are treated as synonyms for FillOpaqueStippled.
  4103. Structures
  4104. XieFloExportDrawablePlane sets the XiePhotoElement structure field elemType to
  4105. xieElemExportDrawablePlane, which identifies the element as an ExportDrawablePlane, and
  4106. sets the fields of the member structure ExportDrawablePlane using the arguments in the
  4107. argument list.
  4108.  
  4109. typedef unsigned XiePhototag;
  4110.  
  4111. typedef struct {
  4112.         int elemType;
  4113.         union {
  4114.                 ...
  4115.                 struct {
  4116.                         XiePhototag src;
  4117.                         Drawable drawable;
  4118.                         GC gc;
  4119.                         int dst_x;
  4120.                         int dst_y;
  4121.                 } ExportDrawablePlane;
  4122.                 ...
  4123.         } data;
  4124. } XiePhotoElement;
  4125. Errors
  4126. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4127. xieErrNoFloDrawable     Invalid drawable
  4128. xieErrNoFloGC   Invalid gc
  4129. xieErrNoFloMatch        Invalid src data: triple band, not constrained, levels > 2
  4130. xieErrNoFloSource       Invalid src
  4131. See Also
  4132. XieFloExportDrawable
  4133.  XIElib - Photoflo Element Functions    XieFloExportLUT
  4134. Name
  4135. XieFloExportLUT - specify an ExportLUT element and set its parameters
  4136. Syntax
  4137. void XieFloExportLUT (element, src, lut, merge, start)
  4138. XiePhotoElement *element;
  4139. XiePhototag src;
  4140. XieLut lut;
  4141. Bool merge;
  4142. XieLTriplet start;
  4143. Arguments
  4144. element Specifies the XiePhotoElement structure to use.
  4145. src     Specifies the element supplying lookup table data.
  4146. lut     Specifies the ID of the LUT to receive the data.
  4147. merge   Specifies how new array entries replace existing entries.
  4148. start   Specifies the index of the first array entry that should be written in
  4149. lut, per band.
  4150. Description
  4151. An ExportLUT element allows data imported from an ImportLUT or ImportClientLUT element to be
  4152. saved in an existing LUT resource.
  4153.  
  4154. merge specifies that new array entries from src should replace entries that already exist within
  4155. lut. If merge is False, start must be zero for each band. In this case, lut will inherit the
  4156. attributes of src and be populated with its data; the previous attributes and data of lut are
  4157. overwritten when the photoflo completes. If merge is True and lut has existing attributes, the
  4158. data from src will replace the data from lut, beginning at position start. If merge is True,but
  4159. lut has not yet been populated, it is an error.
  4160.  
  4161. The attributes of src must match those of lut, and the combination of start and the length of
  4162. src must specify a valid subrange existing within lut.
  4163. Structures
  4164. XieFloExportLUT sets the XiePhotoElement structure field elemType to
  4165. xieElemExportLUT, which identifies the element as an ExportLUT, and sets the fields of the
  4166. member structure ExportLUT using the arguments in the argument list.
  4167.  
  4168. typedef XID XieLut;
  4169. typedef unsigned long XieLTriplet[3];
  4170. typedef unsigned XiePhototag;
  4171.  
  4172. typedef struct {
  4173.         int elemType;
  4174.         union {
  4175.                 ...
  4176.                 struct {
  4177.                         XiePhototag src;
  4178.                         XieLut lut;
  4179.                         Bool merge;
  4180.                         XieLTriplet start;
  4181.                 } ExportLUT;
  4182.                 ...
  4183.         } data;
  4184. } XiePhotoElement;
  4185. Errors
  4186. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4187. xieErrNoFloLUT  Invalid lut
  4188. xieErrNoFloMatch        merge true and attributes do not match between src and lut, or
  4189. merge true and start + src length is not a subrange of lut
  4190. xieErrNoFloSource       Invalid src
  4191. xieErrNoFloValue        merge false and start nonzero
  4192. See Also
  4193. XieFloImportLUT, XieFloImportClientLUT
  4194.  XIElib - Photoflo Element Functions    XieFloExportPhotomap
  4195. Name
  4196. XieFloExportPhotomap - specify an ExportPhotomap element and set its parameters
  4197. Syntax
  4198. void XieFloExportPhotomap (element, src, photomap, encode_tech,
  4199. encode_param)
  4200. XiePhotoElement *element;
  4201. XiePhototag src;
  4202. XiePhotomap photomap;
  4203. XieEncodeTechnique encode_tech;
  4204. XiePointer encode_param;
  4205. Arguments
  4206. element Specifies the XiePhotoElement structure to use.
  4207. src     Specifies the element supplying source data.
  4208. photomap        Specifies the ID of the photomap resource to receive the data.
  4209. encode_tech     Specifies the image compression or formatting technique.
  4210. encode_param    Specifies the list of additional parameters required by encode_tech.
  4211. Description
  4212. An ExportPhotomap element allows data from photoflo operations to be saved in a photomap. A
  4213. photomap is a server resource that can be used to store image data.
  4214.  
  4215. photomap will inherit the attributes of src and be populated with its data. The previous attributes
  4216. and data of photomap are overwritten when the photoflo completes.
  4217.  
  4218. Encode techniques define the techniques that can be used to compress an image or format it as
  4219. uncompressed data. One of the following standard encode technique values can be assigned to
  4220. encode_tech:
  4221.  
  4222. xieValEncodeServerChoice
  4223. xieValEncodeUncompressedSingle
  4224. xieValEncodeUncompressedTriple
  4225. xieValEncodeG31D
  4226. xieValEncodeG32D
  4227. xieValEncodeG42D
  4228. xieValEncodeJPEGBaseline
  4229. xieValEncodeJPEGLossless
  4230. xieValEncodeTIFF2
  4231. xieValEncodeTIFFPackBits
  4232.  
  4233. If a vendor defined additional private encode techniques, the private technique values given to these
  4234. techniques can be assigned to encode_tech.
  4235. Structures
  4236. XieFloExportPhotomap sets the XiePhotoElement structure field elemType to
  4237. xieElemExportPhotomap, which identifies the element as an ExportPhotomap, and sets the
  4238. fields of the member structure ExportPhotomap using the arguments in the argument list.
  4239.  
  4240. typedef unsigned XiePhototag;
  4241. typedef XID XiePhotomap;
  4242. typedef unsigned XieEncodeTechnique;
  4243.  
  4244. typedef struct {
  4245.         int elemType;
  4246.         union {
  4247.                 ...
  4248.                 struct {
  4249.                         XiePhototag src;
  4250.                         XiePhotomap photomap;
  4251.                         XieEncodeTechnique encode_tech;
  4252.                         XiePointer encode_param;
  4253.                 } ExportPhotomap;
  4254.                 ...
  4255.         } data;
  4256. } XiePhotoElement;
  4257.  
  4258. /* Definitions for EncodeTechniques */
  4259. #define xieValEncodeServerChoice        1
  4260. #define xieValEncodeUncompressedSingle  2
  4261. #define xieValEncodeUncompressedTriple  3
  4262. #define xieValEncodeG31D        4
  4263. #define xieValEncodeG32D        6
  4264. #define xieValEncodeG42D        8
  4265. #define xieValEncodeJPEGBaseline        10
  4266. #define xieValEncodeJPEGLossless        12
  4267. #define xieValEncodeTIFF2       14
  4268. #define xieValEncodeTIFFPackBits        16
  4269. Errors
  4270. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4271. xieErrNoFloPhotomap     Invalid photomap
  4272. xieErrNoFloSource       Invalid src
  4273. xieErrNoFloTechnique    Invalid encode_tech or encode_param
  4274. See Also
  4275. XieTecEncodeUncompressedSingle, XieTecEncodeUncompressedTriple, XieTecEncodeG31D,
  4276. XieTecEncodeG32D, XieTecEncodeG42D, XieTecEncodeServerChoice,
  4277. XieTecEncodeJPEGBaseline, XieTecEncodeTIFF2, XieTecEncodeTIFFPackBits
  4278.  XIElib - Photoflo Element Functions    XieFloExportROI
  4279. Name
  4280. XieFloExportROI - specify an ExportROI element and set its parameters
  4281. Syntax
  4282. void XieFloExportROI (element, src, roi)
  4283. XiePhotoElement *element;
  4284. XiePhototag src;
  4285. XieRoi roi;
  4286. Arguments
  4287. element Specifies the XiePhotoElement structure to use.
  4288. src     Specifies the element supplying a list-of-rectangles.
  4289. roi     Specifies the ID of the ROI resource to receive the data.
  4290. Description
  4291. An ExportROI element allows data imported from an ImportROI or ImportClientROI element to be
  4292. saved in an existing Rectangles-Of-Interest (ROI) resource.
  4293.  
  4294. roi will be populated with new data. The previous data of roi are overwritten after the photoflo
  4295. completes.
  4296. Structures
  4297. XieFloExportROI sets the XiePhotoElement structure field elemType to
  4298. xieElemExportROI, which identifies the element as an ExportROI, and sets the fields of the
  4299. member structure ExportROI using the arguments in the argument list.
  4300.  
  4301. typedef XID XieRoi;
  4302. typedef unsigned XiePhototag;
  4303.  
  4304. typedef struct {
  4305.         int elemType;
  4306.         union {
  4307.                 ...
  4308.                 struct {
  4309.                         XiePhototag src;
  4310.                         XieRoi roi;
  4311.                 } ExportROI;
  4312.                 ...
  4313.         } data;
  4314. } XiePhotoElement;
  4315. Errors
  4316. xieErrNoFloAlloc        Insufficient resources (for example, memory)
  4317. xieErrNoFloROI  Invalid roi
  4318. xieErrNoFloSource       Invalid src
  4319. See Also
  4320. XieFloImportROI, XieFloImportClientROI
  4321.  XIElib - Technique Functions   XieTecColorAllocAll
  4322. Name
  4323. XieTecColorAllocAll - allocate and fill an XieColorAllocAllParam structure
  4324. Syntax
  4325. XieColorAllocAllParam *XieTecColorAllocAll (fill)
  4326. unsigned long fill;
  4327. Arguments
  4328. fill    Specifies thefill value to use for pixels which cannot be allocated.
  4329. Returns
  4330. The XieColorAllocAllParam structure.
  4331. Description
  4332. XieTecColorAllocAll allocates and returns a pointer to an XieColorAllocAllParam
  4333. structure. The returned structure represents the list of parameters required by the AllocAll color
  4334. allocation technique and may be used as the color_alloc_param argument of
  4335. XieFloConvertToIndex (when the color_alloc_tech argument is
  4336. xieValColorAllocAll).
  4337.  
  4338. If insufficient memory is available, XieTecColorAllocAll returns NULL. To free the memory
  4339. allocated to this structure, use XFree.
  4340.  
  4341. The AllocAll color allocation technique allocates a read-only Colormap cell for each new pixel found.
  4342. If the Colormap runs out of cells, the remaining new pixels are mapped to fill. A ColorAlloc
  4343. event, which warns the client that results are of lesser fidelity than desired, will be sent if it is
  4344. necessary to use fill, and the client has requested it (see XieFloConvertToIndex). AllocAll is
  4345. appropriate only for dynamic Colormaps and requires that the number of discrete image pixels fit
  4346. within the size of the Colormap to avoid running out of cells.
  4347. Structures
  4348. XieTecColorAllocAll sets the structure field fill to the value of the argument fill.
  4349.  
  4350. typedef struct {
  4351.         unsigned long fill;
  4352. } XieColorAllocAllParam;
  4353. See Also
  4354. XieFloConvertToIndex
  4355.  XIElib - Technique Functions   XieTecColorAllocMatch
  4356. Name
  4357. XieTecColorAllocMatch - allocate and fill an XieColorAllocMatchParam structure
  4358. Syntax
  4359. XieColorAllocMatchParam *XieTecColorAllocMatch (match_limit,
  4360. gray_limit)
  4361. double match_limit;
  4362. double gray_limit;
  4363. Arguments
  4364. match_limit     Specifies the color allocation control value.
  4365. gray_limit      Specifies the gray scale allocation control value.
  4366. Returns
  4367. The XieColorAllocMatchParam structure.
  4368. Description
  4369. XieTecColorAllocMatch allocates and returns a pointer to an
  4370. XieColorAllocMatchParam structure. The returned structure represents the list of parameters
  4371. required by the AllocMatch color allocation technique and may be used as the
  4372. color_alloc_param argument of XieFloConvertToIndex (when the
  4373. color_alloc_tech argument is xieValColorAllocMatch).
  4374.  
  4375. If insufficient memory is available, XieTecColorAllocMatch returns NULL. To free the
  4376. memory allocated to this structure, use XFree.
  4377.  
  4378. The AllocMatch color allocation technique allows a trade-off between image fidelity and Colormap
  4379. usage via a pair of granularity parameters. The highest priority is given to allocating read-only cells
  4380. in a sequence that provides an even distribution of pixels throughout the colorspace. Secondary
  4381. priority is given to the frequency of usage of image pixels. Any image pixel that is a close enough
  4382. match to an existing read-only cell will share that cell (where close is determined by the granularity
  4383. controls). For other image pixels, new read-only allocations are made. When no more cells are
  4384. available, each remaining image pixel is matched to the closest read-only cell. The AllocMatch color
  4385. allocation technique is appropriate for both static and dynamic Colormaps. For the sake of
  4386. computational efficiency the number of discrete image pixels should not exceed the size of the
  4387. Colormap.
  4388.  
  4389. match_limit and gray_match control the allocation of colors and gray shades, respectively. The
  4390. minimum value (0.0) specifies exact matches (within the limits of the Colormap). The maximum
  4391. value (1.0) encompasses the entire colorspace within which no new cells are allocated. A
  4392. ColorAlloc event, which warns the client that results are of lesser fidelity than desired, can be
  4393. sent if the Colormap runs out of cells.
  4394. Structures
  4395. XieTecColorAllocMatch sets the structure field match_limit to the value of the argument
  4396. match_limit; and the structure field gray_limit to the value of the argument gray_limit.
  4397.  
  4398. typedef struct {
  4399.         float match_limit;
  4400.         float gray_limit;
  4401. } XieColorAllocMatchParam;
  4402. See Also
  4403. XieFloConvertToIndex
  4404.  XIElib - Technique Functions   XieTecColorAllocRequantize
  4405. Name
  4406. XieTecColorAllocRequantize - allocate and fill an XieColorAllocRequantizeParam structure
  4407. Syntax
  4408. XieColorAllocRequantizeParam *XieTecColorAllocRequantize (max_cells)
  4409. unsigned long max_cells;
  4410. Arguments
  4411. max_cells       Specifies the maximum number of Colormap allocations to allow.
  4412. Returns
  4413. The XieColorAllocRequantizeParam structure.
  4414. Description
  4415. XieTecColorAllocRequantize allocates and returns a pointer to an
  4416. XieColorAllocRequantizeParam structure. The returned structure represents the list of
  4417. parameters required by the AllocRequantize color allocation technique and may be used as the
  4418. color_alloc_param argument of XieFloConvertToIndex (when the
  4419. color_alloc_tech argument is xieValColorAllocRequantize).
  4420.  
  4421. If insufficient memory is available, XieTecColorAllocRequantize returns NULL. To free the
  4422. memory allocated to this structure, use XFree.
  4423.  
  4424. The AllocRequantize color allocation technique first reduces the total number of discrete pixel values
  4425. in the image to be no more than a specified number and then allocates the resulting pixel values as
  4426. read-only cells from the Colormap. One method of accomplishing this reduction process can be found
  4427. in "Color image quantization for frame buffer display" (Heckbert, P. S., Comput. Graph. 16, 3).
  4428.  
  4429. If max_cells is zero or greater than the number of unallocated Colormap cells, the reduction
  4430. algorithm will restrict its output to the number of free cells. A ColorAlloc event, which warns the
  4431. client that results are of lesser fidelity than desired, can be sent if the number of pixels had to be
  4432. restricted to a lesser number than max_cells because of  a lack of free Colormap cells. The
  4433. AllocRequantize color allocation technique is appropriate only for dynamic Colormaps.
  4434. Structures
  4435. XieTecColorAllocRequantize sets the structure field max_cells to the value of the
  4436. argument max_cells.
  4437.  
  4438. typedef struct {
  4439.         unsigned long max_cells;
  4440. } XieColorAllocRequantizeParam;
  4441. See Also
  4442. XieFloConvertToIndex
  4443.  XIElib - Technique Functions   XieTecRGBToCIELab
  4444. Name
  4445. XieTecRGBToCIELab - allocate and fill an XieRGBToCIELabParam structure
  4446. Syntax
  4447. XieRGBToCIELabParam *XieTecRGBToCIELab (matrix, white_adjust_tech,
  4448. white_adjust_param)
  4449. XieMatrix matrix;
  4450. XieWhiteAdjustTechnique white_adjust_tech;
  4451. XiePointer white_adjust_param;
  4452. Arguments
  4453. matrix  Specifies the conversion matrix.
  4454. white_adjust_tech       Specifies the WhiteAdjust technique to be used.
  4455. white_adjust_param      Specifies the list of parameters required by white_adjust_tech.
  4456. Returns
  4457. The XieRGBToCIELabParam structure.
  4458. Description
  4459. XieTecRGBToCIELab allocates and returns a pointer to an XieRGBToCIELabParam structure.
  4460. The returned structure represents the list of parameters required by the RGBToCIELab color
  4461. conversion technique and may be used as the color_param argument of
  4462. XieFloConvertFromRGB (when the color_space argument is xieValRGBToCIELab).
  4463.  
  4464. If insufficient memory is available, XieTecRGBToCIELab returns NULL. To free the memory
  4465. allocated to this structure, use XFree.
  4466.  
  4467. XieTecRGBToCIELab converts RGB data to the CIELab colorspace, an international standard
  4468. designed for perceptual uniformity. The colorspace coordinates are denoted by L, a, and b and are
  4469. defined in CIE, Recommendations on Uniform Color Spaces, Color-Difference Equations,
  4470. Psychometric Color Terms (Bureau Central de la CIE [Supplement 2 of CIE Publication 15 (E-1.3.1)
  4471. 1971], 1978).
  4472.  
  4473. matrix is a 3x3 RGB-to-CIEXYZ conversion matrix (the source white point is also encoded in
  4474. matrix). white_adjust_tech is the WhiteAdjust technique that can be used to shift the white
  4475. point of the output data. white_adjust_param is the list of parameters required by
  4476. white_adjust_tech.
  4477.  
  4478. The input data type can be constrained or unconstrained; the output data type is always
  4479. unconstrained. When the input is constrained, the data are normalized to the range [0, 1] (that is,
  4480. scaled by 1/(levels - 1) prior to the conversion).
  4481.  
  4482. WhiteAdjust techniques define the white point adjustment techniques that can be used when
  4483. converting to or from the RGB colorspace. One of the following standard WhiteAdjust technique
  4484. values can be assigned to white_adjust_tech:
  4485.  
  4486. xieValWhiteAdjustDefault
  4487. xieValWhiteAdjustNone
  4488. xieValWhiteAdjustCIELabShift
  4489.  
  4490. If a vendor defined additional private WhiteAdjust techniques, the private technique values given to
  4491. these techniques can be assigned to white_adjust_tech.
  4492.  
  4493. The server is required to support the default technique that is bound to one of the standard techniques
  4494. defined or a private technique.
  4495. Structures
  4496. XieTecRGBToCIELab sets the structure field matrix to the values of the argument matrix; the
  4497. structure field white_adjust_tech to the value of the argument white_adjust_tech; and
  4498. the structure field white_adjust_param to the value of the argument white_adjust_param.
  4499.  
  4500. typedef float XieMatrix[9];
  4501. typedef unsigned XieWhiteAdjustTechnique;
  4502. typedef struct {
  4503.         XieMatrix matrix;
  4504.         XieWhiteAdjustTechnique white_adjust_tech;
  4505.         XiePointer white_adjust_param;
  4506. } XieRGBToCIELabParam;
  4507.  
  4508. /* Definitions for WhiteAdjust Techniques */
  4509. #define xieValWhiteAdjustDefault        0
  4510. #define xieValWhiteAdjustNone   1
  4511. #define xieValWhiteAdjustCIELabShift    2
  4512. See Also
  4513. XieFloConvertFromRGB, XieTecWhiteAdjustCIELabShift
  4514.  XIElib - Technique Functions   XieTecRGBToCIEXYZ
  4515. Name
  4516. XieTecRGBToCIEXYZ - allocate and fill an XieRGBToCIEXYZParam structure
  4517. Syntax
  4518. XieRGBToCIEXYZParam *XieTecRGBToCIEXYZ (matrix, white_adjust_tech,
  4519. white_adjust_param)
  4520. XieMatrix matrix;
  4521. XieWhiteAdjustTechnique white_adjust_tech;
  4522. XiePointer white_adjust_param;
  4523. Arguments
  4524. matrix  Specifies the conversion matrix.
  4525. white_adjust_tech       Specifies the WhiteAdjust technique to be used.
  4526. white_adjust_param      Specifies the list of parameters required by white_adjust_tech.
  4527. Returns
  4528. The XieRGBToCIEXYZParam structure.
  4529. Description
  4530. XieTecRGBToCIEXYZ allocates and returns a pointer to an XieRGBToCIEXYZParam structure.
  4531. The returned structure represents the list of parameters required by the RGBToCIEXYZ color
  4532. conversion technique and may be used as the color_param argument of
  4533. XieFloConvertFromRGB (when the color_space argument is xieValRGBToCIEXYZ).
  4534.  
  4535. If insufficient memory is available, XieTecRGBToCIEXYZ returns NULL. To free the memory
  4536. allocated to this structure, use XFree.
  4537.  
  4538. XieTecRGBToCIEXYZ converts RGB data to the CIEXYZ colorspace, an international standard
  4539. device-independent colorspace.
  4540.  
  4541. matrix is a 3x3 RGB-to-CIEXYZ conversion matrix (the source white point is also encoded in
  4542. matrix). white_adjust_tech is the WhiteAdjust technique that can be used to shift the white
  4543. point of the output data. white_adjust_param is the list of parameters required by
  4544. white_adjust_tech.
  4545.  
  4546. The input data type can be constrained or unconstrained; the output data type is always
  4547. unconstrained. When the input is constrained, the data are normalized to the range [0, 1] (that is,
  4548. scaled by 1/(levels - 1) prior to the conversion).
  4549.  
  4550. WhiteAdjust techniques define the white point adjustment techniques that can be used when
  4551. converting to or from the RGB colorspace. One of the following standard WhiteAdjust technique
  4552. values can be assigned to white_adjust_tech:
  4553.  
  4554. xieValWhiteAdjustDefault
  4555. xieValWhiteAdjustNone
  4556. xieValWhiteAdjustCIELabShift
  4557.  
  4558. If a vendor defined additional private WhiteAdjust techniques, the private technique values given to
  4559. these techniques can be assigned to white_adjust_tech.
  4560.  
  4561. The server is required to support the default technique that is bound to one of the standard techniques
  4562. defined  or a private technique.
  4563. Structures
  4564. XieTecRGBToCIEXYZ sets the structure field matrix to the values of the argument matrix; the
  4565. structure field white_adjust_tech to the value of the argument white_adjust_tech; and
  4566. the structure field white_adjust_param to the value of the argument white_adjust_param.
  4567.  
  4568. typedef float XieMatrix[9];
  4569. typedef unsigned XieWhiteAdjustTechnique;
  4570. typedef struct {
  4571.         XieMatrix matrix;
  4572.         XieWhiteAdjustTechnique white_adjust_tech;
  4573.         XiePointer white_adjust_param;
  4574. } XieRGBToCIEXYZParam;
  4575.  
  4576. /* Definitions for WhiteAdjust Techniques */
  4577. #define xieValWhiteAdjustDefault        0
  4578. #define xieValWhiteAdjustNone   1
  4579. #define xieValWhiteAdjustCIELabShift    2
  4580. See Also
  4581. XieFloConvertFromRGB, XieTecWhiteAdjustCIELabShift
  4582.  XIElib - Technique Functions   XieTecRGBToYCbCr
  4583. Name
  4584. XieTecRGBToYCbCr - allocate and fill an XieRGBToYCbCrParam structure
  4585. Syntax
  4586. XieRGBToYCbCrParam *XieTecRGBToYCbCr (levels, luma_red, luma_green,
  4587. luma_blue, bias)
  4588. XieLevels levels;
  4589. double luma_red;
  4590. double luma_green;
  4591. double luma_blue;
  4592. XieConstant bias;
  4593. Arguments
  4594. levels  Specifies the output levels.
  4595. luma_red        Specifies the proportion of red in the luminance band.
  4596. luma_green      Specifies the proportion of green in the luminance band.
  4597. luma_blue       Specifies the proportion of blue in the luminance band.
  4598. bias    Specifies an offset to add to the output pixels values.
  4599. Returns
  4600. The XieRGBToYCbCrParam structure.
  4601. Description
  4602. XieTecRGBToYCbCr allocates and returns a pointer to an XieRGBToYCbCrParam structure.
  4603. The returned structure represents the list of parameters required by the RGBToYCbCr color
  4604. conversion technique and may be used as the color_param argument of
  4605. XieFloConvertFromRGB (when the color_space argument is xieValRGBToYCbCr).
  4606.  
  4607. If insufficient memory is available, XieTecRGBToYCbCr returns NULL. To free the memory
  4608. allocated to this structure, use XFree.
  4609.  
  4610. XieTecRGBToYCbCr converts RGB data to the YCbCr colorspace. Source data may be constrained
  4611. or unconstrained; the output type will match. If the source data is constrained, levels determines
  4612. the output levels; otherwise levels is ignored.
  4613. Structures
  4614. XieTecRGBToYCbCr sets the structure field levels to the values of the argument levels; the
  4615. structure fields luma_red, luma_green, luma_blue to the values of the arguments luma_red,
  4616. luma_green, luma_blue; and the structure field bias to the values of the argument bias.
  4617.  
  4618. typedef float XieConstant[3];
  4619. typedef unsigned long XieLevels[3];
  4620. typedef struct {
  4621.         XieLevels levels;
  4622.         float luma_red;
  4623.         float luma_green;
  4624.         float luma_blue;
  4625.         XieConstant bias;
  4626. } XieRGBToYCbCrParam;
  4627. See Also
  4628. XieFloConvertFromRGB
  4629.  XIElib - Technique Functions   XieTecRGBToYCC
  4630. Name
  4631. XieTecRGBToYCC - allocate and fill an XieRGBToYCCParam structure
  4632. Syntax
  4633. XieRGBToYCCParam *XieTecRGBToYCC (levels, luma_red, luma_green,
  4634. luma_blue, scale)
  4635. XieLevels levels;
  4636. double luma_red;
  4637. double luma_green;
  4638. double luma_blue;
  4639. double scale;
  4640. Arguments
  4641. levels  Specifies the output levels.
  4642. luma_red        Specifies the proportion of red in the luminance band.
  4643. luma_green      Specifies the proportion of green in the luminance band.
  4644. luma_blue       Specifies the proportion of blue in the luminance band.
  4645. scale   Specifies a compression factor to apply to the output pixels values.
  4646. Returns
  4647. The XieRGBToYCCParam structure.
  4648. Description
  4649. XieTecRGBToYCC allocates and returns a pointer to an XieRGBToYCCParam structure. The
  4650. returned structure represents the list of parameters required by the RGBToYCC color conversion
  4651. technique and may be used as the color_param argument of XieFloConvertFromRGB (when
  4652. the color_space argument is xieValRGBToYCC).
  4653.  
  4654. If insufficient memory is available, XieTecRGBToYCC returns NULL. To free the memory allocated
  4655. to this structure, use XFree.
  4656.  
  4657. XieTecRGBToYCC converts RGB data to the YCC colorspace. The PhotoYCC color-encoding
  4658. scheme is defined in: KODAK PhotoCD System - A Planning Guide for Developers (Eastman Kodak
  4659. Co., Part no. DCI200R, 1991).
  4660.  
  4661. Source data may be constrained or unconstrained; the output type will match. If the source data is
  4662. constrained, levels determines the output levels; otherwise levels is ignored. Typical values
  4663. cited in the literature for scale are in the range of about 1.35 to 1.4.
  4664. Structures
  4665. XieTecRGBToYCC sets the structure field levels to the values of the argument levels; the
  4666. structure fields luma_red, luma_green, luma_blue are set to the values of the arguments
  4667. luma_red, luma_green, luma_blue; and the structure field scale to the value of the
  4668. argument scale.
  4669.  
  4670. typedef unsigned long XieLevels[3];
  4671. typedef struct {
  4672.         XieLevels levels;
  4673.         float luma_red;
  4674.         float luma_green;
  4675.         float luma_blue;
  4676.         float scale;
  4677. } XieRGBToYCCParam;
  4678. See Also
  4679. XieFloConvertFromRGB
  4680.  XIElib - Technique Functions   XieTecCIELabToRGB
  4681. Name
  4682. XieTecCIELabToRGB - allocate and fill an XieCIELabToRGBParam structure
  4683. Syntax
  4684. XieCIELabToRGBParam *XieTecCIELabToRGB (matrix, white_adjust_tech,
  4685. white_adjust_param, gamut_tech, gamut_param)
  4686. XieMatrix matrix;
  4687. XieWhiteAdjustTechnique white_adjust_tech;
  4688. XiePointer white_adjust_param;
  4689. XieGamutTechnique gamut_tech;
  4690. XiePointer gamut_param;
  4691. Arguments
  4692. matrix  Specifies the conversion matrix.
  4693. white_adjust_tech       Specifies the WhiteAdjust technique to be used.
  4694. white_adjust_param      Specifies the list of parameters required by white_adjust_tech.
  4695. gamut_tech      Specifies the Gamut technique to be used.
  4696. gamut_param     Specifies the list of parameters required by gamut_tech.
  4697. Returns
  4698. The XieCIELabToRGBParam structure.
  4699. Description
  4700. XieTecCIELabToRGB allocates and returns a pointer to an XieCIELabToRGBParam structure.
  4701. The returned structure represents the list of parameters required by the CIELabToRGB color
  4702. conversion technique and may be used as the color_param argument of XieFloConvertToRGB
  4703. (when the color_space argument is xieValCIELabToRGB).
  4704.  
  4705. If insufficient memory is available, XieTecCIELabToRGB returns NULL. To free the memory
  4706. allocated to this structure, use XFree.
  4707.  
  4708. XieTecCIELabToRGB converts CIELab data to the RGB colorspace. The CIELab colorspace is an
  4709. international standard designed for perceptual uniformity. The colorspace coordinates are denoted by
  4710. L, a, and b and are defined in CIE, Recommendations on Uniform Color Spaces, Color-Difference
  4711. Equations, Psychometric Color Terms (Bureau Central de la CIE [Supplement 2 of CIE Publication
  4712. 15 (E-1.3.1) 1971], 1978).
  4713.  
  4714. matrix is a 3x3 CIEXYZ-to-RGB conversion matrix (the target white point is also encoded in
  4715. matrix). white_adjust_tech is the WhiteAdjust technique that can be used to shift the white
  4716. point of the source data prior to conversion. white_adjust_param is the list of parameters
  4717. required by white_adjust_tech. gamut_tech is the Gamut technique that can be used to keep
  4718. the output pixels within the bounds of the RGB colorspace. gamut_param is the list of parameters
  4719. required by gamut_tech.
  4720.  
  4721. The input data type must be unconstrained; the output data type is also unconstrained.
  4722.  
  4723. WhiteAdjust techniques define the white point adjustment techniques that can be used when
  4724. converting to or from the RGB colorspace. One of the following standard WhiteAdjust technique
  4725. values can be assigned to white_adjust_tech:
  4726.  
  4727. xieValWhiteAdjustDefault
  4728. xieValWhiteAdjustNone
  4729. xieValWhiteAdjustCIELabShift
  4730.  
  4731. If a vendor defined additional private WhiteAdjust techniques, the private technique values given to
  4732. these techniques can be assigned to white_adjust_tech.
  4733.  
  4734. The server is required to support the default technique that is bound to one of the standard techniques
  4735. defined or a private technique.
  4736.  
  4737. Gamut techniques define the gamut compression techniques used to deal with converted colors that
  4738. lie outside the gamut of the RGB space. One of the following standard gamut technique values can be
  4739. assigned to gamut_tech:
  4740.  
  4741. xieValGamutDefault
  4742. xieValGamutNone
  4743. xieValGamutClipRGB
  4744.  
  4745. If a vendor defined additional private gamut techniques, the private technique values given to these
  4746. techniques can be assigned to gamut_tech.
  4747.  
  4748. The server is required to support the default technique that is bound to one of the standard techniques
  4749. defined or a private technique.
  4750. Structures
  4751. XieTecCIELabToRGB sets the structure field matrix to the values of the argument matrix; the
  4752. structure field white_adjust_tech to the value of the argument white_adjust_tech; the
  4753. structure field white_adjust_param to the value of the argument white_adjust_param; the
  4754. structure field gamut_tech to the value of the argument gamut_tech; and the structure field
  4755. gamut_param to the value of the argument gamut_param.
  4756.  
  4757. typedef float XieMatrix[9];
  4758. typedef unsigned XieGamutTechnique;
  4759. typedef unsigned XieWhiteAdjustTechnique;
  4760. typedef struct {
  4761.         XieMatrix matrix;
  4762.         XieWhiteAdjustTechnique white_adjust_tech;
  4763.         XiePointer white_adjust_param;
  4764.         XieGamutTechnique gamut_tech;
  4765.         XiePointer gamut_param;
  4766. } XieCIELabToRGBParam;
  4767.  
  4768. /* Definitions for WhiteAdjust Techniques */
  4769. #define xieValWhiteAdjustDefault        0
  4770. #define xieValWhiteAdjustNone   1
  4771. #define xieValWhiteAdjustCIELabShift    2
  4772.  
  4773. /* Definitions for Gamut Techniques */
  4774. #define xieValGamutDefault      0
  4775. #define xieValGamutNone 1
  4776. #define xieValGamutClipRGB      2
  4777. See Also
  4778. XieFloConvertToRGB, XieTecWhiteAdjustCIELabShift
  4779.  XIElib - Technique Functions   XieTecCIEXYZToRGB
  4780. Name
  4781. XieTecCIEXYZToRGB -  allocate and fill an XieCIEXYZToRGBParam structure
  4782. Syntax
  4783. XieCIEXYZToRGBParam *XieTecCIEXYZToRGB (matrix, white_adjust_tech,
  4784. white_adjust_param, gamut_tech, gamut_param)
  4785. XieMatrix matrix;
  4786. XieWhiteAdjustTechnique white_adjust_tech;
  4787. XiePointer white_adjust_param;
  4788. XieGamutTechnique gamut_tech;
  4789. XiePointer gamut_param;
  4790. Arguments
  4791. matrix  Specifies the conversion matrix.
  4792. white_adjust_tech       Specifies the WhiteAdjust technique to be used.
  4793. white_adjust_param      Specifies the list of parameters required by white_adjust_tech.
  4794. gamut_tech      Specifies the Gamut technique to be used.
  4795. gamut_param     Specifies the list of parameters required by gamut_tech.
  4796. Returns
  4797. The XieCIEXYZToRGBParam structure.
  4798. Description
  4799. XieTecCIEXYZToRGB allocates and returns a pointer to an XieCIEXYZToRGBParam structure.
  4800. The returned structure represents the list of parameters required by the CIEXYZToRGB color
  4801. conversion technique and may be used as the color_param argument of XieFloConvertToRGB
  4802. (when the color_space argument is xieValCIEXYZToRGB).
  4803.  
  4804. If insufficient memory is available, XieTecCIEXYZToRGB returns NULL. To free the memory
  4805. allocated to this structure, use XFree.
  4806.  
  4807. XieTecCIEXYZToRGB converts CIEXYZ data to the RGB colorspace. The CIEXYZ colorspace is
  4808. an international standard device-independent colorspace.
  4809.  
  4810. matrix is a 3x3 CIEXYZ-to-RGB conversion matrix (the target white point is also encoded in
  4811. matrix). white_adjust_tech is the WhiteAdjust technique that can be used to shift the white
  4812. point of the source data prior to conversion. white_adjust_param is the list of parameters
  4813. required by white_adjust_tech. gamut_tech is the Gamut technique that can be used to keep
  4814. the output pixels within the bounds of the RGB colorspace. gamut_param is the list of parameters
  4815. required by gamut_tech.
  4816.  
  4817. The input data type must be unconstrained; the output data type is also unconstrained.
  4818.  
  4819. WhiteAdjust techniques define the white point adjustment techniques that can be used when
  4820. converting to or from the RGB colorspace. One of the following standard WhiteAdjust technique
  4821. values can be assigned to white_adjust_tech:
  4822.  
  4823. xieValWhiteAdjustDefault
  4824. xieValWhiteAdjustNone
  4825. xieValWhiteAdjustCIELabShift
  4826.  
  4827. If a vendor defined additional private WhiteAdjust techniques, the private technique values given to
  4828. these techniques can be assigned to white_adjust_tech.
  4829.  
  4830. The server is required to support the default technique that is bound to one of the standard techniques
  4831. defined  or a private technique.
  4832.  
  4833. Gamut techniques define the gamut compression techniques used to deal with converted colors that
  4834. lie outside the gamut of the RGB space. One of the following standard gamut technique values can be
  4835. assigned to gamut_tech:
  4836.  
  4837. xieValGamutDefault
  4838. xieValGamutNone
  4839. xieValGamutClipRGB
  4840.  
  4841. If a vendor defined additional private gamut techniques, the private technique values given to these
  4842. techniques can be assigned to gamut_tech.
  4843.  
  4844. The server is required to support the default technique that is bound to one of the standard techniques
  4845. defined  or a private technique.
  4846. Structures
  4847. XieTecCIEXYZToRGB sets the structure field matrix to the values of the argument matrix; the
  4848. structure field white_adjust_tech to the value of the argument white_adjust_tech; the
  4849. structure field white_adjust_param to the value of the argument white_adjust_param; the
  4850. structure field gamut_tech to the value of the argument gamut_tech; and the structure field
  4851. gamut_param to the value of the argument gamut_param.
  4852.  
  4853. typedef float XieMatrix[9];
  4854. typedef unsigned XieGamutTechnique;
  4855. typedef unsigned XieWhiteAdjustTechnique;
  4856. typedef struct {
  4857.         XieMatrix matrix;
  4858.         XieWhiteAdjustTechnique white_adjust_tech;
  4859.         XiePointer white_adjust_param;
  4860.         XieGamutTechnique gamut_tech;
  4861.         XiePointer gamut_param;
  4862. } XieCIEXYZToRGBParam;
  4863.  
  4864. /* Definitions for WhiteAdjust Techniques */
  4865. #define xieValWhiteAdjustDefault        0
  4866. #define xieValWhiteAdjustNone   1
  4867. #define xieValWhiteAdjustCIELabShift    2
  4868.  
  4869. /* Definitions for Gamut Techniques */
  4870. #define xieValGamutDefault      0
  4871. #define xieValGamutNone 1
  4872. #define xieValGamutClipRGB      2
  4873. See Also
  4874. XieFloConvertToRGB, XieTecWhiteAdjustCIELabShift
  4875.  XIElib - Technique Functions   XieTecYCbCrToRGB
  4876. Name
  4877. XieTecYCbCrToRGB - allocate and fill an XieYCbCrToRGBParam structure
  4878. Syntax
  4879. XieYCbCrToRGBParam *XieTecYCbCrToRGB (levels, luma_red, luma_green,
  4880. luma_blue, bias, gamut_tech, gamut_param)
  4881. XieLevels levels;
  4882. double luma_red;
  4883. double luma_green;
  4884. double luma_blue;
  4885. XieConstant bias;
  4886. XieGamutTechnique gamut_tech;
  4887. XiePointer gamut_param;
  4888. Arguments
  4889. levels  Specifies the output levels.
  4890. luma_red        Specifies the proportion of red in the luminance band (Y).
  4891. luma_green      Specifies the proportion of green in the luminance band (Y).
  4892. luma_blue       Specifies the proportion of blue in the luminance band (Y).
  4893. bias    Specifies an offset to remove from the source pixels values.
  4894. gamut_tech      Specifies the Gamut technique to be used.
  4895. gamut_param     Specifies the list of parameters required by gamut_tech.
  4896. Returns
  4897. The XieYCbCrToRGBParam structure.
  4898. Description
  4899. XieTecYCbCrToRGB allocates and returns a pointer to an XieYCbCrToRGBParam structure.
  4900. The returned structure represents the list of parameters required by the YCbCrToRGB color
  4901. conversion technique and may be used as the color_param argument of XieFloConvertToRGB
  4902. (when the color_space argument is xieValYCbCrToRGB).
  4903.  
  4904. If insufficient memory is available, XieTecYCbCrToRGB returns NULL. To free the memory
  4905. allocated to this structure, use XFree.
  4906.  
  4907. XieTecYCbCrToRGB converts YCbCr data to the RGB colorspace. Source data may be constrained
  4908. or unconstrained; the output type will match. If the source data is constrained, levels determines
  4909. the output levels; otherwise levels is ignored.
  4910.  
  4911. Gamut techniques define the gamut compression techniques used to deal with converted colors that
  4912. lie outside the gamut of the RGB space. One of the following standard gamut technique values can be
  4913. assigned to gamut_tech:
  4914.  
  4915. xieValGamutDefault
  4916. xieValGamutNone
  4917. xieValGamutClipRGB
  4918.  
  4919. If a vendor defined additional private gamut techniques, the private technique values given to these
  4920. techniques can be assigned to gamut_tech.
  4921.  
  4922. The server is required to support the default technique that is bound to one of the standard techniques
  4923. defined or a private technique.
  4924. Structures
  4925. XieTecYCbCrToRGB sets the structure field levels to the values of the argument levels; the
  4926. structure fields luma_red, luma_green, luma_blue to the values of the arguments luma_red,
  4927. luma_green, luma_blue; the structure field bias to the values of the argument bias; the
  4928. structure field gamut_tech to the value of the argument gamut_tech; and the structure field
  4929. gamut_param to the value of the argument gamut_param.
  4930.  
  4931. typedef float XieConstant[3];
  4932. typedef unsigned long XieLevels[3];
  4933. typedef unsigned XieGamutTechnique;
  4934. typedef struct {
  4935.         XieLevels levels;
  4936.         float luma_red;
  4937.         float luma_green;
  4938.         float luma_blue;
  4939.         XieConstant bias;
  4940.         XieGamutTechnique gamut_tech;
  4941.         XiePointer gamut_param;
  4942. } XieYCbCrToRGBParam;
  4943.  
  4944. /* Definitions for Gamut Techniques */
  4945. #define xieValGamutDefault      0
  4946. #define xieValGamutNone 1
  4947. #define xieValGamutClipRGB      2
  4948. See Also
  4949. XieFloConvertToRGB
  4950.  XIElib - Technique Functions   XieTecYCCToRGB
  4951. Name
  4952. XieTecYCCToRGB - allocate and fill an XieYCCToRGBParam structure
  4953. Syntax
  4954. XieYCCToRGBParam *XieTecYCCToRGB (levels, luma_red, luma_green,
  4955. luma_blue, scale, gamut_tech, gamut_param)
  4956. XieLevels levels;
  4957. double luma_red;
  4958. double luma_green;
  4959. double luma_blue;
  4960. double scale;
  4961. XieGamutTechnique gamut_tech;
  4962. XiePointer gamut_param;
  4963. Arguments
  4964. levels  Specifies the output levels.
  4965. luma_red        Specifies the proportion of red in the luminance band (Y).
  4966. luma_green      Specifies the proportion of green in the luminance band (Y).
  4967. luma_blue       Specifies the proportion of blue in the luminance band (Y).
  4968. scale   Specifies an expansion factor to apply to the output pixels values.
  4969. gamut_tech      Specifies the Gamut technique to be used.
  4970. gamut_param     Specifies the list of parameters required by gamut_tech.
  4971. Returns
  4972. The XieYCCToRGBParam structure.
  4973. Description
  4974. XieTecYCCToRGB allocates and returns a pointer to an XieYCCToRGBParam structure. The
  4975. returned structure represents the list of parameters required by the YCCToRGB color conversion
  4976. technique and may be used as the color_param argument of XieFloConvertToRGB (when the
  4977. color_space argument is xieValYCCToRGB).
  4978.  
  4979. If insufficient memory is available, XieTecYCCToRGB returns NULL. To free the memory allocated
  4980. to this structure, use XFree.
  4981.  
  4982. XieTecYCCToRGB converts YCC data to the RGB colorspace. The PhotoYCC color-encoding
  4983. scheme is defined in KODAK PhotoCD System - A Planning Guide for Developers (Eastman Kodak
  4984. Co., Part no. DCI200R, 1991).
  4985.  
  4986. Source data may be constrained or unconstrained; the output type will match. If the source data is
  4987. constrained, levels determines the output levels; otherwise levels is ignored. Typical values
  4988. cited in the literature for scale are in the range of about 1.35 to 1.4.
  4989.  
  4990. Gamut techniques define the gamut compression techniques used to deal with converted colors that
  4991. lie outside the gamut of the RGB space. One of the following standard gamut technique values can be
  4992. assigned to gamut_tech:
  4993.  
  4994. xieValGamutDefault
  4995. xieValGamutNone
  4996. xieValGamutClipRGB
  4997.  
  4998. If a vendor defined additional private gamut techniques, the private technique values given to these
  4999. techniques can be assigned to gamut_tech .
  5000.  
  5001. The server is required to support the default technique that is bound to one of the standard techniques
  5002. defined or a private technique.
  5003. Structures
  5004. XieTecYCCToRGB sets the structure field levels to the values of the argument levels; the
  5005. structure fields luma_red, luma_green, luma_blue to the values of the arguments luma_red,
  5006. luma_green, luma_blue; the structure field scale to the values of the argument scale; the
  5007. structure field gamut_tech to the value of the argument gamut_tech; and the structure field
  5008. gamut_param to the value of the argument gamut_param.
  5009.  
  5010. typedef unsigned long XieLevels[3];
  5011. typedef unsigned XieGamutTechnique;
  5012. typedef struct {
  5013.         XieLevels levels;
  5014.         float luma_red;
  5015.         float luma_green;
  5016.         float luma_blue;
  5017.         float scale;
  5018.         XieGamutTechnique gamut_tech;
  5019.         XiePointer gamut_param;
  5020. } XieYCCToRGBParam;
  5021.  
  5022. /* Definitions for Gamut Techniques */
  5023. #define xieValGamutDefault      0
  5024. #define xieValGamutNone 1
  5025. #define xieValGamutClipRGB      2
  5026.  
  5027. See Also
  5028. XieFloConvertToRGB
  5029.  XIElib - Technique Functions   XieTecClipScale
  5030. Name
  5031. XieTecClipScale - allocate and fill an XieClipScaleParam structure
  5032. Syntax
  5033. XieClipScaleParam *XieTecClipScale (in_low, in_high, out_low,
  5034. out_high)
  5035. XieConstant in_low;
  5036. XieConstant in_high;
  5037. XieLTriplet out_low;
  5038. XieLTriplet out_high;
  5039. Arguments
  5040. in_low  Specifies an input pixel limit.
  5041. in_high Specifies an input pixel limit.
  5042. out_low Specifies an output pixel limit.
  5043. out_high        Specifies an output pixel limit.
  5044. Returns
  5045. The XieClipScaleParam structure.
  5046. Description
  5047. XieTecClipScale allocates and returns a pointer to an XieClipScaleParam structure. The
  5048. returned structure represents the list of parameters required by the constrain technique and may be
  5049. used as the constrain_param argument of XieFloConstrain (when the
  5050. constrain_tech argument is xieValClipScale).
  5051.  
  5052. If insufficient memory is available, XieTecClipScale returns NULL. To free the memory
  5053. allocated to this structure, use XFree.
  5054.  
  5055. For each band, output pixels will be clipped to the range [out_low, out_high]. If in_low is less
  5056. than in_high, then all pixels less than or equal to in_low will map to out_low, and all pixels
  5057. that are greater than or equal to in_high will map to out_high. All intermediate pixel values are
  5058. scaled proportionately to the output range. Nonintegral output values are rounded to the nearest
  5059. integer.
  5060.  
  5061. If in_low is greater than in_high, then all pixels that are greater than or equal to in_low will
  5062. map to out_low, and all pixels that are less than or equal to in_high will map to out_high. All
  5063. intermediate pixel values will be linearly mapped to the output range, such that in_low maps to
  5064. out_low, and in_high maps to out_high. Nonintegral output values are rounded to the nearest
  5065. integer.
  5066.  
  5067. in_low should not equal in_high, out_low should be less than out_high, and out_high
  5068. should not exceed levels - 1.
  5069. Structures
  5070. XieTecClipScale sets the structure fields input_low, input_high to the values of the
  5071. arguments in_low, in_high; and the structure fields output_low, output_high to the
  5072. values of the arguments out_low, out_high.
  5073.  
  5074. typedef float XieConstant[3];
  5075. typedef unsigned long XieLTriplet[3];
  5076. typedef struct {
  5077.         XieConstant input_low,input_high;
  5078.         XieLTriplet output_low,output_high;
  5079. } XieClipScaleParam;
  5080. See Also
  5081. XieFloConstrain
  5082.  XIElib - Technique Functions   XieTecConvolveConstant
  5083. Name
  5084. XieTecConvolveConstant - allocate and fill an XieConvolveConstantParam structure
  5085. Syntax
  5086. XieConvolveConstantParam *XieTecConvolveConstant (constant)
  5087. XieConstant constant;
  5088. Arguments
  5089. constant        Specifies the value to use if pixels are required from beyond the edge
  5090. of the image.
  5091. Returns
  5092. The XieConvolveConstantParam structure.
  5093. Description
  5094. XieTecConvolveConstant allocates and returns a pointer to an
  5095. XieConvolveConstantParam structure. The returned structure represents the list of parameters
  5096. required by the convolve technique and may be used as the convolve_param argument of
  5097. XieFloConvolve (when the convolve_tech argument is xieValConvolveConstant).
  5098.  
  5099. If insufficient memory is available, XieTecConvolveConstant returns NULL. To free the
  5100. memory allocated to this structure, use XFree.
  5101.  
  5102. Various methods of handling edge conditions are provided for convolve techniques. These techniques
  5103. determine what pixel values are used when the convolve technique requires data beyond the image
  5104. bounds. Convolve techniques come into play only when the kernel is positioned partially off the edge
  5105. of the image. Data around the edges of a process domain are convolved with adjacent image
  5106. pixels wherever possible. A process domain is inserted in many element definitions and is used to
  5107. restrict the element's processing to a subset of the source data pixels; it can be either a list-of-
  5108. rectangles or a control-plane.
  5109.  
  5110. The Constant Convolve technique uses the value specified by constant if pixels are required from
  5111. beyond the edge of the image.
  5112. Structures
  5113. XieTecConvolveConstant sets the structure field constant to the value of the argument
  5114. constant.
  5115.  
  5116. typedef float XieConstant[3];
  5117. typedef struct {
  5118.         XieConstant constant;
  5119. } XieConvolveConstantParam;
  5120. See Also
  5121. XieFloConvolve
  5122.  XIElib - Technique Functions   XieTecDecodeUncompressedSingle
  5123. Name
  5124. XieTecDecodeUncompressedSingle - allocate and fill an
  5125. XieDecodeUncompressedSingleParam structure
  5126. Syntax
  5127. XieDecodeUncompressedSingleParam *XieTecDecodeUncompressedSingle
  5128. (fill_order, pixel_order, pixel_stride, left_pad,
  5129. scanline_pad)
  5130. XieOrientation fill_order;
  5131. XieOrientation pixel_order;
  5132. unsigned int pixel_stride;
  5133. unsigned int left_pad;
  5134. unsigned int scanline_pad;
  5135. Arguments
  5136. fill_order      Specifies the method of pixel packing.
  5137. pixel_order     Specifies pixel ordering within the data stream.
  5138. pixel_stride    Specifies the number of bits between consecutive pixels within a
  5139. scanline.
  5140. left_pad        Specifies the number of pad bits in each scanline.
  5141. scanline_pad    Specifies a multiple of bytes to which each scanline is padded.
  5142. Returns
  5143. The XieDecodeUncompressedSingleParam structure.
  5144. Description
  5145. XieTecDecodeUncompressedSingle allocates and returns a pointer to an
  5146. XieDecodeUncompressedSingleParam structure. The returned structure represents the list of
  5147. parameters required by the decode technique and may be used as the decode_param argument of
  5148. XieFloImportClientPhoto (when the decode_tech argument is
  5149. xieValDecodeUncompressedSingle).
  5150.  
  5151. If insufficient memory is available, XieTecDecodeUncompressedSingle returns NULL. To
  5152. free the memory allocated to this structure, use XFree.
  5153.  
  5154. The decode uncompressed single technique is used when no compression scheme has been applied to
  5155. single band image data. The parameters define the format of the data stream of uncompressed data
  5156. (the server may reformat the data as it chooses prior to processing or storage). When multiple pixels
  5157. are put in the same byte, or a pixel spans multiple bytes, fill_order specifies whether the pixels
  5158. (or parts of pixels) are packed into the most or least significant bits of a byte first. For pixels that span
  5159. a byte boundary, pixel_order defines whether the most or least significant bits of the pixel are
  5160. transported first within the data stream. One of the following standard orientation values can be
  5161. assigned to fill_order and pixel_order:
  5162.  
  5163. xieValLSFirst
  5164. xieValMSFirst
  5165.  
  5166. The following table shows the relationship between fill_order and pixel_order, using two
  5167. 10-bit pixels, each with two bits of pad (within each pixel the LS-bits are 0 and a, the MS-bits are
  5168. 9 and j, the pad bits are p).
  5169.  
  5170. fill order
  5171. LSFirst (pixel order)
  5172. MSFirst (pixel order)
  5173. LSFirst
  5174. 76543210  dcbapp98  ppjihgfe
  5175. 98765432  jihgpp10  ppfedcba
  5176. MSFirst
  5177. 76543210  98ppdcba  jihgfepp
  5178. 98765432  10ppjihg  fedcbapp
  5179.  
  5180. pixel_stride is the number of bits between the start of consecutive pixels within a scanline; it
  5181. must be at least enough bits to contain the number of input levels. left_pad is the number of pad
  5182. bits preceding the first image pixel in each scanline; if the server's Alignment attribute is Alignable,
  5183. or pixel_stride fits the definition of Alignable, the value of left_pad must be a multiple of
  5184. pixel_stride or a multiple of 8; otherwise, left_pad may be any arbitrary value.
  5185. scanline_pad defines a multiple of bytes to which each scanline is padded; valid values are: 0
  5186. (not aligned), 1, 2, 4, 8, and 16. The total number of bits-per-scanline in the data stream includes:
  5187. left_pad, the image data (width x pixel_stride), and sufficient additional bits to satisfy
  5188. scanline_pad.
  5189. Structures
  5190. XieTecDecodeUncompressedSingle sets the structure field fill_order to the value of the
  5191. argument fill_order; the structure field pixel_order to the value of the argument
  5192. pixel_order; the structure field pixel_stride to the value of the argument pixel_stride;
  5193. the structure field left_pad to the value of the argument left_pad; and the structure field
  5194. scanline_pad to the value of the argument scanline_pad.
  5195.  
  5196. typedef unsigned XieOrientation;
  5197. typedef struct {
  5198.         XieOrientation fill_order;
  5199.         XieOrientation pixel_order;
  5200.         unsigned int pixel_stride;
  5201.         unsigned int left_pad;
  5202.         unsigned int scanline_pad;
  5203. } XieDecodeUncompressedSingleParam;
  5204.  
  5205. /* Definitions of Orientation Types */
  5206. #define xieValLSFirst   1
  5207. #define xieValMSFirst   2
  5208. See Also
  5209. XieFloImportClientPhoto, XiePutClientData
  5210.  XIElib - Technique Functions   XieTecDecodeUncompressedTriple
  5211. Name
  5212. XieTecDecodeUncompressedTriple - allocate and fill an
  5213. XieDecodeUncompressedTripleParam structure
  5214. Syntax
  5215. XieDecodeUncompressedTripleParam *XieTecDecodeUncompressedTriple
  5216. (fill_order, pixel_order, band_order, interleave,
  5217. pixel_stride, left_pad, scanline_pad)
  5218. XieOrientation fill_order;
  5219. XieOrientation pixel_order;
  5220. XieOrientation band_order;
  5221. XieInterleave interleave;
  5222. unsigned char pixel_stride[3];
  5223. unsigned char left_pad[3];
  5224. unsigned char scanline_pad[3];
  5225. Arguments
  5226. fill_order      Specifies the method of pixel packing.
  5227. pixel_order     Specifies pixel ordering within the data stream.
  5228. band_order      Specifies the order of the image data sent through the protocol stream.
  5229. interleave      Specifies how the image bands are interleaved.
  5230. pixel_stride    Specifies the number of bits between consecutive pixels within a
  5231. scanline.
  5232. left_pad        Specifies the number of pad bits in each scanline.
  5233. scanline_pad    Specifies a multiple of bytes to which each scanline is padded.
  5234. Returns
  5235. The XieDecodeUncompressedTripleParam structure.
  5236. Description
  5237. XieTecDecodeUncompressedTriple allocates and returns a pointer to an
  5238. XieDecodeUncompressedTripleParam structure. The returned structure represents the list of
  5239. parameters required by the decode technique and may be used as the decode_param argument of
  5240. XieFloImportClientPhoto (when the decode_tech argument is
  5241. xieValDecodeUncompressedTriple).
  5242.  
  5243. If insufficient memory is available, XieTecDecodeUncompressedTriple returns NULL. To
  5244. free the memory allocated to this structure, use XFree.
  5245.  
  5246. The decode uncompressed triple technique is used when no compression scheme has been applied to
  5247. triple band image data. The parameters define the format of the data stream of uncompressed data
  5248. (the server may reformat the data as it chooses prior to processing or storage). When multiple pixels
  5249. are put in the same byte, or a pixel spans multiple bytes, fill_order specifies whether the pixels
  5250. (or parts of pixels) are packed into the most or least significant bits of a byte first. For pixels that span
  5251. a byte boundary, pixel_order defines whether the most or least significant bits of the pixel are
  5252. transported first within the data stream.
  5253.  
  5254. One of the following standard orientation values can be assigned to fill_order and
  5255. pixel_order:
  5256.  
  5257. xieValLSFirst
  5258. xieValMSFirst
  5259.  
  5260. The following table shows the relationship between fill_order and pixel_order, using two
  5261. 10-bit pixels, each with two bits of pad (within each pixel the LS-bits are 0 and a, the MS-bits are
  5262. 9 and j, the pad bits are p)
  5263.  
  5264. fill order
  5265. LSFirst (pixel order)
  5266. MSFirst (pixel order)
  5267. LSFirst
  5268. 76543210  dcbapp98  ppjihgfe
  5269. 98765432  jihgpp10  ppfedcba
  5270. MSFirst
  5271. 76543210  98ppdcba  jihgfepp
  5272. 98765432  10ppjihg  fedcbapp
  5273.  
  5274. pixel_stride is the number of bits between the start of consecutive pixels within a scanline; It
  5275. must be at least enough bits to contain the number of input levels. left_pad is the number of pad
  5276. bits preceding the first image pixel in each scanline; if the server's Alignment attribute is Alignable,
  5277. or pixel_stride fits the definition of Alignable, the value of left_pad must be a multiple of
  5278. pixel_stride or a multiple of 8; otherwise, left_pad may be any arbitrary value.
  5279. scanline_pad defines a multiple of bytes to which each scanline is padded; valid values are: 0
  5280. (not aligned), 1, 2, 4, 8, and 16. The total number of bits-per-scanline in the data stream includes:
  5281. left_pad, the image data (width x pixel_stride), and sufficient additional bits to satisfy
  5282. scanline_pad.
  5283.  
  5284. interleave describes how the image bands are interleaved (per pixel within a single plane, or sent
  5285. as three separate planes); if interleave is xieValBandByPixel, inter-band dimensions must
  5286. match: the widths and the heights of all bands must match. One of the following standard interleave
  5287. values can be assigned to interleave:
  5288.  
  5289. xieValBandByPixel
  5290. xieValBandByPlane
  5291.  
  5292. band_order is the order of the image bands or image planes as they are transmitted through the
  5293. protocol stream. band_order can be set to one of the standard orientation values. The least
  5294. significant band of trichromatic data is the first band mentioned in the common name of the
  5295. colorspace : red is the least significant band of RGB data. For band-by-pixel data, band_order
  5296. specifies whether this band is put in the least or most significant bits of a pixel:
  5297.  
  5298. LSFirst
  5299. MSFirst
  5300. B1B0G2G1G0R2R1R0
  5301. R2R1R0G2G1G0B1B0
  5302.  
  5303. For band-by-plane data, band_order specifies whether this band corresponds with the least
  5304. significant or most significant image plane. Each plane is transported as a separate data stream:
  5305.  
  5306. band
  5307. LSFirst
  5308. MSFirst
  5309. 0
  5310. R7R6R5R4R3R2R1R0
  5311. B7B6B5B4B3B2B1B0
  5312. 1
  5313. G7G6G5G4G3G2G1G0
  5314. G7G6G5G4G3G2G1G0
  5315. 2
  5316. B7B6B5B4B3B2B1B0
  5317. R7R6R5R4R3R2R1R0
  5318.  
  5319. Structures
  5320. XieTecDecodeUncompressedTriple sets the structure field fill_order to the value of the
  5321. argument fill_order; the structure field pixel_order to the value of the argument
  5322. pixel_order; the structure field band_order to the value of the argument band_order; the
  5323. structure field interleave to the value of the argument interleave; the structure field
  5324. pixel_stride to the value of the argument pixel_stride; the structure field left_pad to
  5325. the value of the argument left_pad; and the structure field scanline_pad to the value of the
  5326. argument scanline_pad.
  5327.  
  5328. typedef unsigned XieOrientation;
  5329. typedef unsigned XieInterleave;
  5330. typedef struct {
  5331.         unsigned char left_pad[3];
  5332.         XieOrientation fill_order;
  5333.         unsigned char pixel_stride[3];
  5334.         XieOrientation pixel_order;
  5335.         unsigned char scanline_pad[3];
  5336.         XieOrientation band_order;
  5337.         XieInterleave interleave;
  5338. } XieDecodeUncompressedTripleParam;
  5339.  
  5340. /* Definitions of Orientation Types */
  5341. #define xieValLSFirst   1
  5342. #define xieValMSFirst   2
  5343.  
  5344. /* Definitions for Interleave */
  5345. #define xieValBandByPixel       1
  5346. #define xieValBandByPlane       2
  5347. See Also
  5348. XieFloImportClientPhoto, XiePutClientData
  5349.  XIElib - Technique Functions   XieTecDecodeG31D
  5350. Name
  5351. XieTecDecodeG31D - allocate and fill an XieDecodeG31DParam structure
  5352. Syntax
  5353. XieDecodeG31DParam *XieTecDecodeG31D (encoded_order, normal,
  5354. radiometric)
  5355. XieOrientation encoded_order;
  5356. Bool normal;
  5357. Bool radiometric;
  5358. Arguments
  5359. encoded_order   Specifies the bit order of the encoded data.
  5360. normal  Specifies how the data was processed when it was originally encoded.
  5361. radiometric     Specifies how white runs are decoded.
  5362. Returns
  5363. The XieDecodeG31DParam structure.
  5364. Description
  5365. XieTecDecodeG31D allocates and returns a pointer to an XieDecodeG31DParam structure.
  5366. The returned structure represents the list of parameters required by the decode technique and may be
  5367. used as the decode_param argument of XieFloImportClientPhoto (when the
  5368. decode_tech argument is xieValDecodeG31D).
  5369.  
  5370. If insufficient memory is available, XieTecDecodeG31D returns NULL. To free the memory
  5371. allocated to this structure, use XFree.
  5372.  
  5373. CCITT-G31D is the CCITT group 3 one-dimensional encoding technique as defined by CCITT T.4,
  5374. "Standardization of Group 3 Facsimile Apparatus for Document Transmission".
  5375.  
  5376. encoded_order specifies the bit order of the encoded data. One of the following standard
  5377. orientation values can be assigned to encoded_order:
  5378.  
  5379. xieValLSFirst
  5380. xieValMSFirst
  5381.  
  5382. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  5383. 0, and the last is bit 7):
  5384.  
  5385. LSFirst
  5386. MSFirst
  5387. 76543210  76543210
  5388. 01234567  01234567
  5389.  
  5390. radiometric specifies that white runs in the encoded data should be represented as image ones
  5391. upon decode (maximum intensity), or conversely, they will be decoded as image zeros if
  5392. radiometric is False. normal specifies that the data was processed according to its normal fill-
  5393. order when it was originally encoded.
  5394. Structures
  5395. XieTecDecodeG31D sets the structure field encoded_order to the value of the argument
  5396. encoded_order; the structure field normal to the value of the argument normal; and the
  5397. structure field radiometric to the value of the argument radiometric.
  5398.  
  5399. typedef unsigned XieOrientation;
  5400. typedef struct {
  5401.         XieOrientation encoded_order;
  5402.         Bool normal;
  5403.         Bool radiometric;
  5404. } XieDecodeG31DParam;
  5405.  
  5406. /* Definitions of Orientation Types */
  5407. #define xieValLSFirst   1
  5408. #define xieValMSFirst   2
  5409. See Also
  5410. XieFloImportClientPhoto, XiePutClientData
  5411.  XIElib - Technique Functions   XieTecDecodeG32D
  5412. Name
  5413. XieTecDecodeG32D - allocate and fill an XieDecodeG32DParam structure
  5414. Syntax
  5415. XieDecodeG32DParam *XieTecDecodeG32D (encoded_order, normal,
  5416. radiometric)
  5417. XieOrientation encoded_order;
  5418. Bool normal;
  5419. Bool radiometric;
  5420. Arguments
  5421. encoded_order   Specifies the bit order of the encoded data.
  5422. normal  Specifies how the data was processed when it was originally encoded.
  5423. radiometric     Specifies how white runs are decoded.
  5424. Returns
  5425. The XieDecodeG32DParam structure.
  5426. Description
  5427. XieTecDecodeG32D allocates and returns a pointer to an XieDecodeG32DParam structure.
  5428. The returned structure represents the list of parameters required by the decode technique and may be
  5429. used as the decode_param argument of XieFloImportClientPhoto (when the
  5430. decode_tech argument is xieValDecodeG32D).
  5431.  
  5432. If insufficient memory is available, XieTecDecodeG32D returns NULL. To free the memory
  5433. allocated to this structure, use XFree.
  5434.  
  5435. CCITT-G32D is the CCITT group 3 two-dimensional encoding technique as defined by CCITT T.4,
  5436. "Standardization of Group 3 Facsimile Apparatus for Document Transmission".
  5437.  
  5438. encoded_order specifies the bit order of the encoded data. One of the following standard
  5439. orientation values can be assigned to encoded_order:
  5440.  
  5441. xieValLSFirst
  5442. xieValMSFirst
  5443.  
  5444. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  5445. 0,  and the last is bit 7):
  5446.  
  5447. LSFirst
  5448. MSFirst
  5449. 76543210  76543210
  5450. 01234567  01234567
  5451.  
  5452. radiometric specifies that white runs in the encoded data should be represented as image ones
  5453. upon decode (maximum intensity), or conversely, they will be decoded as image zeros if
  5454. radiometric is False. normal specifies that the data was processed according to its normal fill-
  5455. order when it was originally encoded.
  5456. Structures
  5457. XieTecDecodeG32D sets the structure field encoded_order to the value of the argument
  5458. encoded_order; the structure field normal to the value of the argument normal; and the
  5459. structure field radiometric to the value of the argument radiometric.
  5460.  
  5461. typedef unsigned XieOrientation;
  5462. typedef struct {
  5463.         XieOrientation encoded_order;
  5464.         Bool normal;
  5465.         Bool radiometric;
  5466. } XieDecodeG32DParam;
  5467.  
  5468. /* Definitions of Orientation Types */
  5469. #define xieValLSFirst   1
  5470. #define xieValMSFirst   2
  5471. See Also
  5472. XieFloImportClientPhoto, XiePutClientData
  5473.  XIElib - Technique Functions   XieTecDecodeG42D
  5474. Name
  5475. XieTecDecodeG42D - allocate and fill an XieDecodeG42DParam structure
  5476. Syntax
  5477. XieDecodeG42DParam *XieTecDecodeG42D (encoded_order, normal,
  5478. radiometric))
  5479. XieOrientation encoded_order;
  5480. Bool normal;
  5481. Bool radiometric;
  5482. Arguments
  5483. encoded_order   Specifies the bit order of the encoded data.
  5484. normal  Specifies how the data was processed when it was originally encoded.
  5485. radiometric     Specifies how white runs are decoded.
  5486. Returns
  5487. The XieDecodeG42DParam structure.
  5488. Description
  5489. XieTecDecodeG42D allocates and returns a pointer to an XieDecodeG42DParam structure.
  5490. The returned structure represents the list of parameters required by the decode technique and may be
  5491. used as the decode_param argument of XieFloImportClientPhoto (when the
  5492. decode_tech argument is xieValDecodeG42D).
  5493.  
  5494. If insufficient memory is available, XieTecDecodeG42D returns NULL. To free the memory
  5495. allocated to this structure, use XFree.
  5496.  
  5497. CCITT-G42D is the CCITT group 4 two-dimensional encoding technique as defined by CCITT T.6,
  5498. "Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus".
  5499.  
  5500. encoded_order specifies the bit order of the encoded data. One of the following standard
  5501. orientation values can be assigned to encoded_order:
  5502.  
  5503. xieValLSFirst
  5504. xieValMSFirst
  5505.  
  5506. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  5507. 0, and the last is bit 7):
  5508.  
  5509. LSFirst
  5510. MSFirst
  5511. 76543210  76543210
  5512. 01234567  01234567
  5513.  
  5514. radiometric specifies that white runs in the encoded data should be represented as image ones
  5515. upon decode (maximum intensity), or conversely, they will be decoded as image zeros if
  5516. radiometric is False. normal specifies that the data was processed according to its normal fill-
  5517. order when it was originally encoded.
  5518. Structures
  5519. XieTecDecodeG42D sets the structure field encoded_order to the value of the argument
  5520. encoded_order; the structure field normal to the value of the argument normal; and the
  5521. structure field radiometric to the value of the argument radiometric.
  5522.  
  5523. typedef unsigned XieOrientation;
  5524. typedef struct {
  5525.         XieOrientation encoded_order;
  5526.         Bool normal;
  5527.         Bool radiometric;
  5528. } XieDecodeG42DParam;
  5529.  
  5530. /* Definitions of Orientation Types */
  5531. #define xieValLSFirst   1
  5532. #define xieValMSFirst   2
  5533. See Also
  5534. XieFloImportClientPhoto, XiePutClientData
  5535.  XIElib - Technique Functions   XieTecDecodeTIFF2
  5536. Name
  5537. XieTecDecodeTIFF2 - allocate and fill an XieDecodeTIFF2Param structure
  5538. Syntax
  5539. XieDecodeTIFF2Param *XieTecDecodeTIFF2 (encoded_order, normal,
  5540. radiometric)
  5541. XieOrientation encoded_order;
  5542. Bool normal;
  5543. Bool radiometric;
  5544. Arguments
  5545. encoded_order   Specifies the bit order of the encoded data.
  5546. normal  Specifies how the data was processed when it was originally encoded.
  5547. radiometric     Specifies how white runs are decoded.
  5548. Returns
  5549. The XieDecodeTIFF2Param structure.
  5550. Description
  5551. XieTecDecodeTIFF2 allocates and returns a pointer to an XieDecodeTIFF2Param structure.
  5552. The returned structure represents the list of parameters required by the decode technique and may be
  5553. used as the decode_param argument of XieFloImportClientPhoto (when the
  5554. decode_tech argument is xieValDecodeTIFF2).
  5555.  
  5556. If insufficient memory is available, XieTecDecodeTIFF2 returns NULL. To free the memory
  5557. allocated to this structure, use XFree.
  5558.  
  5559. TIFF-2 is modified Huffman encoding as described in "TIFF Tag Image File Format", revision 6.0,
  5560. draft 2, by Aldus Corporation (TIFF compression scheme 2).
  5561.  
  5562. encoded_order specifies the bit order of the encoded data. One of the following standard
  5563. orientation values can be assigned to encoded_order:
  5564.  
  5565. xieValLSFirst
  5566. xieValMSFirst
  5567.  
  5568. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  5569. 0, and the last is bit 7):
  5570.  
  5571. LSFirst
  5572. MSFirst
  5573. 76543210  76543210
  5574. 01234567  01234567
  5575.  
  5576. radiometric specifies that white runs in the encoded data should be represented as image ones
  5577. upon decode (maximum intensity), or conversely, they will be decoded as image zeros if
  5578. radiometric is False. normal specifies that the data was processed according to its normal fill-
  5579. order when it was originally encoded.
  5580. Structures
  5581. XieTecDecodeTIFF2 sets the structure field encoded_order to the value of the argument
  5582. encoded_order; the structure field normal to the value of the argument normal; and the
  5583. structure field radiometric to the value of the argument radiometric.
  5584.  
  5585. typedef unsigned XieOrientation;
  5586. typedef struct {
  5587.         XieOrientation encoded_order;
  5588.         Bool normal;
  5589.         Bool radiometric;
  5590. } XieDecodeTIFF2Param;
  5591.  
  5592. /* Definitions of Orientation Types */
  5593. #define xieValLSFirst   1
  5594. #define xieValMSFirst   2
  5595. See Also
  5596. XieFloImportClientPhoto, XiePutClientData
  5597.  XIElib - Technique Functions   XieTecDecodeTIFFPackBits
  5598. Name
  5599. XieTecDecodeTIFFPackBits - allocate and fill an XieDecodeTIFFPackBitsParam structure
  5600. Syntax
  5601. XieDecodeTIFFPackBitsParam *XieTecDecodeTIFFPackBits (encoded_order,
  5602. normal)
  5603. XieOrientation encoded_order;
  5604. Bool normal;
  5605. Arguments
  5606. encoded_order   Specifies the bit order of the encoded data.
  5607. normal  Specifies how the data was processed when it was originally encoded.
  5608. Returns
  5609. The XieDecodeTIFFPackBitsParam structure.
  5610. Description
  5611. XieTecDecodeTIFFPackBits allocates and returns a pointer to an
  5612. XieDecodeTIFFPackBitsParam structure. The returned structure represents the list of
  5613. parameters required by the decode technique and may be used as the decode_param argument of
  5614. XieFloImportClientPhoto (when the decode_tech argument is
  5615. xieValDecodeTIFFPackBits).
  5616.  
  5617. If insufficient memory is available, XieTecDecodeTIFFPackBits returns NULL. To free the
  5618. memory allocated to this structure, use XFree.
  5619.  
  5620. TIFF-PackBits is byte-oriented run-length encoding as described in "TIFF Tag Image File Format",
  5621. revision 6.0, draft 2, by Aldus Corporation (TIFF compression scheme 32773).
  5622.  
  5623. encoded_order specifies the bit order of the encoded data. One of the following standard
  5624. orientation values can be assigned to encoded_order:
  5625.  
  5626. xieValLSFirst
  5627. xieValMSFirst
  5628.  
  5629. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  5630. 0, and the last is bit 7):
  5631.  
  5632. LSFirst
  5633. MSFirst
  5634. 76543210  76543210
  5635. 01234567  01234567
  5636.  
  5637. normal specifies that the data was processed according to its normal fill-order when it was
  5638. originally encoded.
  5639. Structures
  5640. XieTecDecodeTIFFPackBits sets the structure field encoded_order to the value of the
  5641. argument encoded_order and the structure field normal to the value of the argument normal.
  5642.  
  5643. typedef unsigned XieOrientation;
  5644. typedef struct {
  5645.         XieOrientation encoded_order;
  5646.         Bool normal;
  5647. } XieDecodeTIFFPackBitsParam;
  5648.  
  5649. /* Definitions of Orientation Types */
  5650. #define xieValLSFirst   1
  5651. #define xieValMSFirst   2
  5652. See Also
  5653. XieFloImportClientPhoto, XiePutClientData
  5654.  XIElib - Technique Functions   XieTecDecodeJPEGBaseline
  5655. Name
  5656. XieTecDecodeJPEGBaseline - allocate and fill an XieDecodeJPEGBaselineParam structure
  5657. Syntax
  5658. XieDecodeJPEGBaselineParam *XieTecDecodeJPEGBaseline (interleave,
  5659. band_order, up_sample)
  5660. XieInterleave interleave;
  5661. XieOrientation band_order;
  5662. Bool up_sample;
  5663. Arguments
  5664. interleave      Specifies how the image bands will be interleaved.
  5665. band_order      Specifies the order in which the image bands were originally encoded.
  5666. up_sample       Specifies how interleaved encoded data are up-sampled.
  5667. Returns
  5668. The XieTecDecodeJPEGBaselineParam structure.
  5669. Description
  5670. XieDecodeJPEGBaseline allocates and returns a pointer to an
  5671. XieDecodeJPEGBaselineParam structure. The returned structure represents the list of
  5672. parameters required by the decode technique and may be used as the decode_param argument of
  5673. XieFloImportClientPhoto (when the decode_tech argument is
  5674. xieValDecodeJPEGBaseline).
  5675.  
  5676. If insufficient memory is available, XieTecDecodeJPEGBaseline returns NULL. To free the
  5677. memory allocated to this structure, use XFree.
  5678.  
  5679. The JPEG baseline technique is the baseline Huffman DCT encoding technique that is defined in ISO
  5680. DIS 10918-1 "Digital Compression and Coding of Continuous-tone Still Images". Only JPEG
  5681. Interchange Format (JIF) is supported: all tables, compressed data, and so on are embedded in the
  5682. data stream, all delineated by markers.
  5683.  
  5684. interleave determines whether all bands of a triple band image will be interleaved within a single
  5685. encoded stream  or whether three separate encoded streams will be supplied. One of the following
  5686. standard interleave values can be assigned to interleave:
  5687.  
  5688. xieValBandByPixel
  5689. xieValBandByPlane
  5690.  
  5691. For triple band data, band_order specifies the order in which the image bands were originally
  5692. encoded.  One of the following standard orientation values can be assigned to band_order:
  5693.  
  5694. xieValLSFirst
  5695. xieValMSFirst
  5696.  
  5697. The least significant band of trichromatic data is the first band mentioned in the common name of the
  5698. colorspace: red is the least significant band of RGB data. band_order specifies whether this band
  5699. corresponds with the least significant or most significant image plane. Each plane is decoded into a
  5700. separate data stream:
  5701.  
  5702. band
  5703. LSFirst
  5704. MSFirst
  5705. 0
  5706. Red band
  5707. Blue band
  5708. 1
  5709. Green band
  5710. Green band
  5711. 2
  5712. Blue band
  5713. Red band
  5714.  
  5715. up_sample specifies that if any bands in an interleaved encoded data stream are down-sampled,
  5716. they should be up-sampled by the JPEG decoder.
  5717.  
  5718. The arguments interleave, band_order, and up_sample are ignored for single band images,
  5719. and up_sample is always ignored if interleave is band-by-plane. If up_sample is False and
  5720. some of the encoded bands of an interleaved image were down-sampled, an alternative method for up-
  5721. sampling the image would be to use a geometry element with appropriate band_mask and sample
  5722. technique parameters.
  5723. Structures
  5724. XieTecDecodeJPEGBaseline sets the structure field interleave to the value of the
  5725. argument interleave; the structure field band_order to the value of the argument
  5726. band_order; and the structure field up_sample to the value of the argument up_sample.
  5727.  
  5728. typedef unsigned XieOrientation;
  5729. typedef struct {
  5730.         XieInterleave interleave;
  5731.         XieOrientation band_order;
  5732.         Bool up_sample;
  5733. } XieDecodeJPEGBaselineParam;
  5734. /* Definitions for Interleave */
  5735. #define xieValBandByPixel       1
  5736. #define xieValBandByPlane       2
  5737.  
  5738. /* Definitions of Orientation Types */
  5739. #define xieValLSFirst   1
  5740. #define xieValMSFirst   2
  5741. See Also
  5742. XieFloImportClientPhoto, XieFloConvertToRGB, XieTecYCbCrToRGB, XiePutClientData
  5743.  XIElib - Technique Functions   XieTecDecodeJPEGLossless
  5744. Name
  5745. XieTecDecodeJPEGLossless - allocate and fill an XieDecodeJPEGLosslessParam structure
  5746. Syntax
  5747. XieDecodeJPEGLosslessParam *XieTecDecodeJPEGLossless (interleave,
  5748. band_order)
  5749. XieInterleave interleave;
  5750. XieOrientation band_order;
  5751. Arguments
  5752. interleave      Specifies how the image bands will be interleaved.
  5753. band_order      Specifies the order in which the image bands were originally encoded.
  5754. Returns
  5755. The XieDecodeJPEGLosslessParam structure.
  5756. Description
  5757. XieTecDecodeJPEGLossless allocates and returns a pointer to an
  5758. XieDecodeJPEGLosslessParam structure. The returned structure represents the list of
  5759. parameters required by the decode technique and may be used as the decode_param argument of
  5760. XieFloImportClientPhoto (when the decode_tech argument is
  5761. xieValDecodeJPEGLossless).
  5762.  
  5763. If insufficient memory is available, XieTecDecodeJPEGLossless returns NULL. To free the
  5764. memory allocated to this structure, use XFree.
  5765.  
  5766. The JPEG lossless technique is the Huffman predictive sequential lossless encoding technique that is
  5767. defined in ISO DIS 10918-1 "Digital Compression and Coding of Continuous-tone Still Images".
  5768. This technique is not available in the R6 sample implementation of XIE.
  5769.  
  5770. interleave describes how the bands of triple band data are interleaved; either all bands are
  5771. interleaved within a single encoded stream, or three separate encoded streams are expected. One of
  5772. the following standard interleave values can be assigned to interleave:
  5773.  
  5774. xieValBandByPixel
  5775. xieValBandByPlane
  5776.  
  5777. For triple band data, band_order specifies the order in which the image bands were originally
  5778. encoded. One of the following standard orientation values can be assigned to band_order:
  5779.  
  5780. xieValLSFirst
  5781. xieValMSFirst
  5782.  
  5783. The least significant band of trichromatic data is the first band mentioned in the common name of the
  5784. colorspace: red is the least significant band of RGB data. band_order specifies whether this band
  5785. corresponds with the least significant or most significant image plane. Each plane is decoded into a
  5786. separate data stream:
  5787.  
  5788. band
  5789. LSFirst
  5790. MSFirst
  5791. 0
  5792. Red band
  5793. Blue band
  5794. 1
  5795. Green band
  5796. Green band
  5797. 2
  5798. Blue band
  5799. Red band
  5800.  
  5801. The arguments interleave and band_order are ignored for single band images.
  5802. Structures
  5803. XieTecDecodeJPEGLossless sets the structure field interleave to the value of the
  5804. argument interleave; and the structure field band_order to the value of the argument
  5805. band_order.
  5806.  
  5807. typedef unsigned XieOrientation;
  5808. typedef struct {
  5809.         XieInterleave interleave;
  5810.         XieOrientation band_order;
  5811. } XieDecodeJPEGLosslessParam;
  5812. /* Definitions for Interleave */
  5813. #define xieValBandByPixel       1
  5814. #define xieValBandByPlane       2
  5815.  
  5816. /* Definitions of Orientation Types */
  5817. #define xieValLSFirst   1
  5818. #define xieValMSFirst   2
  5819. See Also
  5820. XieFloImportClientPhoto, XiePutClientData
  5821.  XIElib - Technique Functions   XieTecDitherOrdered
  5822. Name
  5823. XieTecDitherOrdered -  allocate and fill an XieDitherOrderedParam structure
  5824. Syntax
  5825. XieDitherOrderedParam *XieTecDitherOrdered (threshold_order)
  5826. unsigned int threshold_order;
  5827. Arguments
  5828. threshold_order Specifies a value to determine the size of the dither matrix.
  5829. Returns
  5830. The XieDitherOrderedParam structure.
  5831. Description
  5832. XieTecDitherOrdered allocates and returns a pointer to an XieDitherOrderedParam
  5833. structure. The returned structure represents the list of parameters required by the decode technique
  5834. and may be used as the decode_param argument of XieFloImportClientPhoto (when the
  5835. decode_tech argument is xieValDitherOrdered).
  5836.  
  5837. If insufficient memory is available, XieTecDitherOrdered returns NULL. To free the memory
  5838. allocated to this structure, use XFree.
  5839.  
  5840. The dispersed-dot ordered dither technique replaces a matrix, or block, of pixels with a patterned
  5841. matrix of pixels. This patterned matrix of pixels is applied across the entire image. Because these
  5842. patterns may introduce artifacts that are distracting to the eye, the threshold_order parameter is
  5843. available to determine the size of the dither matrix, and therefore, the number of levels that can be
  5844. simulated. If the value of threshold_order is m, the threshold matrix can simulate 2m + 1 levels.
  5845. Structures
  5846. XieTecDitherOrdered sets the structure field threshold_order to the value of the
  5847. argument threshold_order.
  5848.  
  5849. typedef struct {
  5850.         unsigned int threshold_order;
  5851. } XieDitherOrderedParam;
  5852. See Also
  5853. XieFloDither
  5854.  XIElib - Technique Functions   XieTecEncodeUncompressedSingle
  5855. Name
  5856. XieTecEncodeUncompressedSingle - allocate and fill an
  5857. XieEncodeUncompressedSingleParam structure
  5858. Syntax
  5859. XieEncodeUncompressedSingleParam *XieTecEncodeUncompressedSingle
  5860. (fill_order, pixel_order, pixel_stride, scanline_pad)
  5861. XieOrientation fill_order;
  5862. XieOrientation pixel_order;
  5863. unsigned int pixel_stride;
  5864. unsigned int scanline_pad;
  5865. Arguments
  5866. fill_order      Specifies the method of pixel packing.
  5867. pixel_order     Specifies pixel ordering within the data stream.
  5868. pixel_stride    Specifies the number of bits between consecutive pixels within a
  5869. scanline.
  5870. scanline_pad    Specifies a multiple of bytes to which each scanline is padded.
  5871. Returns
  5872. The XieEncodeUncompressedSingleParam structure.
  5873. Description
  5874. XieTecEncodeUncompressedSingle allocates and returns a pointer to an
  5875. XieEncodeUncompressedSingleParam structure. The returned structure represents the list of
  5876. parameters required by the encode technique and may be used as the encode_param argument of
  5877. XieFloExportClientPhoto and XieFloExportPhotomap (when the encode_tech
  5878. argument is xieValEncodeUncompressedSingle).
  5879.  
  5880. If insufficient memory is available, XieTecEncodeUncompressedSingle returns NULL. To
  5881. free the memory allocated to this structure, use XFree.
  5882.  
  5883. The encode uncompressed single technique is used when no compression scheme is to be applied to
  5884. single band image data. The parameters define the format of the data stream of uncompressed data
  5885. that is made available for client retrieval via XieGetClientData. When multiple pixels are put in
  5886. the same byte or a pixel spans multiple bytes, fill_order specifies whether the pixels (or parts of
  5887. pixels) are packed into the most or least significant bits of a byte first. For pixels that span a byte
  5888. boundary, pixel_order defines whether the most or least significant bits of the pixel are put first
  5889. within the data stream.
  5890.  
  5891. One of the following standard orientation values can be assigned to fill_order and
  5892. pixel_order:
  5893.  
  5894. xieValLSFirst
  5895. xieValMSFirst
  5896.  
  5897. The following table shows the relationship between fill_order and pixel_order, using two
  5898. 10-bit pixels, each with two bits of pad (within each pixel the LS-bits are 0 and a, the MS-bits are
  5899. 9 and j,  and the pad bits are p).
  5900.  
  5901. fill order
  5902. LSFirst (pixel order)
  5903. MSFirst (pixel order)
  5904. LSFirst
  5905. 76543210  dcbapp98  ppjihgfe
  5906. 98765432  jihgpp10  ppfedcba
  5907. MSFirst
  5908. 76543210  98ppdcba  jihgfepp
  5909. 98765432  10ppjihg  fedcbapp
  5910.  
  5911. pixel_stride is the number of bits between the start of consecutive pixels within a scanline. It
  5912. must be at least enough bits to contain the number of source levels. scanline_pad defines a
  5913. multiple of bytes to which each scanline is padded; valid values are: 0 (not aligned), 1, 2, 4, 8, and
  5914. 16.
  5915. Structures
  5916. XieTecEncodeUncompressedSingle sets the structure field fill_order to the value of the
  5917. argument fill_order; the structure field pixel_order to the value of the argument
  5918. pixel_order; the structure field pixel_stride to the value of the argument pixel_stride;
  5919. and the structure field scanline_pad to the value of the argument scanline_pad.
  5920.  
  5921. typedef unsigned XieOrientation;
  5922. typedef struct {
  5923.         XieOrientation fill_order;
  5924.         XieOrientation pixel_order;
  5925.         unsigned int pixel_stride;
  5926.         unsigned int scanline_pad;
  5927. } XieEncodeUncompressedSingleParam;
  5928.  
  5929. /* Definitions of Orientation Types */
  5930. #define xieValLSFirst   1
  5931. #define xieValMSFirst   2
  5932. See Also
  5933. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  5934.  XIElib - Technique Functions   XieTecEncodeUncompressedTriple
  5935. Name
  5936. XieTecEncodeUncompressedTriple - allocate and fill an
  5937. XieEncodeUncompressedTripleParam structure
  5938. Syntax
  5939. XieEncodeUncompressedTripleParam *XieTecEncodeUncompressedTriple
  5940. (fill_order, pixel_order, band_order, interleave,
  5941. pixel_stride, scanline_pad)
  5942. XieOrientation fill_order;
  5943. XieOrientation pixel_order;
  5944. XieOrientation band_order;
  5945. XieInterleave interleave;
  5946. unsigned char pixel_stride[3];
  5947. unsigned char scanline_pad[3];
  5948. Arguments
  5949. fill_order      Specifies the method of pixel packing.
  5950. pixel_order     Specifies pixel ordering within the data stream.
  5951. band_order      Specifies the order of the image data sent through the protocol stream.
  5952. interleave      Specifies how the image bands are interleaved.
  5953. pixel_stride    Specifies the number of bits between consecutive pixels within a
  5954. scanline.
  5955. scanline_pad    Specifies a multiple of bytes to which each scanline is padded.
  5956. Returns
  5957. The XieEncodeUncompressedTripleParam structure.
  5958. Description
  5959. XieTecEncodeUncompressedTriple allocates and returns a pointer to an
  5960. XieEncodeUncompressedTripleParam structure. The returned structure represents the list of
  5961. parameters required by the encode technique and may be used as the encode_param argument of
  5962. XieFloExportClientPhoto and XieFloExportPhotomap (when the encode_tech
  5963. argument is xieValEncodeUncompressedTriple).
  5964.  
  5965. If insufficient memory is available, XieTecEncodeUncompressedTriple returns NULL. To
  5966. free the memory allocated to this structure, use XFree.
  5967.  
  5968. The encode uncompressed triple technique is used when no compression scheme is to be applied to
  5969. triple band image data. The parameters define the format of the data stream of uncompressed data
  5970. that is made available for client retrieval via XieGetClientData. When multiple pixels are put in
  5971. the same byte or a pixel spans multiple bytes, fill_order specifies whether the pixels (or parts of
  5972. pixels) are packed into the most or least significant bits of a byte first. For pixels that span a byte
  5973. boundary, pixel_order defines whether the most or least significant bits of the pixel are put first
  5974. within the data stream.
  5975.  
  5976. One of the following standard orientation values can be assigned to fill_order and
  5977. pixel_order:
  5978.  
  5979. xieValLSFirst
  5980. xieValMSFirst
  5981.  
  5982. The following  table shows the relationship between fill_order and pixel_order, using two
  5983. 10-bit pixels, each with two bits of pad (within each pixel the LS-bits are 0 and a, the MS-bits are
  5984. 9 and j, and the pad bits are p)
  5985.  
  5986. fill order
  5987. LSFirst (pixel order)
  5988. MSFirst (pixel order)
  5989. LSFirst
  5990. 76543210  dcbapp98  ppjihgfe
  5991. 98765432  jihgpp10  ppfedcba
  5992. MSFirst
  5993. 76543210  98ppdcba  jihgfepp
  5994. 98765432  10ppjihg  fedcbapp
  5995.  
  5996. pixel_stride is the number of bits between the start of consecutive pixels within a scanline. It
  5997. must be at least enough bits to contain the number of source levels. scanline_pad defines a
  5998. multiple of bytes to which each scanline is padded; valid values are: 0 (not aligned), 1, 2, 4, 8, and
  5999. 16. band_order is the order of the image bands or image planes as they are transmitted through
  6000. the protocol stream. One of the following standard orientation values can be assigned to
  6001. band_order:
  6002.  
  6003. xieValLSFirst
  6004. xieValMSFirst
  6005.  
  6006. The least significant band of trichromatic data is the first band mentioned in the common name of the
  6007. colorspace: red is the least significant band of RGB data. For band-by-pixel data, band_order
  6008. specifies whether this band is put in the least or most significant bits of a pixel:
  6009.  
  6010. LSFirst
  6011. MSFirst
  6012. B1B0G2G1G0R2R1R0
  6013. R2R1R0G2G1G0B1B0
  6014.  
  6015. For band-by-plane data, band_order specifies whether this band corresponds with the least
  6016. significant or most significant image plane. Each plane is transported as a separate data stream:
  6017.  
  6018. band
  6019. LSFirst
  6020. MSFirst
  6021. 0
  6022. R7R6R5R4R3R2R1R0
  6023. B7B6B5B4B3B2B1B0
  6024. 1
  6025. G7G6G5G4G3G2G1G0
  6026. G7G6G5G4G3G2G1G0
  6027. 2
  6028. B7B6B5B4B3B2B1B0
  6029. R7R6R5R4R3R2R1R0
  6030.  
  6031. interleave describes how the bands are interleaved (per pixel within a single plane, or sent as
  6032. three separate planes). One of the following standard interleave values can be assigned to
  6033. interleave:
  6034.  
  6035. xieValBandByPixel
  6036. xieValBandByPlane
  6037.  
  6038. Export of down-sampled band-by-pixel data is not supported: all bands must have equal widths and
  6039. equal heights.
  6040. Structures
  6041. XieTecEncodeUncompressedTriple sets the structure field fill_order to the value of the
  6042. argument fill_order; the structure field pixel_order to the value of the argument
  6043. pixel_order; the structure field band_order to the value of the argument band_order; the
  6044. structure field interleave to the value of the argument interleave; the structure field
  6045. pixel_stride to the value of the argument pixel_stride; and the structure field
  6046. scanline_pad to the value of the argument scanline_pad.
  6047.  
  6048. typedef unsigned XieOrientation;
  6049. typedef struct {
  6050.         unsigned char pixel_stride[3];
  6051.         XieOrientation pixel_order;
  6052.         unsigned char scanline_pad[3];
  6053.         XieOrientation fill_order;
  6054.         XieOrientation band_order;
  6055.         XieInterleave interleave;
  6056. } XieEncodeUncompressedTripleParam;
  6057.  
  6058. /* Definitions of Orientation Types */
  6059. #define xieValLSFirst   1
  6060. #define xieValMSFirst   2
  6061.  
  6062. /* Definitions for Interleave */
  6063. #define xieValBandByPixel       1
  6064. #define xieValBandByPlane       2
  6065. See Also
  6066. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6067.  XIElib - Technique Functions   XieTecEncodeG31D
  6068. Name
  6069. XieTecEncodeG31D - allocate and fill an XieEncodeG31DParam structure
  6070. Syntax
  6071. XieEncodeG31DParam *XieTecEncodeG31D (align_eol, radiometric,
  6072. encoded_order)
  6073. Bool align_eol;
  6074. Bool radiometric;
  6075. XieOrientation encoded_order;
  6076. Arguments
  6077. align_eol       Specifies the use of fill bits preceding EOL codes.
  6078. radiometric     Specifies how white runs are encoded.
  6079. encoded_order   Specifies the bit order of the encoded data.
  6080. Returns
  6081. The XieEncodeG31DParam structure.
  6082. Description
  6083. XieTecEncodeG31D allocates and returns a pointer to an XieEncodeG31DParam structure.
  6084. The returned structure represents the list of parameters required by the encode technique and may be
  6085. used as the encode_param argument of XieFloExportClientPhoto and
  6086. XieFloExportPhotomap (when the encode_tech argument is xieValEncodeG31D).
  6087.  
  6088. If insufficient memory is available, XieTecEncodeG31D returns NULL. To free the memory
  6089. allocated to this structure, use XFree.
  6090.  
  6091. CCITT-G31D is the CCITT group 3 one-dimensional encoding technique as defined by CCITT T.4,
  6092. "Standardization of Group 3 Facsimile Apparatus for Document Transmission".
  6093.  
  6094. If True, align_eol, specifies that sufficient fill bits must precede EOL codes to guarantee that
  6095. each EOL will end on a byte boundary (thus EOL will be a nibble of zero followed by a byte of one:
  6096. xxxx,00002 0000,00012). radiometric specifies that image ones will be encoded as white runs,
  6097. or conversely, image zeros will be encoded as white runs, if radiometric is False.
  6098. encoded_order specifies the bit order for the encoded data. One of the following standard
  6099. orientation values can be assigned to encoded_order:
  6100.  
  6101. xieValLSFirst
  6102. xieValMSFirst
  6103.  
  6104. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  6105. 0, and the last is bit 7):
  6106.  
  6107. LSFirst
  6108. MSFirst
  6109. 76543210  76543210
  6110. 01234567  01234567
  6111. Structures
  6112. XieTecEncodeG31D sets the structure field align_eol to the value of the argument
  6113. align_eol; the structure field radiometric to the value of the argument radiometric; and
  6114. the structure field encoded_order to the value of the argument encoded_order.
  6115.  
  6116. typedef unsigned XieOrientation;
  6117. typedef struct {
  6118.         Bool align_eol;
  6119.         Bool radiometric;
  6120.         XieOrientation encoded_order;
  6121. } XieEncodeG31DParam;
  6122.  
  6123. /* Definitions of Orientation Types */
  6124. #define xieValLSFirst   1
  6125. #define xieValMSFirst   2
  6126. See Also
  6127. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6128.  XIElib - Technique Functions   XieTecEncodeG32D
  6129. Name
  6130. XieTecEncodeG32D - allocate and fill an XieEncodeG32DParam structure
  6131. Syntax
  6132. XieEncodeG32DParam *XieTecEncodeG32D (uncompressed, align_eol,
  6133. radiometric, encoded_order, k_factor)
  6134. Bool uncompressed;
  6135. Bool align_eol;
  6136. Bool radiometric;
  6137. XieOrientation encoded_order;
  6138. unsigned long k_factor;
  6139. Arguments
  6140. uncompressed    Specifies the use of the uncompressed-mode CCITT extension.
  6141. align_eol       Specifies the use of fill bits preceding EOL codes.
  6142. radiometric     Specifies how white runs are encoded.
  6143. encoded_order   Specifies the bit order of the encoded data.
  6144. k_factor        Specifies the number of  two-dimensional scanlines to produce for
  6145. each  one-dimensional scanline.
  6146. Returns
  6147. The XieEncodeG32DParam structure.
  6148. Description
  6149. XieTecEncodeG32D allocates and returns a pointer to an XieEncodeG32DParam structure.
  6150. The returned structure represents the list of parameters required by the encode technique and may be
  6151. used as the encode_param argument of XieFloExportClientPhoto and
  6152. XieFloExportPhotomap (when the encode_tech argument is xieValEncodeG32D).
  6153.  
  6154. If insufficient memory is available, XieTecEncodeG32D returns NULL. To free the memory
  6155. allocated to this structure, use XFree.
  6156.  
  6157. CCITT-G32D is the CCITT group 3 two-dimensional encoding technique as defined by CCITT T.4,
  6158. "Standardization of Group 3 Facsimile Apparatus for Document Transmission".
  6159.  
  6160. If True, uncompressed, will enable the use of the uncompressed-mode CCITT extension. If
  6161. True, align_eol, specifies that sufficient fill bits must precede EOL codes to guarantee that each
  6162. EOL will end on a byte boundary (thus EOL will be a nibble of zero followed by a byte of  one:
  6163. xxxx,00002 0000,00012). radiometric specifies that image ones will be encoded as white runs,
  6164. or conversely, image zeros will be encoded as white runs, if radiometric is False.
  6165. encoded_order specifies the bit order for the encoded data.  One of the following standard
  6166. orientation values can be assigned to encoded_order:
  6167.  
  6168. xieValLSFirst
  6169. xieValMSFirst
  6170.  
  6171. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  6172. 0, and the last is bit 7):
  6173.  
  6174. LSFirst
  6175. MSFirst
  6176. 76543210  76543210
  6177. 01234567  01234567
  6178.  
  6179. k_factor specifies the number of  two-dimensional scanlines to produce for each one-dimensional
  6180. scanline.
  6181. Structures
  6182. XieTecEncodeG32D sets the structure field uncompressed to the value of the argument
  6183. uncompressed; the structure field align_eol to the value of the argument align_eol; the
  6184. structure field radiometric to the value of the argument radiometric; the structure field
  6185. encoded_order to the value of the argument encoded_order; and the structure field
  6186. k_factor to the value of the argument k_factor.
  6187.  
  6188. typedef unsigned XieOrientation;
  6189. typedef struct {
  6190.         Bool uncompressed;
  6191.         Bool align_eol;
  6192.         Bool radiometric;
  6193.         XieOrientation encoded_order;
  6194.         unsigned long k_factor;
  6195. } XieEncodeG32DParam;
  6196.  
  6197. /* Definitions of Orientation Types */
  6198. #define xieValLSFirst   1
  6199. #define xieValMSFirst   2
  6200. See Also
  6201. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6202.  XIElib - Technique Functions   XieTecEncodeG42D
  6203. Name
  6204. XieTecEncodeG42D - allocate and fill an XieEncodeG42DParam structure
  6205. Syntax
  6206. XieEncodeG42DParam *XieTecEncodeG42D (uncompressed, radiometric,
  6207. encoded_order)
  6208. Bool uncompressed;
  6209. Bool radiometric;
  6210. XieOrientation encoded_order;
  6211. Arguments
  6212. uncompressed    Specifies the use of the uncompressed-mode CCITT extension.
  6213. radiometric     Specifies how white runs are encoded.
  6214. encoded_order   Specifies the bit order of the encoded data.
  6215. Returns
  6216. The XieEncodeG42DParam structure.
  6217. Description
  6218. XieTecEncodeG42D allocates and returns a pointer to an XieEncodeG42DParam structure.
  6219. The returned structure represents the list of parameters required by the encode technique and may be
  6220. used as the encode_param argument of XieFloExportClientPhoto and
  6221. XieFloExportPhotomap (when the encode_tech argument is xieValEncodeG42D).
  6222.  
  6223. If insufficient memory is available, XieTecEncodeG42D returns NULL. To free the memory
  6224. allocated to this structure, use XFree.
  6225.  
  6226. CCITT-G42D is the CCITT group 4 two-dimensional encoding technique as defined by CCITT T.6,
  6227. "Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus".
  6228.  
  6229. If True, uncompressed will enable the use of the uncompressed-mode CCITT extension.
  6230. radiometric specifies that image ones will be encoded as white runs, or conversely, image zeros
  6231. will be encoded as white runs, if radiometric is False. encoded_order specifies the bit
  6232. order for the encoded data.  One of the following standard orientation values can be assigned to
  6233. encoded_order:
  6234.  
  6235. xieValLSFirst
  6236. xieValMSFirst
  6237.  
  6238. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  6239. 0, and the last is bit 7):
  6240.  
  6241. LSFirst
  6242. MSFirst
  6243. 76543210  76543210
  6244. 01234567  01234567
  6245. Structures
  6246. XieTecEncodeG42D sets the structure field uncompressed to the value of the argument
  6247. uncompressed; the structure field radiometric to the value of the argument radiometric;
  6248. and the structure field encoded_order to the value of the argument encoded_order.
  6249.  
  6250. typedef unsigned XieOrientation;
  6251. typedef struct {
  6252.         Bool uncompressed;
  6253.         Bool radiometric;
  6254.         XieOrientation encoded_order;
  6255. } XieEncodeG42DParam;
  6256.  
  6257. /* Definitions of Orientation Types */
  6258. #define xieValLSFirst   1
  6259. #define xieValMSFirst   2
  6260. See Also
  6261. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6262.  XIElib - Technique Functions   XieTecEncodeServerChoice
  6263. Name
  6264. XieTecEncodeServerChoice - allocate and fill an XieEncodeServerChoiceParam structure
  6265. Syntax
  6266. XieEncodeServerChoiceParam *XieTecEncodeServerChoice (preference)
  6267. unsigned int preference;
  6268. Arguments
  6269. preference      Specifies a hint to help the server make its choice.
  6270. Returns
  6271. The XieEncodeServerChoiceParam structure.
  6272. Description
  6273. XieTecEncodeServerChoice allocates and returns a pointer to an
  6274. XieEncodeServerChoiceParam structure. The returned structure represents the list of
  6275. parameters required by the encode technique and may be used as the encode_param argument of
  6276. XieFloExportPhotomap (when the encode_tech argument is
  6277. xieValEncodeServerChoice).
  6278.  
  6279. If insufficient memory is available, XieTecEncodeServerChoice returns NULL. To free the
  6280. memory allocated to this structure, use XFree.
  6281.  
  6282. The server choice technique allows the server to choose an encode technique when exporting to a
  6283. photomap. A photomap is a server resource that can be used to store image data. preference
  6284. specifies an optional hint that can be provided to help the server make its choice, but the server is
  6285. not obligated to obey the hint. One of the following standard server choice preference values can be
  6286. assigned to preference:
  6287.  
  6288. xieValPreferDefault
  6289. xieValPreferSpace
  6290. xieValPreferTime
  6291.  
  6292. xieValPreferTime hints that retrieval performance is the desired metric, whereas
  6293. xieValPreferSpace indicates that frugal use of storage space is more important. Normally the
  6294. server choice technique must choose a lossless encode technique, but when data is received from an
  6295. adjacent upstream import element, it may choose to pass the import elements input data directly to
  6296. the photomap.
  6297. Structures
  6298. XieTecEncodeServerChoice sets the structure field preference to the value of the
  6299. argument preference.
  6300.  
  6301. typedef struct {
  6302.         unsigned int preference;
  6303. } XieEncodeServerChoiceParam;
  6304.  
  6305. /* Definitions for ServerChoice Preference Hints */
  6306. #define xieValPreferDefault     0
  6307. #define xieValPreferSpace       1
  6308. #define xieValPreferTime        2
  6309. See Also
  6310. XieFloExportPhotomap
  6311.  XIElib - Technique Functions   XieTecEncodeJPEGBaseline
  6312. Name
  6313. XieTecEncodeJPEGBaseline - allocate and fill an XieEncodeJPEGBaselineParam structure
  6314. Syntax
  6315. XieEncodeJPEGBaselineParam *XieTecEncodeJPEGBaseline (interleave,
  6316. band_order, horizontal_samples, vertical_samples,
  6317. q_table, q_size, ac_table, ac_size, dc_table, dc_size)
  6318. XieInterleave interleave;
  6319. XieOrientation band_order;
  6320. unsigned char horizontal_samples[3];
  6321. unsigned char vertical_samples[3];
  6322. char *q_table;
  6323. unsigned int q_size;
  6324. char *ac_table;
  6325. unsigned int ac_size;
  6326. char *dc_table;
  6327. unsigned int dc_size;
  6328. Arguments
  6329. interleave      Specifies how the image bands will be interleaved.
  6330. band_order      Specifies the order in which the image bands were originally encoded.
  6331. horizontal_samples      Specifies the horizontal sampling factor.
  6332. vertical_samples        Specifies the vertical sampling factor.
  6333. q_table Specifies the quantization table.
  6334. q_size  Specifies the number of elements in q_table.
  6335. ac_table        Specifies the AC Huffman table.
  6336. ac_size Specifies the number of elements in ac_table.
  6337. dc_table        Specifies the DC Huffman table.
  6338. dc_size Specifies the number of elements in dc_table.
  6339. Returns
  6340. The XieEncodeJPEGBaselineParam structure.
  6341. Description
  6342. XieTecEncodeJPEGBaseline allocates and returns a pointer to an
  6343. XieEncodeJPEGBaselineParam structure. The returned structure represents the list of
  6344. parameters required by the encode technique and may be used as the encode_param argument of
  6345. XieFloExportClientPhoto and XieFloExportPhotomap (when the encode_tech
  6346. argument is xieValEncodeJPEGBaseline).
  6347.  
  6348. If insufficient memory is available, XieTecEncodeJPEGBaseline returns NULL.
  6349. XieTecEncodeJPEGBaseline allocates memory for the structure fields q_table,
  6350. ac_table, and dc_table; to free the memory allocated to the structure
  6351. XieEncodeJPEGBaselineParam, use XieFreeEncodeJPEGBaseline.
  6352.  
  6353. JPEG-Baseline is baseline Huffman DCT encoding as defined by ISO DIS 10918-1 "Digital
  6354. Compression and Coding of Continuous-tone Still Images". A stream of JPEG Interchange Format
  6355. (JIF) data is produced: all tables, compressed data, and so on are embedded in the data stream, all
  6356. delineated by markers.
  6357.  
  6358. For optimal results, clients should ensure that the colorspace of triple band image data flowing into
  6359. ExportClientPhoto or ExportPhotomap, for encoding by the JPEGBaseline encoder, is YCbCr.
  6360.  
  6361. interleave determines whether all bands of a triple band image will be interleaved within a single
  6362. encoded stream or whether three separate encoded streams will be produced. One of the following
  6363. standard interleave values can be assigned to interleave:
  6364.  
  6365. xieValBandByPixel
  6366. xieValBandByPlane
  6367.  
  6368. For triple band data, band_order specifies the order in which the image bands were originally
  6369. encoded. One of the following standard orientation values can be assigned to band_order:
  6370.  
  6371. xieValLSFirst
  6372. xieValMSFirst
  6373.  
  6374. The least significant band of trichromatic data is the first band mentioned in the common name of the
  6375. colorspace: red is the least significant band of RGB data. band_order specifies whether this band
  6376. corresponds with the least significant or most significant image plane. Each plane is encoded from a
  6377. separate data stream:
  6378.  
  6379. band
  6380. LSFirst
  6381. MSFirst
  6382. 0
  6383. Red band
  6384. Blue band
  6385. 1
  6386. Green band
  6387. Green band
  6388. 2
  6389. Blue band
  6390. Red band
  6391.  
  6392. The arguments horizontal_samples and vertical_samples are the horizontal and vertical
  6393. sampling factors. q_table is the quantization table. ac_table specifies the AC Huffman table
  6394. and dc_table specifies the DC Huffman table.
  6395.  
  6396. There may be one q_table per band or a single q_table shared between all bands. Generally
  6397. there is a single AC/DC pair of Huffman tables, but for triple band band-by-pixel data there may be
  6398. two pairs of tables (one for the luminance band and the other for the chromanance bands). If any table
  6399. is specified with zero length, it indicates that the server implementor is to supply that table (for
  6400. example, the example tables defined in ISO DIS 10918-1 "Digital Compression and Coding of
  6401. Continuous-tone Still Images").
  6402.  
  6403. The arguments interleave, band_order, horizontal_samples, and
  6404. vertical_samples are ignored for single band images, and horizontal_samples and
  6405. vertical_samples are always ignored if interleave is band-by-plane.
  6406. horizontal_samples and vertical_samples share the definitions and restrictions
  6407. stipulated for parameters Hi and Vi, respectively, that are specified in annexes A and B of ISO DIS
  6408. 10918-1 "Digital Compression and Coding of Continuous-tone Still Images".
  6409. Structures
  6410. XieTecEncodeJPEGBaseline sets the structure field interleave to the value of the
  6411. argument interleave; the structure field band_order to the value of the argument
  6412. band_order; the structure field horizontal_sample to the values of the argument
  6413. horizontal_sample; the structure field vertical_sample to the values of the argument
  6414. vertical_sample; and the structure fields q_table, q_size, ac_table, ac_size,
  6415. dc_table, dc_size to the values of the arguments q_table, q_size, ac_table,
  6416. ac_size, dc_table, dc_size.
  6417.  
  6418. typedef unsigned XieOrientation;
  6419. typedef struct {
  6420.         XieInterleave interleave;
  6421.         XieOrientation band_order;
  6422.         unsigned char horizontal_samples[3];
  6423.         unsigned char vertical_samples[3];
  6424.         char *q_table;
  6425.         unsigned int q_size;
  6426.         char *ac_table;
  6427.         unsigned int ac_size;
  6428.         char *dc_table;
  6429.         unsigned int dc_size;
  6430. } XieEncodeJPEGBaselineParam;
  6431.  
  6432. /* Definitions for Interleave */
  6433. #define xieValBandByPixel       1
  6434. #define xieValBandByPlane       2
  6435.  
  6436. /* Definitions of Orientation Types */
  6437. #define xieValLSFirst   1
  6438. #define xieValMSFirst   2
  6439. See Also
  6440. XieFloExportClientPhoto, XieFloExportPhotomap, XieFreeEncodeJPEGBaseline,
  6441. XieFloConvertFromRGB, XieTecRGBToYCbCr, XieGetClientData
  6442.  XIElib - Technique Functions   XieTecEncodeJPEGLossless
  6443. Name
  6444. XieTecEncodeJPEGLossless - allocate and fill an XieEncodeJPEGLosslessParam structure
  6445. Syntax
  6446. XieEncodeJPEGLosslessParam *XieTecEncodeJPEGLossless (interleave,
  6447. band_order, predictor, table, table_size)
  6448. XieInterleave interleave;
  6449. XieOrientation band_order;
  6450. unsigned char predictor[3];
  6451. char *table;
  6452. unsigned int table_size;
  6453. Arguments
  6454. interleave      Specifies how the image bands will be interleaved.
  6455. band_order      Specifies the order in which the image bands were originally encoded.
  6456. predictor       Specifies the predictor selection value.
  6457. table   Specifies the lossless entropy encoding table.
  6458. table_size      Specifies the number of elements in table.
  6459. Returns
  6460. The XieEncodeJPEGLosslessParam structure.
  6461. Description
  6462. XieTecEncodeJPEGLossless allocates and returns a pointer to an
  6463. XieEncodeJPEGLosslessParam structure. The returned structure represents the list of
  6464. parameters required by the encode technique and may be used as the encode_param argument of
  6465. XieFloExportClientPhoto and XieFloExportPhotomap (when the encode_tech
  6466. argument is xieValEncodeJPEGLossless).
  6467.  
  6468. If insufficient memory is available, XieTecEncodeJPEGLossless returns NULL.
  6469. XieTecEncodeJPEGLossless allocates memory for the structure field table; to free the
  6470. memory allocated to the structure XieEncodeJPEGLosslessParam, use
  6471. XieFreeEncodeJPEGLossless.
  6472.  
  6473. JPEG-Lossless, corresponds to frames encoded using Huffman, predictive sequential lossless
  6474. encoding as defined by ISO DIS 10918-1 "Digital Compression and Coding of Continuous-tone Still
  6475. Images". A data stream of JPEG Interchange Format (JIF) data is returned: all tables, compressed
  6476. data, and so on are embedded in the data stream, all delineated by markers.
  6477. This technique is not available in the R6 sample implementation of XIE.
  6478.  
  6479.  
  6480. interleave determines whether all bands of a triple band image will be interleaved within a single
  6481. encoded stream or whether three separate encoded streams will be produced. One of the following
  6482. standard interleave values can be assigned to interleave:
  6483.  
  6484. xieValBandByPixel
  6485. xieValBandByPlane
  6486.  
  6487. For triple band data, band_order specifies the order in which the image bands were originally
  6488. encoded.  One of the following standard orientation values can be assigned to band_order:
  6489.  
  6490. xieValLSFirst
  6491. xieValMSFirst
  6492.  
  6493. The least significant band of trichromatic data is the first band mentioned in the common name of the
  6494. colorspace: red is the least significant band of RGB data. band_order specifies whether this band
  6495. corresponds with the least significant or most significant image plane. Each plane is encoded from a
  6496. separate data stream:
  6497.  
  6498. band
  6499. LSFirst
  6500. MSFirst
  6501. 0
  6502. Red band
  6503. Blue band
  6504. 1
  6505. Green band
  6506. Green band
  6507. 2
  6508. Blue band
  6509. Red band
  6510.  
  6511. The arguments interleave and band_order are ignored for single band images.
  6512.  
  6513. predictor is the predictor selection value (one per band). table is the lossless entropy encoding
  6514. table (up to one per band). Specifying a table of length zero indicates that the server implementor
  6515. should supply a table (for example, the example tables defined in ISO DIS 10918-1 "Digital
  6516. Compression and Coding of Continuous-Tone Still Images").
  6517.  
  6518. Structures
  6519. XieTecEncodeJPEGLossless sets the structure field interleave to the value of the
  6520. argument interleave; the structure field band_order to the value of the argument
  6521. band_order; the structure field predictor to the values of the argument predictor; and the
  6522. structure fields table, table_size to the values of the arguments table, table_size.
  6523.  
  6524. typedef unsigned XieOrientation;
  6525. typedef struct {
  6526.         XieInterleave interleave;
  6527.         XieOrientation band_order;
  6528.         unsigned char predictor[3];
  6529.         char *table;
  6530.         unsigned int table_size;
  6531. } XieEncodeJPEGLosslessParam;
  6532. /* Definitions for Interleave */
  6533. #define xieValBandByPixel       1
  6534. #define xieValBandByPlane       2
  6535.  
  6536. /* Definitions of Orientation Types */
  6537. #define xieValLSFirst   1
  6538. #define xieValMSFirst   2
  6539. See Also
  6540. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6541.  XIElib - Technique Functions   XieTecEncodeTIFF2
  6542. Name
  6543. XieTecEncodeTIFF2 - allocate and fill an XieEncodeTIFF2Param structure
  6544. Syntax
  6545. XieEncodeTIFF2Param *XieTecEncodeTIFF2 (encoded_order, radiometric)
  6546. XieOrientation encoded_order;
  6547. Bool radiometric;
  6548. Arguments
  6549. encoded_order   Specifies the bit order of the encoded data.
  6550. radiometric     Specifies how white runs are decoded.
  6551. Returns
  6552. The XieEncodeTIFF2Param structure.
  6553. Description
  6554. XieTecEncodeTIFF2 allocates and returns a pointer to an XieEncodeTIFF2Param structure.
  6555. The returned structure represents the list of parameters required by the encode technique and may be
  6556. used as the encode_param argument of XieFloExportClientPhoto and
  6557. XieFloExportPhotomap (when the encode_tech argument is xieValEncodeTIFF2).
  6558.  
  6559. If insufficient memory is available, XieTecEncodeTIFF2 returns NULL. To free the memory
  6560. allocated to this structure, use XFree.
  6561.  
  6562. TIFF-2 is modified Huffman compression as described in "TIFF Tag Image File Format", revision
  6563. 6.0, draft 2, by Aldus Corporation (TIFF compression scheme 2).
  6564.  
  6565. radiometric specifies that image ones will be encoded as white runs, or conversely, image zeros
  6566. will be encoded as white runs, if radiometric is False. encoded_order specifies the bit
  6567. order for the encoded data. One of the following standard orientation values can be assigned to
  6568. encoded_order:
  6569.  
  6570. xieValLSFirst
  6571. xieValMSFirst
  6572.  
  6573. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  6574. 0, and the last is bit 7):
  6575.  
  6576. LSFirst
  6577. MSFirst
  6578. 76543210  76543210
  6579. 01234567  01234567
  6580. Structures
  6581. XieTecEncodeTIFF2 sets the structure field encoded_order to the value of the argument
  6582. encoded_order; and the structure field radiometric to the value of the argument
  6583. radiometric.
  6584.  
  6585. typedef unsigned XieOrientation;
  6586. typedef struct {
  6587.         XieOrientation encoded_order;
  6588.         Bool radiometric;
  6589. } XieEncodeTIFF2Param;
  6590.  
  6591. /* Definitions of Orientation Types */
  6592. #define xieValLSFirst   1
  6593. #define xieValMSFirst   2
  6594. See Also
  6595. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6596.  XIElib - Technique Functions   XieTecEncodeTIFFPackBits
  6597. Name
  6598. XieTecEncodeTIFFPackBits - allocate and fill an XieEncodeTIFFPackBitsParam structure
  6599. Syntax
  6600. XieEncodeTIFFPackBitsParam *XieTecEncodeTIFFPackBits (encoded_order)
  6601. XieOrientation encoded_order;
  6602. Arguments
  6603. encoded_order   Specifies the bit order of the encoded data.
  6604. Returns
  6605. The XieEncodeTIFFPackBitsParam structure.
  6606. Description
  6607. XieTecEncodeTIFFPackBits allocates and returns a pointer to an
  6608. XieEncodeTIFFPackBitsParam structure. The returned structure represents the list of
  6609. parameters required by the encode technique and may be used as the encode_param argument of
  6610. XieFloExportClientPhoto and XieFloExportPhotomap (when the encode_tech
  6611. argument is xieValEncodeTIFFPackBits).
  6612.  
  6613. If insufficient memory is available, XieTecEncodeTIFFPackBits returns NULL. To free the
  6614. memory allocated to this structure, use XFree.
  6615.  
  6616. TIFF-PackBits is byte-oriented run-length encoding as described in "TIFF Tag Image File Format",
  6617. revision 6.0, draft 2, by Aldus Corporation  (TIFF compression scheme 32773).
  6618.  
  6619. encoded_order specifies the bit order of the encoded data. One of the following standard
  6620. orientation values can be assigned to encoded_order:
  6621.  
  6622. xieValLSFirst
  6623. xieValMSFirst
  6624.  
  6625. The following table shows the encoded bit order of two bytes (within each byte the first encoded bit is
  6626. 0, and the last is bit 7):
  6627.  
  6628. LSFirst
  6629. MSFirst
  6630. 76543210  76543210
  6631. 01234567  01234567
  6632. Structures
  6633. XieTecEncodeTIFFPackBits sets the structure field encoded_order to the value of the
  6634. argument encoded_order.
  6635.  
  6636. typedef unsigned XieOrientation;
  6637. typedef struct {
  6638.         XieOrientation encoded_order;
  6639. } XieEncodeTIFFPackBitsParam;
  6640.  
  6641. /* Definitions of Orientation Types */
  6642. #define xieValLSFirst   1
  6643. #define xieValMSFirst   2
  6644. See Also
  6645. XieFloExportClientPhoto, XieFloExportPhotomap, XieGetClientData
  6646.  XIElib - Technique Functions   XieTecGeomAntialiasByArea
  6647. Name
  6648. XieTecGeomAntialiasByArea - allocate and fill an XieGeomAntialiasByAreaParam structure
  6649. Syntax
  6650. XieGeomAntialiasByAreaParam *XieTecGeomAntialiasByArea (simple)
  6651. int simple;
  6652. Arguments
  6653. simple  Specifies the approximation form to use.
  6654. Returns
  6655. The XieGeomAntialiasByAreaParam structure.
  6656. Description
  6657. XieTecGeomAntialiasByArea allocates and returns a pointer to an
  6658. XieGeomAntialiasByAreaParam structure. The returned structure represents the list of
  6659. parameters required by the geometry technique and may be used as the sample_param argument of
  6660. XieFloGeometry (when the sample_tech argument is xieValGeomAntialiasByArea).
  6661.  
  6662. If insufficient memory is available, XieTecGeomAntialiasByArea returns NULL. To free the
  6663. memory allocated to this structure, use XFree.
  6664.  
  6665. Antialiasing techniques incorporate information from an "area" of pixels in the input image in order
  6666. to produce each output pixel. This implies that line dropouts and other artifacts will occur less often,
  6667. and the output image may have markedly better resemblance to the input image. The technique
  6668. AntialiasByArea computes the output image by assigning to each output pixel the weighted average of
  6669. the intensity values of input pixels that fall within its area. That is, the four corners of the output
  6670. pixel are projected back onto the input image.
  6671.  
  6672. If simple is zero (0), the size and shape of the "area" are determined by the parameters of the
  6673. geometric transformation. The boundaries of the "area" may not fall on pixel boundaries and, in the
  6674. case of nonorthogonal rotation of the image, "area" may not be rectangular. Partial input pixel values
  6675. may have to be calculated: the antialias-by-area technique preserves shape but can be very slow
  6676. computationally.
  6677.  
  6678. Because of the computational complexity of this method, two approximations are supported. If
  6679. simple is nonzero, the pixels covered by the projected area will be averaged without regard to the
  6680. relative amount of area that they contain: if they are touched by the area, they are included in a simple
  6681. average. If simple is set to N, with N odd and greater than one (3,5,7, ...), then only the center point
  6682. of the output pixel is projected, and a simple average is taken of an N by N window centered on the
  6683. projection. For best results, N should correspond roughly to the amount of scaling that will be done.
  6684.  
  6685. Structures
  6686. XieTecGeomAntialiasByArea sets the structure field simple to the value of the argument
  6687. simple.
  6688.  
  6689. typedef struct {
  6690.         int simple;
  6691. } XieGeomAntialiasByAreaParam;
  6692. See Also
  6693. XieFloGeometry
  6694.  XIElib - Technique Functions   XieTecGeomAntialiasByLowpass
  6695. Name
  6696. XieTecGeomAntialiasByLowpass - allocate and fill an XieGeomAntialiasByLowpassParam
  6697. structure
  6698. Syntax
  6699. XieGeomAntialiasByLowpassParam *XieTecGeomAntialiasByLowpass
  6700. (kernel_size)
  6701. int kernel_size;
  6702. Arguments
  6703. kernel_size     Specifies the size of the image kernel.
  6704. Returns
  6705. The XieGeomAntialiasByLowpassParam structure.
  6706. Description
  6707. XieTecGeomAntialiasByLowpass allocates and returns a pointer to an
  6708. XieGeomAntialiasByLowpassParam structure. The returned structure represents the list of
  6709. parameters required by the geometry technique and may be used as the sample_param argument of
  6710. XieFloGeometry (when the sample_tech argument is
  6711. xieValGeomAntialiasByLowpass).
  6712.  
  6713. If insufficient memory is available, XieTecGeomAntialiasByLowpass returns NULL. To free
  6714. the memory allocated to this structure, use XFree.
  6715.  
  6716. Antialiasing techniques incorporate information from an "area" of pixels in the input image in order
  6717. to produce each output pixel. This implies that line dropouts and other artifacts will occur less often,
  6718. and the output image may have markedly better resemblance to the input image. The technique
  6719. AntialiasByLowpass represents an approximation to antialias-by-area that can be faster, yet provides
  6720. similar results. First, a low-pass filter is applied by passing an nxn boxcar kernel over the original
  6721. input image. Output pixel values are then derived using a nearest neighbor sampling method that
  6722. selects the value of the input pixel in the upper-left corner of the area mapped back from the output
  6723. pixel.
  6724.  
  6725. The user is allowed to select the size of the image kernel via the kernel_size parameter. For best
  6726. results, kernel_size should be chosen to correspond roughly to the amount of scaling that will be
  6727. done. Note that the server chooses the best kernel for the appropriate size; the values used in the
  6728. kernel are not alterable by the client application. Clients wishing to specify the kernel in more detail
  6729. should use the convolve technique directly.
  6730. Structures
  6731. XieTecGeomAntialiasByLowpass sets the structure field kernel_size to the value of the
  6732. argument kernel_size.
  6733.  
  6734. typedef struct {
  6735.         int kernel_size;
  6736. } XieGeomAntialiasByLowpassParam;
  6737. See Also
  6738. XieFloGeometry, XieFloConvolve, XieTecGeomAntialiasByArea
  6739.  XIElib - Technique Functions   XieTecGeomGaussian
  6740. Name
  6741. XieTecGeomGaussian - allocate and fill an XieGeomGaussianParam structure
  6742. Syntax
  6743. XieGeomGaussianParam *XieTecGeomGaussian (sigma, normalize, radius,
  6744. simple)
  6745. double sigma;
  6746. double normalize;
  6747. unsigned int radius;
  6748. Bool simple;
  6749. Arguments
  6750. sigma   Specifies the drop-off rate.
  6751. normalize       Specifies a normalization constant.
  6752. radius  Specifies the extent of computation.
  6753. simple  Specifies the approximation form to use.
  6754. Returns
  6755. The XieGeomGaussianParam structure.
  6756. Description
  6757. XieTecGeomGaussian allocates and returns a pointer to an XieGeomGaussianParam
  6758. structure. The returned structure represents the list of parameters required by the geometry technique
  6759. and may be used as the sample_param argument of XieFloGeometry (when the
  6760. sample_tech argument is xieValGeomGaussian).
  6761.  
  6762. If insufficient memory is available, XieTecGeomGaussian returns NULL. To free the memory
  6763. allocated to this structure, use XFree.
  6764.  
  6765. A Geometry element can be visualized as stepping through each possible output pixel location in turn,
  6766. and computing the location from which to obtain each input pixel value. Each pixel (x',y') in the
  6767. output image is mapped to the coordinate location (x,y) in src by:
  6768.  
  6769.  
  6770.  
  6771. It is not unusual that the input location (x,y) so derived will be nonintegral and will not correspond
  6772. exactly to a single pixel in the input image.
  6773.  
  6774. From sampling theory, a bandwidth limited continuous input image can be recovered perfectly (under
  6775. certain conditions) from its sampled output by computing the convolution:
  6776.  
  6777.  
  6778.  
  6779. Here I(x,y) is the continuous image, i(m,n) the discrete sampled image, and h(u,v) is the impulse
  6780. response function for an appropriate low-pass filter. The specific form of h(u,v) for a Gaussian
  6781. impulse response function is given by:
  6782.  
  6783.  
  6784.  
  6785. The   term is called the "normalization constant" and may be altered using the normalize
  6786. parameter. The suggested value for * (sigma, the drop-off rate) is 1. Note that all technique
  6787. parameters must be chosen in concert
  6788.  
  6789. radius defines the extent of computation. A suggested value for radius is one, that is, only pixels
  6790. within a distance of one in either the x or y direction are involved in the calculation.
  6791.  
  6792. For computational convenience, a simplified form of Gaussian interpolation is provided. If simple
  6793. is True, the impulse-response function h(u,v) is:
  6794.  
  6795.  
  6796.  
  6797. The normalization factor N is defined by normalize. As with true Gaussian interpolation, the
  6798. radius parameter is used to determine the number of pixels involved in the computation.
  6799. Structures
  6800. XieTecGeomGaussian sets the structure field sigma to the value of the argument sigma; the
  6801. structure field normalize to the value of the argument normalize; the structure field radius to
  6802. the value of the argument radius; and the structure field simple to the value of the argument
  6803. simple.
  6804.  
  6805. typedef struct {
  6806.         float sigma;
  6807.         float normalize;
  6808.         unsigned int radius;
  6809.         Bool simple;
  6810. } XieGeomGaussianParam;
  6811. See Also
  6812. XieFloGeometry
  6813.  XIElib - Technique Functions   XieTecGeomNearestNeighbor
  6814. Name
  6815. XieTecGeomNearestNeighbor - allocate and fill an XieGeomNearestNeighborParam structure
  6816. Syntax
  6817. XieGeomNearestNeighborParam *XieTecGeomNearestNeighbor (modify)
  6818.     unsigned int modify;
  6819. Arguments
  6820. modify  Specifies technique behavior on even boundaries.
  6821. Returns
  6822. The XieGeomNearestNeighborParam structure.
  6823. Description
  6824. XieTecGeomNearestNeighbor allocates and returns a pointer to an
  6825. XieGeomNearestNeighborParam structure. The returned structure represents the list of
  6826. parameters required by the geometry technique and may be used as the sample_param argument of
  6827. XieFloGeometry (when the sample_tech argument is xieValGeomNearestNeighbor).
  6828.  
  6829. If insufficient memory is available, XieTecGeomNearestNeighbor returns NULL. To free the
  6830. memory allocated to this structure, use XFree.
  6831.  
  6832. A Geometry element can be visualized as stepping through each possible output pixel location in turn,
  6833. and computing the location from which to obtain each input pixel value. Each pixel (x',y') in the
  6834. output image is mapped to the coordinate location (x,y) in src by:
  6835.  
  6836.  
  6837.  
  6838. It is not unusual that the input location (x,y) so derived will be nonintegral and will not correspond
  6839. exactly to a single pixel in the input image.
  6840.  
  6841. To illustrate NearestNeighbor technique, assume that the pixel grid locations P, Q, R, and S are
  6842. integral. Pixel location X = (x,y)T, obtained from the mapping equation above, differs from P by
  6843. fractional amounts s in the x direction and t in the y direction.
  6844.  
  6845.  
  6846.  
  6847. Let I(P) be the value of the input image at coordinate P, if P is within the image extent. Otherwise, let
  6848. I(P) be constant, where constant is the pixel value passed to the Geometry element. A value of
  6849. I(X) must be estimated from I(P), I(Q), I(R), and I(S). In nearest-neighbor sampling, we simply
  6850. choose the image value from the discrete location closest to X. Thus,
  6851.  
  6852. if s < 1/2, t < 1/2, set I(X) = I(P),
  6853. if s > 1/2, t < 1/2, set I(X) = I(Q),
  6854. if s > 1/2, t > 1/2, set I(X) = I(R),
  6855. if s < 1/2, t > 1/2, set I(X) = I(S).
  6856.  
  6857. The behavior on even boundaries (s = 1/2 or t = 1/2) is determined by the modify parameter. One of
  6858. the standard nearest neighbor modify values can be assigned to modify:
  6859.  
  6860. xieValFavorDown
  6861. xieValFavorUp
  6862. xieValRoundNW
  6863. xieValRoundNE
  6864. xieValRoundSE
  6865. xieValRoundSW
  6866.  
  6867.  
  6868. If modify is xieValFavorDown, all less than signs in the above are replaced with less than
  6869. or equal signs. Thus, P would win all ties, S and Q would lose to P but win over R, and R would
  6870. lose all ties. If modify is xieValFavorUp, then all greater than signs would be replaced with
  6871. greater than or equals, and the opposite behavior would occur. Four additional options are provided.
  6872. The xieValRoundxx options will always choose a specific integral pixel grid location; these are
  6873. not strictly nearest neighbor algorithms but are available for computational/filtering convenience.
  6874. Structures
  6875. XieTecGeomNearestNeighbor sets the structure field modify to the value of the argument
  6876. modify.
  6877.  
  6878. typedef struct {
  6879.         unsigned int modify;
  6880. } XieGeomNearestNeighborParam;
  6881. /* Definitions of NearestNeighbor Modify */
  6882. #define xieValFavorDown 1
  6883. #define xieValFavorUp   2
  6884. #define xieValRoundNW   3
  6885. #define xieValRoundNE   4
  6886. #define xieValRoundSE   5
  6887. #define xieValRoundSW   6
  6888. See Also
  6889. XieFloGeometry
  6890.  XIElib - Technique Functions   XieTecHistogramGaussian
  6891. Name
  6892. XieTecHistogramGaussian - allocate and fill an XieHistogramGaussianParam structure
  6893. Syntax
  6894. XieHistogramGaussianParam *XieTecHistogramGaussian (mean, sigma)
  6895. double mean;
  6896. double sigma;
  6897. Arguments
  6898. mean    Specifies the center of the Gaussian probability density function.
  6899. sigma   Specifies the "spread" of the Gaussian probability density function.
  6900. Returns
  6901. The XieHistogramGaussianParam structure.
  6902. Description
  6903. XieTecHistogramGaussian allocates and returns a pointer to an
  6904. XieHistogramGaussianParam structure. The returned structure represents the list of
  6905. parameters required by the match-histogram shape technique and may be used as the shape_param
  6906. argument of XieFloMatchHistogram (when the shape argument is
  6907. xieValHistogramGaussian).
  6908.  
  6909. If insufficient memory is available, XieTecHistogramGaussian returns NULL. To free the
  6910. memory allocated to this structure, use XFree.
  6911.  
  6912. The Gaussian match-histogram shape technique specifies that the output image is to have a histogram
  6913. that approximates a Gaussian probability density. The supplied parameters are used to generate a
  6914. Gaussian probability density function centered around the mean level with a spread specified by
  6915. sigma:
  6916.  
  6917.  
  6918.  
  6919. Structures
  6920. XieTecHistogramGaussian sets the structure field mean to the value of the argument mean;
  6921. and the structure field sigma to the value of the argument sigma.
  6922.  
  6923. typedef struct {
  6924.         float mean;
  6925.         float sigma;
  6926. } XieHistogramGaussianParam;
  6927. See Also
  6928. XieFloMatchHistogram
  6929.  XIElib - Technique Functions   XieTecHistogramHyperbolic
  6930. Name
  6931. XieTecHistogramHyperbolic - allocate and fill an XieHistogramHyperbolicParam structure
  6932. Syntax
  6933. XieHistogramHyperbolicParam *XieTecHistogramHyperbolic (constant,
  6934. shape_factor)
  6935. double constant;
  6936. Bool shape_factor;
  6937. Arguments
  6938. constant        Specifies a value used to generate a hyperbolic probability density
  6939. function
  6940. shape_factor    Specifies the relationship between the histogram shape and image
  6941. levels.
  6942. Returns
  6943. The XieHistogramHyperbolicParam structure.
  6944. Description
  6945. XieTecHistogramHyperbolic allocates and returns a pointer to an
  6946. XieHistogramHyperbolicParam structure. The returned structure represents the list of
  6947. parameters required by the match-histogram shape technique and may be used as the shape_param
  6948. argument of XieFloMatchHistogram (when the shape argument is
  6949. xieValHistogramHyperbolic).
  6950.  
  6951. If insufficient memory is available, XieTecHistogramHyperbolic returns NULL. To free the
  6952. memory allocated to this structure, use XFree.
  6953.  
  6954. The hyperbolic match-histogram shape technique specifies that the output image is to have a
  6955. histogram that approximates a hyperbolic probability density.
  6956.  
  6957. constant is used to generate a hyperbolic probability density function:
  6958.  
  6959.  
  6960.  
  6961. shape_factor should be specified as False if the histogram shape represents decreasing values
  6962. for higher levels or True if the shape represents increasing values for higher levels.
  6963. Structures
  6964. XieTecHistogramHyperbolic sets the structure field constant to the value of the argument
  6965. constant; and the structure field shape_factor to the value of the argument shape_factor.
  6966.  
  6967. typedef struct {
  6968.         float constant;
  6969.         Bool shape_factor;
  6970. } XieHistogramHyperbolicParam;
  6971. See Also
  6972. XieFloMatchHistogram
  6973.  XIElib - Technique Functions   XieTecWhiteAdjustCIELabShift
  6974. Name
  6975. XieTecWhiteAdjustCIELabShift - allocate and fill an XieWhiteAdjustCIELabShiftParam
  6976. structure
  6977. Syntax
  6978. XieWhiteAdjustCIELabShiftParam *XieTecWhiteAdjustCIELabShift
  6979. (white_point)
  6980. XieConstant white_point;
  6981. Arguments
  6982. white_point     Specifies the white point of the (source or output) data.
  6983. Returns
  6984. The XieWhiteAdjustCIELabShiftParam structure.
  6985. Description
  6986. XieTecWhiteAdjustCIELabShift allocates and returns a pointer to an
  6987. XieWhiteAdjustCIELabShiftParam structure. The returned structure represents the list of
  6988. parameters required by the WhiteAdjust technique and may be used as the white_adjust_param
  6989. argument of XieTecRGBToCIELab, XieTecRGBToCIEXYZ, XieTecCIELabToRGB, and
  6990. XieTecCIEXYZToRGB (when the white_adjust_tech argument is
  6991. xieValWhiteAdjustCIELabShift).
  6992.  
  6993. If insufficient memory is available, XieTecWhiteAdjustCIELabShift returns NULL. To free
  6994. the memory allocated to this structure, use XFree.
  6995.  
  6996. White point correction can be used to ensure that white "looks" white, or it can be used to change the
  6997. overall tint of an image.
  6998.  
  6999. The CIELabShift WhiteAdjust technique specifies that white point correction is to be accomplished
  7000. by adding the white point displacement to the ab plane in the CIELab colorspace. The
  7001. white_point is specified using CIEXYZ encodings. If the WhiteAdjust technique is used with a
  7002. color conversion technique that converts from RGB, white_point specifies the desired white point
  7003. of the output data; if the conversion is to RGB, white_point specifies the white point of the source
  7004. data.
  7005. Structures
  7006. XieTecWhiteAdjustCIELabShift sets the structure field white_point to the value of the
  7007. argument white_point.
  7008.  
  7009. typedef float XieConstant[3];
  7010. typedef unsigned XieWhiteAdjustTechnique;
  7011. typedef struct {
  7012.         XieConstant white_point;
  7013. } XieWhiteAdjustCIELabShiftParam;
  7014. See Also
  7015. XieTecRGBToCIELab, XieTecRGBToCIEXYZ, XieTecCIELabToRGB, XieTecCIEXYZToRGB
  7016.  XIElib - Free Functions        XieFreeTechniques
  7017. Name
  7018. XieFreeTechniques - free memory allocated for a list of techniques
  7019. Syntax
  7020. void XieFreeTechniques (techs, count)
  7021. XieTechnique *techs;
  7022. unsigned int count;
  7023. Arguments
  7024. techs   Specifies the list of techniques to be freed.
  7025. count   Specifies the number of items in the list of techniques to be freed.
  7026. Description
  7027. XieFreeTechniques frees the memory previously allocated for techs. Care should be taken
  7028. that the argument pair techs/count match an argument pair techniques_ret/
  7029. ntechniques_ret returned from XieQueryTechniques.
  7030.  
  7031. See XieQueryTechniques for a description of the XieTechnique structure.
  7032. Structures
  7033. typedef unsigned XieTechniqueGroup;
  7034. typedef struct {
  7035.         Bool needs_param;
  7036.         XieTechniqueGroup group;
  7037.         unsigned int number;
  7038.         unsigned int speed;
  7039.         char *name;
  7040. } XieTechnique;
  7041. See Also
  7042.  XieQueryTechniques
  7043.  XIElib - Free Functions        XieFreePhotofloGraph
  7044. Name
  7045. XieFreePhotofloGraph - free memory allocated for an array of XiePhotoElement structures
  7046. Syntax
  7047. void XieFreePhotofloGraph (elements, count)
  7048. XiePhotoElement *elements;
  7049. unsigned int count;
  7050. Arguments
  7051. elements        Specifies the array of XiePhotoElement structures to be freed.
  7052. count   Specifies the number of XiePhotoElement structures in the array.
  7053. Description
  7054. XieFreePhotofloGraph frees the specified array of XiePhotoElement structures.
  7055.  
  7056. Care should be taken that the argument pair elements/count match a returned value (an array of
  7057. XiePhotoElement structures) and argument count from a call to
  7058. XieAllocatePhotofloGraph.
  7059.  
  7060. Technique parameters are not freed by using XieFreePhotofloGraph. Most of the technique
  7061. parameters, with the exception of the JPEG baseline and JPEG lossless encode techniques, which are
  7062. allocated using XIElib convenience functions are freed using XFree. This is so the client can reuse
  7063. technique parameters between photoflos.
  7064. Structures
  7065. typedef struct {
  7066.         int elemType;
  7067.         /* union of ALL element types */
  7068.         union {
  7069.                 ...
  7070.                 ...
  7071.         } data;
  7072. } XiePhotoElement;
  7073. See Also
  7074. XieAllocatePhotofloGraph, XieCreatePhotoflo, XieExecutePhotoflo, XieExecuteImmediate
  7075.  XIElib - Free Functions        XieFreeEncodeJPEGBaseline
  7076. Name
  7077. XieFreeEncodeJPEGBaseline - free the memory allocated to the structure
  7078. XieEncodeJPEGBaselineParam
  7079. Syntax
  7080. void XieFreeEncodeJPEGBaseline (param)
  7081. XieEncodeJPEGBaselineParam *param
  7082. Arguments
  7083. param   Specifies a pointer to the structure that is to be freed.
  7084. Description
  7085. XieFreeEncodeJPEGBaseline (rather than XFree) should be used to free the memory
  7086. allocated by XieTecEncodeJPEGBaseline.
  7087. Structures
  7088. typedef struct {
  7089.         XieInterleave interleave;
  7090.         XieOrientation band_order;
  7091.         unsigned char horizontal_samples[3];
  7092.         unsigned char vertical_samples[3];
  7093.         char *q_table;
  7094.         unsigned int q_size;
  7095.         char *ac_table;
  7096.         unsigned int ac_size;
  7097.         char *dc_table;
  7098.         unsigned int dc_size;
  7099. } XieEncodeJPEGBaselineParam;
  7100. See Also
  7101. XieTecEncodeJPEGBaseline
  7102.  XIElib - Free Functions        XieFreeEncodeJPEGLossless
  7103. Name
  7104. XieFreeEncodeJPEGLossless - free the memory allocated to the structure
  7105. XieEncodeJPEGLosslessParam
  7106. Syntax
  7107. void XieFreeEncodeJPEGLossless (param)
  7108. XieEncodeJPEGLosslessParam *param;
  7109. Arguments
  7110. param   Specifies a pointer to the structure that is to be freed.
  7111. Description
  7112. XieFreeEncodeJPEGLossless (rather than XFree) should be used to free the memory
  7113. allocated by XieTecEncodeJPEGLossless.
  7114.  
  7115. Note that the JPEG Lossless technique is not available in the R6 sample implementation of XIE.
  7116. Structures
  7117. typedef struct {
  7118.         XieInterleave interleave;
  7119.         XieOrientation band_order;
  7120.         unsigned char predictor[3];
  7121.         char *table;
  7122.         unsigned int table_size;
  7123. } XieEncodeJPEGLosslessParam;
  7124. See Also
  7125. XieTecEncodeJPEGLossless
  7126.  XIElib - Free Functions        XieFreePasteUpTiles
  7127. Name
  7128. XieFreePasteUpTiles - free the memory allocated to the tiles field of a PasteUp structure
  7129. Syntax
  7130. void XieFreePasteUpTiles (element)
  7131. XiePhotoElement *element;
  7132. Arguments
  7133. element Specifies the XiePhotoElement structure to use.
  7134. Description
  7135. XieFreePasteUpTiles frees the memory allocated to the tiles field in the specified
  7136. PasteUp member structure; after the memory has been freed, the field value is set to NULL.
  7137. Structures
  7138. typedef struct {
  7139.         int elemType;
  7140.         union {
  7141.                 ...
  7142.                 struct {
  7143.                         unsigned int width;
  7144.                         unsigned int height;
  7145.                         XieConstant constant;
  7146.                         XieTile *tiles;
  7147.                         unsigned int tile_count;
  7148.                 } PasteUp;
  7149.                 ...
  7150.         } data;
  7151. } XiePhotoElement;
  7152. See Also
  7153. XieFloPasteUp
  7154.  
  7155.  XIElib Events  ColorAlloc
  7156. Description
  7157. The client is notified that a ConvertToIndex element has completed color allocation, but has produced
  7158. a result of lesser fidelity than was requested using the technique that was specified for the
  7159. ConvertToIndex element.
  7160.  
  7161. The structure fields name_space, flo_id, src, and elem_type identify the photoflo and
  7162. specific ConvertToIndex element from which the ColorAlloc event originated. The structure field
  7163. time is the server time when the ColorAlloc event occurred, in milliseconds. The structure field
  7164. color_list is the color list resource that received the allocated colors. The structure field
  7165. color_alloc_technique is the ColorAlloc technique specified to the ConvertToIndex element.
  7166. The structure field color_alloc_data can be used for other information that is specific to the
  7167. ColorAlloc technique.
  7168. Structures
  7169. /* ColorAlloc Event Code */
  7170. #define xieEvnNoColorAlloc      0
  7171.  
  7172. typedef struct {
  7173.         int type;
  7174.         unsigned long serial;
  7175.         Bool send_event;
  7176.         Display *display;
  7177.         unsigned long name_space;
  7178.         Time time;
  7179.         unsigned long flo_id;
  7180.         XiePhototag src;
  7181.         unsigned int elem_type;
  7182.         XieColorList color_list;
  7183.         XieColorAllocTechnique color_alloc_technique;
  7184.         unsigned long color_alloc_data;
  7185. } XieColorAllocEvent;
  7186. See Also
  7187. XieFloConvertToIndex, XieTecColorAllocAll
  7188.  XIElib Events  DecodeNotify
  7189. Description
  7190. A DecodeNotify event notifies the client that anomalies were encountered while decoding a
  7191. compressed image (see the notify arguments of XieFloImportClientPhoto and
  7192. XieFloImportPhotomap). Either an error has been encountered while decoding an image, or the
  7193. image data received does not satisfy the expected dimensions.
  7194.  
  7195. The structure fields name_space, flo_id, src, and elem_type identify the photoflo and
  7196. element from which the DecodeNotify event originated. The structure field time is the server
  7197. time when the DecodeNotify event occurred, in milliseconds. The structure field band_number
  7198. associates the event with a specific band of the image. The structure field decode_technique is
  7199. the Decode technique being used. The structure fields width and height are the dimensions
  7200. discovered while decoding the data. The structure field aborted is True if decoding was aborted,
  7201. or False if recovery was possible.
  7202.  
  7203. Recovery from a decode error may result in some missing or garbled image data. This may also cause
  7204. the height of the decoded data to be less than was expected. If the structure fields width or height
  7205. do not match the width and height specified to XieFloImportClientPhoto, the image data is
  7206. clipped or padded (with zeros), as required, to enforce the XieFloImportClientPhoto
  7207. specified dimensions.
  7208. Structures
  7209. /* DecodeNotify Event Code */
  7210. #define xieEvnNoDecodeNotify    1
  7211.  
  7212. typedef struct {
  7213.         int type;
  7214.         unsigned long serial;
  7215.         Bool send_event;
  7216.         Display *display;
  7217.         unsigned long name_space;
  7218.         Time time;
  7219.         unsigned long flo_id;
  7220.         XiePhototag src;
  7221.         unsigned int elem_type;
  7222.         XieDecodeTechnique decode_technique;
  7223.         Bool aborted;
  7224.         unsigned int band_number;
  7225.         unsigned long width;
  7226.         unsigned long height;
  7227. } XieDecodeNotifyEvent;
  7228. See Also
  7229. XieFloImportClientPhoto, XieFloImportPhotomap
  7230.  XIElib Events  ExportAvailable
  7231. Description
  7232. The client is notified that an ExportClient element has data available (see the notify argument of
  7233. the applicable XieFloExportClient... function). If notify was specified as
  7234. xieValFirstData, this event will be sent only the first time data become available from the
  7235. ExportClient element. Otherwise (that is, xieValNewData was specified), this event will be
  7236. generated each time the amount of data available changes from zero to nonzero.
  7237.  
  7238. The structure fields name_space, flo_id, src, and elem_type identify the photoflo and
  7239. specific ExportClient element from which the ExportAvailable event originated. The structure
  7240. field time is the server time when the ExportAvailable event occurred, in milliseconds. The
  7241. structure field band_number associates the event with a specific band of the image or LUT. The
  7242. structure field data is information specific to elem_type (for example, the number of LUT
  7243. entries or ROI rectangles available).
  7244.  
  7245. Where there is a single ExportClient element, the client can just read bytes or be event-driven. For
  7246. photoflos containing multiple ExportClient elements, the client should be event-driven.
  7247. Structures
  7248. /* ExportAvailable Event Code */
  7249. #define xieEvnNoExportAvailable 2
  7250.  
  7251. typedef struct {
  7252.         int type;
  7253.         unsigned long serial;
  7254.         Bool send_event;
  7255.         Display *display;
  7256.         unsigned long name_space;
  7257.         Time time;
  7258.         unsigned long flo_id;
  7259.         XiePhototag src;
  7260.         unsigned int elem_type;
  7261.         unsigned int band_number;
  7262.         unsigned long data[3];
  7263. } XieExportAvailableEvent;
  7264. See Also
  7265. XieFloExportClientHistogram, XieFloExportClientLUT, XieFloExportClientPhoto,
  7266. XieFloExportClientROI
  7267.  XIElib Events  ImportObscured
  7268. Description
  7269. The client is notified when an ImportDrawable or ImportDrawablePlane element encounters obscured
  7270. regions in a Window that cannot be retrieved from backing store (see the notify argument of the
  7271. import element routine). A separate ImportObscured event is returned for each affected region.
  7272.  
  7273. The structure fields name_space, flo_id, and src identify the photoflo and the specific import
  7274. element from which the ImportObscured event originated. The structure field time is the server
  7275. time when the ImportObscured event occurred, in milliseconds. The structure field window
  7276. identifies the Window. The obscured region of the window is specified by the structure fields x, y,
  7277. width, and height.
  7278.  
  7279. Note: image data within obscured regions will be populated with the fill argument supplied to the
  7280. import element.
  7281. Structures
  7282. /* ImportObscured Event Code */
  7283. #define xieEvnNoImportObscured  3
  7284.  
  7285. typedef struct {
  7286.         int type;
  7287.         unsigned long serial;
  7288.         Bool send_event;
  7289.         Display *display;
  7290.         unsigned long name_space;
  7291.         Time time;
  7292.         unsigned long flo_id;
  7293.         XiePhototag src;
  7294.         unsigned int elem_type;
  7295.         Window window;
  7296.         int x;
  7297.         int y;
  7298.         unsigned int width;
  7299.         unsigned int height;
  7300. } XieImportObscuredEvent;
  7301. See Also
  7302. XieFloImportDrawable, XieFloImportDrawablePlane
  7303.  XIElib Events  PhotofloDone
  7304. Description
  7305. A PhotofloDone event notifies the client that a photoflo has left the active state. It is enabled by
  7306. the notify argument of XieExecutePhotoflo or XieExecuteImmediate.
  7307.  
  7308. The photoflo from which the PhotofloDone event originated is identified by the structure fields
  7309. name_space and flo_id. The structure field time is the server time when the PhotofloDone
  7310. event occurred, in milliseconds. The reason the photoflo left the active state is indicated by the
  7311. structure field type.
  7312.  
  7313. If the Photoflo terminated because of an error condition, the details concerning the error have
  7314. preceded this event in an error message.
  7315. Structures
  7316. /* PhotofloDone Event Code */
  7317. #define xieEvnNoPhotofloDone    4
  7318.  
  7319. typedef struct {
  7320.         int type;
  7321.         unsigned long serial;
  7322.         Bool send_event;
  7323.         Display *display;
  7324.         unsigned long name_space;
  7325.         Time time;
  7326.         unsigned long flo_id;
  7327. } XiePhotofloDoneEvent;
  7328. See Also
  7329. XieExecuteImmediate, XieExecutePhotoflo
  7330.  
  7331.  XIElib Errors  Resource Errors
  7332. The following error codes are allocated from the extension error space to provide for the errors
  7333. returned by XIE:
  7334.  
  7335. Error   Cause
  7336. xieErrNoColorlist       The value for a color_list argument does not name a defined
  7337. color list.
  7338. xieErrNoLUT     The value for a lut argument does not name a defined LUT.
  7339. xieErrNoPhotoflo        The value for a photoflo argument does not name a defined
  7340. photoflo.
  7341. xieErrNoPhotomap        The value for a photomap argument does not name a defined
  7342. photomap.
  7343. xieErrNoPhotospace      The value for a photospace argument does not name a defined
  7344. photospace.
  7345. xieErrNoROI     The value for a roi argument does not name a defined ROI.
  7346. xieErrNoFlo     An error has been detected while defining, executing, or accessing a
  7347. photoflo (see Photoflo Errors).
  7348.  
  7349. XIE also uses the core protocol BadAccess, BadAlloc, BadIDChoice, BadLength, BadRequest, and
  7350. BadValue errors.
  7351.  XIElib Errors  Photoflo Errors
  7352. If an error is detected while defining, executing, or accessing a photoflo, an xieErrNoFlo...
  7353. error is returned. This single error code is allocated from the extension error space for all photoflo
  7354. related errors. The following subcodes are defined to provide the details of the error:
  7355.  
  7356. Error   Cause
  7357. xieErrNoFloAccess       Attempt to execute, modify, or redefine an active photoflo or
  7358. attempt to Get/Put client data from/to an inactive photoflo.
  7359. xieErrNoFloAlloc        Insufficient resources (for example, memory).
  7360. xieErrNoFloColormap     An unknown Colormap has been specified.
  7361. xieErrNoFloColorList    An unknown color list has been specified.
  7362. xieErrNoFloDomain       Invalid domain phototag:
  7363.  - source data is not a list-of-rectangles or control-plane or
  7364.  - specified nonzero on a DIS server.
  7365. xieErrNoFloDrawable     An unknown Drawable has been specified.
  7366. xieErrNoFloElement      An unknown element type has been specified, or
  7367. invalid element type for request, or
  7368. attempt to change or add an element type.
  7369. xieErrNoFloGC   An unknown GContext has been specified.
  7370. xieErrNoFloID   Invalid executable:
  7371.  - an unknown photoflo has been specified or
  7372.  - an unknown photospace has been specified.
  7373. xieErrNoFloLength       An element was received with the incorrect number of bytes.
  7374. xieErrNoFloLUT  An unknown LUT has been specified.
  7375. xieErrNoFloMatch        Some argument or pair of arguments has the correct type and range,
  7376. but it fails to match in some other way required by the element.
  7377. xieErrNoFloOperator     An unknown operator has been specified.
  7378. xieErrNoFloPhotomap     An unknown photomap has been specified.
  7379. xieErrNoFloROI  An unknown ROI has been specified.
  7380. xieErrNoFloSource       An invalid phototag has been specified:
  7381.  - zero, but a phototag is required, or
  7382.  - downstream from the particular element, or
  7383.  - beyond the bounds of the photoflo.
  7384. xieErrNoFloTechnique    An unknown technique has been specified , or
  7385. invalid technique specific-parameters have been specified,  or
  7386. the wrong number of technique-specific parameters have been given.
  7387. xieErrNoFloValue        Some numeric value falls outside of the range of values accepted by
  7388. the element.
  7389. xieErrNoFloImplementation       Some aspect of a request is not implemented by the server:
  7390. the client should be prepared to receive and handle this error.
  7391.  
  7392.  
  7393. Structures
  7394. /* Definition of Error Codes */
  7395. #define xieErrNoColorList       0
  7396. #define xieErrNoLUT     1
  7397. #define xieErrNoPhotoflo        2
  7398. #define xieErrNoPhotomap        3
  7399. #define xieErrNoPhotospace      4
  7400. #define xieErrNoROI     5
  7401. #define xieErrNoFlo     6
  7402.  
  7403. /* Definitions of Flo Error (Sub-) Codes */
  7404. #define xieErrNoFloAccess       1
  7405. #define xieErrNoFloAlloc        2
  7406. #define xieErrNoFloColormap     3
  7407. #define xieErrNoFloColorList    4
  7408. #define xieErrNoFloDomain       5
  7409. #define xieErrNoFloDrawable     6
  7410. #define xieErrNoFloElement      7
  7411. #define xieErrNoFloGC   8
  7412. #define xieErrNoFloID   9
  7413. #define xieErrNoFloLength       10
  7414. #define xieErrNoFloLUT  11
  7415. #define xieErrNoFloMatch        12
  7416. #define xieErrNoFloOperator     13
  7417. #define xieErrNoFloPhotomap     14
  7418. #define xieErrNoFloROI  15
  7419. #define xieErrNoFloSource       16
  7420. #define xieErrNoFloTechnique    17
  7421. #define xieErrNoFloValue        18
  7422. #define xieErrNoFloImplementation       19
  7423.  
  7424. XIElib          40
  7425.  
  7426. XIElib          Events-5
  7427.  
  7428. XIElib          Errors-3
  7429.  
  7430.  
  7431.