CMICCProfile.pas 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. {
  2. File: ColorSync/CMICCProfile.h
  3. Contains: ICC Profile Format Definitions
  4. Version: ColorSync-174.1~229
  5. Copyright: © 1994-2006 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Gale R Paeper, <[email protected]>, 2007 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit CMICCProfile;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes;
  92. {$ALIGN MAC68K}
  93. { ICC Profile version constants }
  94. const
  95. cmICCProfileVersion4 = $04000000;
  96. cmICCProfileVersion2 = $02000000;
  97. cmICCProfileVersion21 = $02100000;
  98. cmCS2ProfileVersion = $02000000;
  99. cmCS1ProfileVersion = $00000100; { ColorSync 1.0 profile version }
  100. { Current Major version number }
  101. cmProfileMajorVersionMask = $FF000000;
  102. cmCurrentProfileMajorVersion = $02000000;
  103. { magic cookie number for anonymous file ID }
  104. cmMagicNumber = $61637370 (* 'acsp' *);
  105. { ********************************************************************** }
  106. { ************** ColorSync 2.0 profile specification ******************* }
  107. { ********************************************************************** }
  108. { *** flags field *** }
  109. cmICCReservedFlagsMask = $0000FFFF; { these bits of the flags field are defined and reserved by ICC }
  110. cmEmbeddedMask = $00000001; { if bit 0 is 0 then not embedded profile, if 1 then embedded profile }
  111. cmEmbeddedUseMask = $00000002; { if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only }
  112. cmBlackPointCompensationMask = $00000004; { if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only }
  113. cmCMSReservedFlagsMask = $FFFF0000; { these bits of the flags field are defined and reserved by CMS vendor }
  114. cmQualityMask = $00030000; { if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best }
  115. cmInterpolationMask = $00040000; { if bit 18 is 0 then interpolation, if 1 then lookup only }
  116. cmGamutCheckingMask = $00080000; { if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info }
  117. { copyright-protection flag options }
  118. cmEmbeddedProfile = 0; { 0 is not embedded profile, 1 is embedded profile }
  119. cmEmbeddedUse = 1; { 0 is to use anywhere, 1 is to use as embedded profile only }
  120. { speed and quality flag options }
  121. cmNormalMode = 0; { it uses the least significent two bits in the high word of flag }
  122. cmDraftMode = 1; { it should be evaulated like this: right shift 16 bits first, mask off the }
  123. cmBestMode = 2; { high 14 bits, and then compare with the enum to determine the option value }
  124. { black point compensation flag option }
  125. cmBlackPointCompensation = 1; { 0 do not apply Black Point Compensation, 1 apply }
  126. { *** deviceAttributes fields *** }
  127. { deviceAttributes[0] is defined by and reserved for device vendors }
  128. { deviceAttributes[1] is defined by and reserved for ICC }
  129. { The following bits of deviceAttributes[1] are currently defined }
  130. cmReflectiveTransparentMask = $00000001; { if bit 0 is 0 then reflective media, if 1 then transparency media }
  131. cmGlossyMatteMask = $00000002; { if bit 1 is 0 then glossy, if 1 then matte }
  132. { device/media attributes element values }
  133. cmReflective = 0; { if bit 0 is 0 then reflective media, if 1 then transparency media }
  134. cmGlossy = 1; { if bit 1 is 0 then glossy, if 1 then matte }
  135. { *** renderingIntent field *** }
  136. cmPerceptual = 0; { Photographic images }
  137. cmRelativeColorimetric = 1; { Logo Colors }
  138. cmSaturation = 2; { Business graphics }
  139. cmAbsoluteColorimetric = 3; { Logo Colors }
  140. { data type element values }
  141. cmAsciiData = 0;
  142. cmBinaryData = 1;
  143. { screen encodings }
  144. cmPrtrDefaultScreens = 0; { Use printer default screens. 0 is false, 1 is ture }
  145. cmLinesPer = 1; { 0 is LinesPerCm, 1 is LinesPerInch }
  146. { 2.0 tag type information }
  147. cmNumHeaderElements = 10;
  148. { public tags }
  149. cmAToB0Tag = $41324230 (* 'A2B0' *);
  150. cmAToB1Tag = $41324231 (* 'A2B1' *);
  151. cmAToB2Tag = $41324232 (* 'A2B2' *);
  152. cmBlueColorantTag = $6258595A (* 'bXYZ' *);
  153. cmBlueTRCTag = $62545243 (* 'bTRC' *);
  154. cmBToA0Tag = $42324130 (* 'B2A0' *);
  155. cmBToA1Tag = $42324131 (* 'B2A1' *);
  156. cmBToA2Tag = $42324132 (* 'B2A2' *);
  157. cmCalibrationDateTimeTag = $63616C74 (* 'calt' *);
  158. cmChromaticAdaptationTag = $63686164 (* 'chad' *);
  159. cmCharTargetTag = $74617267 (* 'targ' *);
  160. cmCopyrightTag = $63707274 (* 'cprt' *);
  161. cmDeviceMfgDescTag = $646D6E64 (* 'dmnd' *);
  162. cmDeviceModelDescTag = $646D6464 (* 'dmdd' *);
  163. cmGamutTag = $67616D74 (* 'gamt' *);
  164. cmGrayTRCTag = $6B545243 (* 'kTRC' *);
  165. cmGreenColorantTag = $6758595A (* 'gXYZ' *);
  166. cmGreenTRCTag = $67545243 (* 'gTRC' *);
  167. cmLuminanceTag = $6C756D69 (* 'lumi' *);
  168. cmMeasurementTag = $6D656173 (* 'meas' *);
  169. cmMediaBlackPointTag = $626B7074 (* 'bkpt' *);
  170. cmMediaWhitePointTag = $77747074 (* 'wtpt' *);
  171. cmNamedColorTag = $6E636F6C (* 'ncol' *);
  172. cmNamedColor2Tag = $6E636C32 (* 'ncl2' *);
  173. cmPreview0Tag = $70726530 (* 'pre0' *);
  174. cmPreview1Tag = $70726531 (* 'pre1' *);
  175. cmPreview2Tag = $70726532 (* 'pre2' *);
  176. cmProfileDescriptionTag = $64657363 (* 'desc' *);
  177. cmProfileSequenceDescTag = $70736571 (* 'pseq' *);
  178. cmPS2CRD0Tag = $70736430 (* 'psd0' *);
  179. cmPS2CRD1Tag = $70736431 (* 'psd1' *);
  180. cmPS2CRD2Tag = $70736432 (* 'psd2' *);
  181. cmPS2CRD3Tag = $70736433 (* 'psd3' *);
  182. cmPS2CSATag = $70733273 (* 'ps2s' *);
  183. cmPS2RenderingIntentTag = $70733269 (* 'ps2i' *);
  184. cmRedColorantTag = $7258595A (* 'rXYZ' *);
  185. cmRedTRCTag = $72545243 (* 'rTRC' *);
  186. cmScreeningDescTag = $73637264 (* 'scrd' *);
  187. cmScreeningTag = $7363726E (* 'scrn' *);
  188. cmTechnologyTag = $74656368 (* 'tech' *);
  189. cmUcrBgTag = $62666420 (* 'bfd ' *);
  190. cmViewingConditionsDescTag = $76756564 (* 'vued' *);
  191. cmViewingConditionsTag = $76696577 (* 'view' *);
  192. { custom tags }
  193. cmPS2CRDVMSizeTag = $7073766D (* 'psvm' *);
  194. cmVideoCardGammaTag = $76636774 (* 'vcgt' *);
  195. cmMakeAndModelTag = $6D6D6F64 (* 'mmod' *);
  196. cmProfileDescriptionMLTag = $6473636D (* 'dscm' *);
  197. cmNativeDisplayInfoTag = $6E64696E (* 'ndin' *);
  198. { public type signatures }
  199. cmSigCrdInfoType = $63726469 (* 'crdi' *);
  200. cmSigCurveType = $63757276 (* 'curv' *);
  201. cmSigDataType = $64617461 (* 'data' *);
  202. cmSigDateTimeType = $6474696D (* 'dtim' *);
  203. cmSigLut16Type = $6D667432 (* 'mft2' *);
  204. cmSigLut8Type = $6D667431 (* 'mft1' *);
  205. cmSigMeasurementType = $6D656173 (* 'meas' *);
  206. cmSigMultiFunctA2BType = $6D414220 (* 'mAB ' *);
  207. cmSigMultiFunctB2AType = $6D424120 (* 'mBA ' *);
  208. cmSigNamedColorType = $6E636F6C (* 'ncol' *);
  209. cmSigNamedColor2Type = $6E636C32 (* 'ncl2' *);
  210. cmSigParametricCurveType = $70617261 (* 'para' *);
  211. cmSigProfileDescriptionType = $64657363 (* 'desc' *);
  212. cmSigProfileSequenceDescType = $70736571 (* 'pseq' *);
  213. cmSigScreeningType = $7363726E (* 'scrn' *);
  214. cmSigS15Fixed16Type = $73663332 (* 'sf32' *);
  215. cmSigSignatureType = $73696720 (* 'sig ' *);
  216. cmSigTextType = $74657874 (* 'text' *);
  217. cmSigU16Fixed16Type = $75663332 (* 'uf32' *);
  218. cmSigU1Fixed15Type = $75663136 (* 'uf16' *);
  219. cmSigUInt8Type = $75693038 (* 'ui08' *);
  220. cmSigUInt16Type = $75693136 (* 'ui16' *);
  221. cmSigUInt32Type = $75693332 (* 'ui32' *);
  222. cmSigUInt64Type = $75693634 (* 'ui64' *);
  223. cmSigUcrBgType = $62666420 (* 'bfd ' *);
  224. cmSigUnicodeTextType = $75747874 (* 'utxt' *);
  225. cmSigViewingConditionsType = $76696577 (* 'view' *);
  226. cmSigXYZType = $58595A20 (* 'XYZ ' *);
  227. { custom type signatures }
  228. cmSigPS2CRDVMSizeType = $7073766D (* 'psvm' *);
  229. cmSigVideoCardGammaType = $76636774 (* 'vcgt' *);
  230. cmSigMakeAndModelType = $6D6D6F64 (* 'mmod' *);
  231. cmSigNativeDisplayInfoType = $6E64696E (* 'ndin' *);
  232. cmSigMultiLocalizedUniCodeType = $6D6C7563 (* 'mluc' *);
  233. { technology tag descriptions }
  234. cmTechnologyDigitalCamera = $6463616D (* 'dcam' *);
  235. cmTechnologyFilmScanner = $6673636E (* 'fscn' *);
  236. cmTechnologyReflectiveScanner = $7273636E (* 'rscn' *);
  237. cmTechnologyInkJetPrinter = $696A6574 (* 'ijet' *);
  238. cmTechnologyThermalWaxPrinter = $74776178 (* 'twax' *);
  239. cmTechnologyElectrophotographicPrinter = $6570686F (* 'epho' *);
  240. cmTechnologyElectrostaticPrinter = $65737461 (* 'esta' *);
  241. cmTechnologyDyeSublimationPrinter = $64737562 (* 'dsub' *);
  242. cmTechnologyPhotographicPaperPrinter = $7270686F (* 'rpho' *);
  243. cmTechnologyFilmWriter = $6670726E (* 'fprn' *);
  244. cmTechnologyVideoMonitor = $7669646D (* 'vidm' *);
  245. cmTechnologyVideoCamera = $76696463 (* 'vidc' *);
  246. cmTechnologyProjectionTelevision = $706A7476 (* 'pjtv' *);
  247. cmTechnologyCRTDisplay = $43525420 (* 'CRT ' *);
  248. cmTechnologyPMDisplay = $504D4420 (* 'PMD ' *);
  249. cmTechnologyAMDisplay = $414D4420 (* 'AMD ' *);
  250. cmTechnologyPhotoCD = $4B504344 (* 'KPCD' *);
  251. cmTechnologyPhotoImageSetter = $696D6773 (* 'imgs' *);
  252. cmTechnologyGravure = $67726176 (* 'grav' *);
  253. cmTechnologyOffsetLithography = $6F666673 (* 'offs' *);
  254. cmTechnologySilkscreen = $73696C6B (* 'silk' *);
  255. cmTechnologyFlexography = $666C6578 (* 'flex' *);
  256. { Measurement type encodings }
  257. { Measurement Flare }
  258. cmFlare0 = $00000000;
  259. cmFlare100 = $00000001;
  260. { Measurement Geometry }
  261. cmGeometryUnknown = $00000000;
  262. cmGeometry045or450 = $00000001;
  263. cmGeometry0dord0 = $00000002;
  264. { Standard Observer }
  265. cmStdobsUnknown = $00000000;
  266. cmStdobs1931TwoDegrees = $00000001;
  267. cmStdobs1964TenDegrees = $00000002;
  268. { Standard Illuminant }
  269. cmIlluminantUnknown = $00000000;
  270. cmIlluminantD50 = $00000001;
  271. cmIlluminantD65 = $00000002;
  272. cmIlluminantD93 = $00000003;
  273. cmIlluminantF2 = $00000004;
  274. cmIlluminantD55 = $00000005;
  275. cmIlluminantA = $00000006;
  276. cmIlluminantEquiPower = $00000007;
  277. cmIlluminantF8 = $00000008;
  278. { Spot Function Value }
  279. cmSpotFunctionUnknown = 0;
  280. cmSpotFunctionDefault = 1;
  281. cmSpotFunctionRound = 2;
  282. cmSpotFunctionDiamond = 3;
  283. cmSpotFunctionEllipse = 4;
  284. cmSpotFunctionLine = 5;
  285. cmSpotFunctionSquare = 6;
  286. cmSpotFunctionCross = 7;
  287. { Color Space Signatures }
  288. cmXYZData = $58595A20 (* 'XYZ ' *);
  289. cmLabData = $4C616220 (* 'Lab ' *);
  290. cmLuvData = $4C757620 (* 'Luv ' *);
  291. cmYCbCrData = $59436272 (* 'YCbr' *);
  292. cmYxyData = $59787920 (* 'Yxy ' *);
  293. cmRGBData = $52474220 (* 'RGB ' *);
  294. cmSRGBData = $73524742 (* 'sRGB' *);
  295. cmGrayData = $47524159 (* 'GRAY' *);
  296. cmHSVData = $48535620 (* 'HSV ' *);
  297. cmHLSData = $484C5320 (* 'HLS ' *);
  298. cmCMYKData = $434D594B (* 'CMYK' *);
  299. cmCMYData = $434D5920 (* 'CMY ' *);
  300. cmMCH5Data = $4D434835 (* 'MCH5' *);
  301. cmMCH6Data = $4D434836 (* 'MCH6' *);
  302. cmMCH7Data = $4D434837 (* 'MCH7' *);
  303. cmMCH8Data = $4D434838 (* 'MCH8' *);
  304. cm3CLRData = $33434C52 (* '3CLR' *);
  305. cm4CLRData = $34434C52 (* '4CLR' *);
  306. cm5CLRData = $35434C52 (* '5CLR' *);
  307. cm6CLRData = $36434C52 (* '6CLR' *);
  308. cm7CLRData = $37434C52 (* '7CLR' *);
  309. cm8CLRData = $38434C52 (* '8CLR' *);
  310. cm9CLRData = $39434C52 (* '9CLR' *);
  311. cm10CLRData = $41434C52 (* 'ACLR' *);
  312. cm11CLRData = $42434C52 (* 'BCLR' *);
  313. cm12CLRData = $43434C52 (* 'CCLR' *);
  314. cm13CLRData = $44434C52 (* 'DCLR' *);
  315. cm14CLRData = $45434C52 (* 'ECLR' *);
  316. cm15CLRData = $46434C52 (* 'FCLR' *);
  317. cmNamedData = $4E414D45 (* 'NAME' *);
  318. { profileClass enumerations }
  319. cmInputClass = $73636E72 (* 'scnr' *);
  320. cmDisplayClass = $6D6E7472 (* 'mntr' *);
  321. cmOutputClass = $70727472 (* 'prtr' *);
  322. cmLinkClass = $6C696E6B (* 'link' *);
  323. cmAbstractClass = $61627374 (* 'abst' *);
  324. cmColorSpaceClass = $73706163 (* 'spac' *);
  325. cmNamedColorClass = $6E6D636C (* 'nmcl' *);
  326. { platform enumerations }
  327. cmMacintosh = $4150504C (* 'APPL' *);
  328. cmMicrosoft = $4D534654 (* 'MSFT' *);
  329. cmSolaris = $53554E57 (* 'SUNW' *);
  330. cmSiliconGraphics = $53474920 (* 'SGI ' *);
  331. cmTaligent = $54474E54 (* 'TGNT' *);
  332. { parametric curve type enumerations }
  333. cmParametricType0 = 0; { Y = X^gamma }
  334. cmParametricType1 = 1; { Y = (aX+b)^gamma [X>=-b/a], Y = 0 [X<-b/a] }
  335. cmParametricType2 = 2; { Y = (aX+b)^gamma + c [X>=-b/a], Y = c [X<-b/a] }
  336. cmParametricType3 = 3; { Y = (aX+b)^gamma [X>=d], Y = cX [X<d] }
  337. cmParametricType4 = 4; { Y = (aX+b)^gamma + e [X>=d], Y = cX+f [X<d] }
  338. { ColorSync 1.0 elements }
  339. cmCS1ChromTag = $6368726D (* 'chrm' *);
  340. cmCS1TRCTag = $74726320 (* 'trc ' *);
  341. cmCS1NameTag = $6E616D65 (* 'name' *);
  342. cmCS1CustTag = $63757374 (* 'cust' *);
  343. { General element data types }
  344. type
  345. CMDateTimePtr = ^CMDateTime;
  346. CMDateTime = record
  347. year: UInt16;
  348. month: UInt16;
  349. dayOfTheMonth: UInt16;
  350. hours: UInt16;
  351. minutes: UInt16;
  352. seconds: UInt16;
  353. end;
  354. CMFixedXYColorPtr = ^CMFixedXYColor;
  355. CMFixedXYColor = record
  356. x: Fixed;
  357. y: Fixed;
  358. end;
  359. CMFixedXYZColorPtr = ^CMFixedXYZColor;
  360. CMFixedXYZColor = record
  361. X: Fixed;
  362. Y: Fixed;
  363. Z: Fixed;
  364. end;
  365. CMXYZComponent = UInt16;
  366. CMXYZColorPtr = ^CMXYZColor;
  367. CMXYZColor = record
  368. X: CMXYZComponent;
  369. Y: CMXYZComponent;
  370. Z: CMXYZComponent;
  371. end;
  372. { Type for Profile MD5 message digest }
  373. { Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm }
  374. CMProfileMD5 = packed array[0..15] of UInt8;
  375. CMProfileMD5Ptr = ^CMProfileMD5;
  376. {
  377. * CMProfileMD5AreEqual()
  378. *
  379. * Availability: available as macro/inline
  380. }
  381. // #define CMProfileMD5AreEqual(a, b) (\
  382. // ((long*)a)[0]==((long*)b)[0] && ((long*)a)[1]==((long*)b)[1] && \
  383. // ((long*)a)[2]==((long*)b)[2] && ((long*)a)[3]==((long*)b)[3])
  384. CM2HeaderPtr = ^CM2Header;
  385. CM2Header = record
  386. size: UInt32; { This is the total size of the Profile }
  387. CMMType: OSType; { CMM signature, Registered with CS2 consortium }
  388. profileVersion: UInt32; { Version of CMProfile format }
  389. profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
  390. dataColorSpace: OSType; { color space of data }
  391. profileConnectionSpace: OSType; { profile connection color space }
  392. dateTime: CMDateTime; { date and time of profile creation }
  393. CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
  394. platform: OSType; { primary profile platform, Registered with CS2 consortium }
  395. flags: UInt32; { profile flags }
  396. deviceManufacturer: OSType; { Registered with ICC consortium }
  397. deviceModel: UInt32; { Registered with ICC consortium }
  398. deviceAttributes: array [0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
  399. renderingIntent: UInt32; { preferred rendering intent of tagged object }
  400. white: CMFixedXYZColor; { profile illuminant }
  401. creator: OSType; { profile creator }
  402. reserved: packed array [0..43] of char; { reserved for future use }
  403. end;
  404. CM4HeaderPtr = ^ CM4Header;
  405. CM4Header = record
  406. size: UInt32; { This is the total size of the Profile }
  407. CMMType: OSType; { CMM signature, Registered with CS2 consortium }
  408. profileVersion: UInt32; { Version of CMProfile format }
  409. profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
  410. dataColorSpace: OSType; { color space of data }
  411. profileConnectionSpace: OSType; { profile connection color space }
  412. dateTime: CMDateTime; { date and time of profile creation }
  413. CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
  414. platform: OSType; { primary profile platform, Registered with CS2 consortium }
  415. flags: UInt32; { profile flags }
  416. deviceManufacturer: OSType; { Registered with ICC consortium }
  417. deviceModel: UInt32; { Registered with ICC consortium }
  418. deviceAttributes: array[0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
  419. renderingIntent: UInt32; { preferred rendering intent of tagged object }
  420. white: CMFixedXYZColor; { profile illuminant }
  421. creator: OSType; { profile creator }
  422. digest: CMProfileMD5; { Profile message digest }
  423. reserved: packed array[0..27] of char; { reserved for future use }
  424. end;
  425. CMTagRecordPtr = ^CMTagRecord;
  426. CMTagRecord = record
  427. tag: OSType; { Registered with CS2 consortium }
  428. elementOffset: UInt32; { Relative to start of CMProfile }
  429. elementSize: UInt32;
  430. end;
  431. CMTagElemTablePtr = ^CMTagElemTable;
  432. CMTagElemTable = record
  433. count: UInt32;
  434. tagList: array [0..0] of CMTagRecord; { variable size, determined by count }
  435. end;
  436. CM2ProfilePtr = ^CM2Profile;
  437. CM2Profile = record
  438. header: CM2Header;
  439. tagTable: CMTagElemTable;
  440. elemData: SInt8; { variable size data for tagged element storage }
  441. end;
  442. CM2ProfileHandle = ^CM2ProfilePtr;
  443. { Tag Type Definitions }
  444. CMAdaptationMatrixTypePtr = ^CMAdaptationMatrixType;
  445. CMAdaptationMatrixType = record
  446. typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
  447. reserved: UInt32; { fill with 0x00 }
  448. adaptationMatrix: array [0..8] of Fixed; { fixed size of nine matrix entries }
  449. end;
  450. CMCurveTypePtr = ^CMCurveType;
  451. CMCurveType = record
  452. typeDescriptor: OSType; { 'curv' = cmSigCurveType }
  453. reserved: UInt32; { fill with 0x00 }
  454. countValue: UInt32; { number of entries in table that follows }
  455. data: array [0..0] of UInt16; { variable size, determined by countValue }
  456. end;
  457. CMDataTypePtr = ^CMDataType;
  458. CMDataType = record
  459. typeDescriptor: OSType; { 'data' = cmSigDataType }
  460. reserved: UInt32; { fill with 0x00 }
  461. dataFlag: UInt32; { 0 = ASCII, 1 = binary }
  462. data: SInt8; { variable size, determined by tag element size }
  463. end;
  464. CMDateTimeTypePtr = ^CMDateTimeType;
  465. CMDateTimeType = record
  466. typeDescriptor: OSType; { 'dtim' = cmSigDateTimeType }
  467. reserved: UInt32; { fill with 0x00 }
  468. dateTime: CMDateTime; { }
  469. end;
  470. CMLut16TypePtr = ^CMLut16Type;
  471. CMLut16Type = record
  472. typeDescriptor: OSType; { 'mft2' = cmSigLut16Type }
  473. reserved: UInt32; { fill with 0x00 }
  474. inputChannels: SInt8; { Number of input channels }
  475. outputChannels: SInt8; { Number of output channels }
  476. gridPoints: SInt8; { Number of clutTable grid points }
  477. reserved2: SInt8; { fill with 0x00 }
  478. matrix: array [0..2,0..2] of Fixed; { }
  479. inputTableEntries: UInt16; { Number of entries in 1-D input luts }
  480. outputTableEntries: UInt16; { Number of entries in 1-D output luts }
  481. inputTable: array [0..0] of UInt16; { variable size, determined by inputChannels*inputTableEntries }
  482. end;
  483. CMLut8TypePtr = ^CMLut8Type;
  484. CMLut8Type = record
  485. typeDescriptor: OSType; { 'mft1' = cmSigLut8Type }
  486. reserved: UInt32; { fill with 0x00 }
  487. inputChannels: SInt8; { Number of input channels }
  488. outputChannels: SInt8; { Number of output channels }
  489. gridPoints: SInt8; { Number of clutTable grid points }
  490. reserved2: SInt8; { fill with 0x00 }
  491. matrix: array [0..2,0..2] of Fixed; { }
  492. inputTable: SInt8; { variable size, determined by inputChannels*256 }
  493. end;
  494. CMMultiFunctLutTypePtr = ^CMMultiFunctLutType;
  495. CMMultiFunctLutType = record
  496. typeDescriptor: OSType; { 'mAB ' = cmSigMultiFunctA2BType or 'mBA ' = cmSigMultiFunctB2AType }
  497. reserved: UInt32; { fill with 0x00 }
  498. inputChannels: SInt8; { Number of input channels }
  499. outputChannels: SInt8; { Number of output channels }
  500. reserved2: UInt16; { fill with 0x00 }
  501. offsetBcurves: UInt32; { offset to first "B" curve }
  502. offsetMatrix: UInt32; { offset to 3x4 matrix }
  503. offsetMcurves: UInt32; { offset to first "M" curve }
  504. offsetCLUT: UInt32; { offset to multi-dimensional LUT of type CMMultiFunctCLUTType }
  505. offsetAcurves: UInt32; { offset to first "A" curve }
  506. data: SInt8; { variable size }
  507. end;
  508. CMMultiFunctLutA2BType = CMMultiFunctLutType;
  509. CMMultiFunctLutA2BTypePtr = ^CMMultiFunctLutA2BType;
  510. CMMultiFunctLutB2AType = CMMultiFunctLutType;
  511. CMMultiFunctLutB2ATypePtr = ^CMMultiFunctLutB2AType;
  512. CMMultiFunctCLUTTypePtr = ^CMMultiFunctCLUTType;
  513. CMMultiFunctCLUTType = record
  514. gridPoints: packed array[0..15] of UInt8; { grigpoints for each input channel dimension (remaining are 0) }
  515. entrySize: SInt8; { bytes per lut enrty (1 or 2) }
  516. reserved: array[0..2] of SInt8; { fill with 0x00 }
  517. data: SInt8; { variable size, determined by above }
  518. pad: SInt8; { pad byte needed for correct record size. Critical to accessing CMMultiFunctLutType's variable sized data field contents. }
  519. end;
  520. CMMeasurementTypePtr = ^CMMeasurementType;
  521. CMMeasurementType = record
  522. typeDescriptor: OSType; { 'meas' = cmSigMeasurementType }
  523. reserved: UInt32; { fill with 0x00 }
  524. standardObserver: UInt32; { cmStdobsUnknown, cmStdobs1931TwoDegrees, cmStdobs1964TenDegrees }
  525. backingXYZ: CMFixedXYZColor; { absolute XYZ values of backing }
  526. geometry: UInt32; { cmGeometryUnknown, cmGeometry045or450 (0/45), cmGeometry0dord0 (0/d or d/0) }
  527. flare: UInt32; { cmFlare0, cmFlare100 }
  528. illuminant: UInt32; { cmIlluminantUnknown, cmIlluminantD50, ... }
  529. end;
  530. CMNamedColorTypePtr = ^CMNamedColorType;
  531. CMNamedColorType = record
  532. typeDescriptor: OSType; { 'ncol' = cmSigNamedColorType }
  533. reserved: UInt32; { fill with 0x00 }
  534. vendorFlag: UInt32; { }
  535. count: UInt32; { count of named colors in array that follows }
  536. prefixName: SInt8; { variable size, max = 32 }
  537. end;
  538. CMNamedColor2EntryTypePtr = ^CMNamedColor2EntryType;
  539. CMNamedColor2EntryType = record
  540. rootName: packed array [0..31] of UInt8; { 32 byte field. 7 bit ASCII null terminated }
  541. PCSColorCoords: array [0..2] of UInt16; { Lab or XYZ color }
  542. DeviceColorCoords: array [0..0] of UInt16; { variable size }
  543. end;
  544. CMNamedColor2TypePtr = ^CMNamedColor2Type;
  545. CMNamedColor2Type = record
  546. typeDescriptor: OSType; { 'ncl2' = cmSigNamedColor2Type }
  547. reserved: UInt32; { fill with 0x00 }
  548. vendorFlag: UInt32; { lower 16 bits reserved for ICC use }
  549. count: UInt32; { count of named colors in array that follows }
  550. deviceChannelCount: UInt32; { number of device channels, 0 indicates no device value available }
  551. prefixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
  552. suffixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
  553. data: SInt8; { variable size data for CMNamedColor2EntryType }
  554. end;
  555. CMNativeDisplayInfoPtr = ^CMNativeDisplayInfo;
  556. CMNativeDisplayInfo = record
  557. dataSize: UInt32; { Size of this structure }
  558. redPhosphor: CMFixedXYColor; { Phosphors - native cromaticity values of the display }
  559. greenPhosphor: CMFixedXYColor;
  560. bluePhosphor: CMFixedXYColor;
  561. whitePoint: CMFixedXYColor;
  562. redGammaValue: Fixed; { Gammas - native gamma values of the display }
  563. greenGammaValue: Fixed;
  564. blueGammaValue: Fixed;
  565. { Gamma tables - if if gammaChannels is not zero, }
  566. { native gamma tables are preferred over values }
  567. { redGammaValue, greenGammaValue, blueGammaValue }
  568. gammaChannels: UInt16; { # of gamma channels (1 or 3) }
  569. gammaEntryCount: UInt16; { 1-based number of entries per channel }
  570. gammaEntrySize: UInt16; { size in bytes of each entry }
  571. gammaData: SInt8; { variable size, determined by channels*entryCount*entrySize }
  572. end;
  573. CMNativeDisplayInfoTypePtr = ^CMNativeDisplayInfoType;
  574. CMNativeDisplayInfoType = record
  575. typeDescriptor: OSType; { 'ndin' = cmSigNativeDisplayInfoType }
  576. reserved: UInt32; { fill with 0x00 }
  577. nativeDisplayInfo: CMNativeDisplayInfo; { data of type CMNativeDisplayInfo }
  578. end;
  579. CMParametricCurveTypePtr = ^CMParametricCurveType;
  580. CMParametricCurveType = record
  581. typeDescriptor: OSType; { 'para' = cmSigParametricCurveType }
  582. reserved: UInt32; { fill with 0x00 }
  583. functionType: UInt16; { cmParametricType0, cmParametricType1, etc. }
  584. reserved2: UInt16; { fill with 0x00 }
  585. value: array[0..0] of Fixed; { variable size, determined by functionType }
  586. end;
  587. CMTextDescriptionTypePtr = ^CMTextDescriptionType;
  588. CMTextDescriptionType = packed record
  589. typeDescriptor: OSType; { 'desc' = cmSigProfileDescriptionType }
  590. reserved: UInt32; { fill with 0x00 }
  591. ASCIICount: UInt32; { Count of bytes (including null terminator) }
  592. ASCIIName: packed array [0..1] of UInt8; { variable size, determined by ASCIICount. 7 bit ASCII null terminated }
  593. end;
  594. CMTextTypePtr = ^CMTextType;
  595. CMTextType = record
  596. typeDescriptor: OSType; { 'text' = cmSigTextType }
  597. reserved: UInt32; { fill with 0x00 }
  598. text: SInt8; { variable size, determined by tag element size }
  599. end;
  600. CMUnicodeTextTypePtr = ^CMUnicodeTextType;
  601. CMUnicodeTextType = record
  602. typeDescriptor: OSType; { 'utxt' = cmSigUnicodeTextType }
  603. reserved: UInt32; { fill with 0x00 }
  604. text: array [0..0] of UniChar; { variable size, determined by tag element size }
  605. end;
  606. CMScreeningChannelRecPtr = ^CMScreeningChannelRec;
  607. CMScreeningChannelRec = record
  608. frequency: Fixed;
  609. angle: Fixed;
  610. spotFunction: UInt32;
  611. end;
  612. CMScreeningTypePtr = ^CMScreeningType;
  613. CMScreeningType = record
  614. typeDescriptor: OSType; { 'scrn' = cmSigScreeningType }
  615. reserved: UInt32; { fill with 0x00 }
  616. screeningFlag: UInt32; { bit 0 : use printer default screens, bit 1 : inch/cm }
  617. channelCount: UInt32; { }
  618. channelInfo: array [0..0] of CMScreeningChannelRec; { variable size, determined by channelCount }
  619. end;
  620. CMSignatureTypePtr = ^CMSignatureType;
  621. CMSignatureType = record
  622. typeDescriptor: OSType; { 'sig ' = cmSigSignatureType }
  623. reserved: UInt32; { fill with 0x00 }
  624. signature: OSType;
  625. end;
  626. CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
  627. CMS15Fixed16ArrayType = record
  628. typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
  629. reserved: UInt32; { fill with 0x00 }
  630. value: array [0..0] of Fixed; { variable size, determined by tag element size }
  631. end;
  632. CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
  633. CMU16Fixed16ArrayType = record
  634. typeDescriptor: OSType; { 'uf32' = cmSigU16Fixed16Type }
  635. reserved: UInt32; { fill with 0x00 }
  636. value: array [0..0] of UInt32; { variable size, determined by tag element size }
  637. end;
  638. CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
  639. CMUInt8ArrayType = record
  640. typeDescriptor: OSType; { 'ui08' = cmSigUInt8Type }
  641. reserved: UInt32; { fill with 0x00 }
  642. value: SInt8; { variable size, determined by tag element size }
  643. end;
  644. CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
  645. CMUInt16ArrayType = record
  646. typeDescriptor: OSType; { 'ui16' = cmSigUInt16Type }
  647. reserved: UInt32; { fill with 0x00 }
  648. value: array [0..0] of UInt16; { variable size, determined by tag element size }
  649. end;
  650. CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
  651. CMUInt32ArrayType = record
  652. typeDescriptor: OSType; { 'ui32' = cmSigUInt32Type }
  653. reserved: UInt32; { fill with 0x00 }
  654. value: array [0..0] of UInt32; { variable size, determined by tag element size }
  655. end;
  656. CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
  657. CMUInt64ArrayType = record
  658. typeDescriptor: OSType; { 'ui64' = cmSigUInt64Type }
  659. reserved: UInt32; { fill with 0x00 }
  660. value: array [0..0] of UInt32; { variable size, determined by tag element size }
  661. end;
  662. CMViewingConditionsTypePtr = ^CMViewingConditionsType;
  663. CMViewingConditionsType = record
  664. typeDescriptor: OSType; { 'view' = cmSigViewingConditionsType }
  665. reserved: UInt32; { fill with 0x00 }
  666. illuminant: CMFixedXYZColor; { absolute XYZs of illuminant in cd/m^2 }
  667. surround: CMFixedXYZColor; { absolute XYZs of surround in cd/m^2 }
  668. stdIlluminant: UInt32; { see definitions of std illuminants }
  669. end;
  670. CMXYZTypePtr = ^CMXYZType;
  671. CMXYZType = record
  672. typeDescriptor: OSType; { 'XYZ ' = cmSigXYZType }
  673. reserved: UInt32; { fill with 0x00 }
  674. XYZ: array [0..0] of CMFixedXYZColor; { variable size, determined by tag element size }
  675. end;
  676. CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
  677. CMProfileSequenceDescType = record
  678. typeDescriptor: OSType; { 'pseq' = cmProfileSequenceDescTag }
  679. reserved: UInt32; { fill with 0x00 }
  680. count: UInt32; { Number of descriptions }
  681. data: SInt8; { variable size data explained in ICC spec }
  682. end;
  683. CMUcrBgTypePtr = ^CMUcrBgType;
  684. CMUcrBgType = record
  685. typeDescriptor: OSType; { 'bfd ' = cmSigUcrBgType }
  686. reserved: UInt32; { fill with 0x00 }
  687. ucrCount: UInt32; { Number of UCR entries }
  688. ucrValues: array [0..0] of UInt16; { variable size, determined by ucrCount }
  689. end;
  690. { Private Tag Type Definitions }
  691. CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
  692. CMIntentCRDVMSize = record
  693. renderingIntent: SInt32; { rendering intent }
  694. VMSize: UInt32; { VM size taken up by the CRD }
  695. end;
  696. CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
  697. CMPS2CRDVMSizeType = record
  698. typeDescriptor: OSType; { 'psvm' = cmSigPS2CRDVMSizeType }
  699. reserved: UInt32; { fill with 0x00 }
  700. count: UInt32; { number of intent entries }
  701. intentCRD: array [0..0] of CMIntentCRDVMSize; { variable size, determined by count }
  702. end;
  703. const
  704. cmVideoCardGammaTableType = 0;
  705. cmVideoCardGammaFormulaType = 1;
  706. type
  707. CMVideoCardGammaTablePtr = ^CMVideoCardGammaTable;
  708. CMVideoCardGammaTable = record
  709. channels: UInt16; { # of gamma channels (1 or 3) }
  710. entryCount: UInt16; { 1-based number of entries per channel }
  711. entrySize: UInt16; { size in bytes of each entry }
  712. data: SInt8; { variable size, determined by channels*entryCount*entrySize }
  713. end;
  714. CMVideoCardGammaFormulaPtr = ^CMVideoCardGammaFormula;
  715. CMVideoCardGammaFormula = record
  716. redGamma: Fixed; { must be > 0.0 }
  717. redMin: Fixed; { must be > 0.0 and < 1.0 }
  718. redMax: Fixed; { must be > 0.0 and < 1.0 }
  719. greenGamma: Fixed; { must be > 0.0 }
  720. greenMin: Fixed; { must be > 0.0 and < 1.0 }
  721. greenMax: Fixed; { must be > 0.0 and < 1.0 }
  722. blueGamma: Fixed; { must be > 0.0 }
  723. blueMin: Fixed; { must be > 0.0 and < 1.0 }
  724. blueMax: Fixed; { must be > 0.0 and < 1.0 }
  725. end;
  726. CMVideoCardGammaPtr = ^CMVideoCardGamma;
  727. CMVideoCardGamma = record
  728. tagType: UInt32;
  729. case SInt16 of
  730. 0: (
  731. table: CMVideoCardGammaTable;
  732. );
  733. 1: (
  734. formula: CMVideoCardGammaFormula;
  735. );
  736. end;
  737. CMVideoCardGammaTypePtr = ^CMVideoCardGammaType;
  738. CMVideoCardGammaType = record
  739. typeDescriptor: OSType; { 'vcgt' = cmSigVideoCardGammaType }
  740. reserved: UInt32; { fill with 0x00 }
  741. gamma: CMVideoCardGamma;
  742. end;
  743. CMMakeAndModelPtr = ^CMMakeAndModel;
  744. CMMakeAndModel = record
  745. manufacturer: OSType;
  746. model: UInt32;
  747. serialNumber: UInt32;
  748. manufactureDate: UInt32;
  749. reserved1: UInt32; { fill with 0x00 }
  750. reserved2: UInt32; { fill with 0x00 }
  751. reserved3: UInt32; { fill with 0x00 }
  752. reserved4: UInt32; { fill with 0x00 }
  753. end;
  754. CMMakeAndModelTypePtr = ^CMMakeAndModelType;
  755. CMMakeAndModelType = record
  756. typeDescriptor: OSType; { 'mmod' = cmSigMakeAndModelType }
  757. reserved: UInt32; { fill with 0x00 }
  758. makeAndModel: CMMakeAndModel;
  759. end;
  760. CMMultiLocalizedUniCodeEntryRecPtr = ^CMMultiLocalizedUniCodeEntryRec;
  761. CMMultiLocalizedUniCodeEntryRec = record
  762. languageCode: packed array [0..1] of char; { language code from ISO-639 }
  763. regionCode: packed array [0..1] of char; { region code from ISO-3166 }
  764. textLength: UInt32; { the length in bytes of the string }
  765. textOffset: UInt32; { the offset from the start of tag in bytes }
  766. end;
  767. CMMultiLocalizedUniCodeTypePtr = ^CMMultiLocalizedUniCodeType;
  768. CMMultiLocalizedUniCodeType = record
  769. typeDescriptor: OSType; { 'mluc' = cmSigMultiLocalizedUniCodeType }
  770. reserved: UInt32; { fill with 0x00 }
  771. entryCount: UInt32; { 1-based number of name records that follow }
  772. entrySize: UInt32; { size in bytes of name records that follow }
  773. { variable-length data for storage of CMMultiLocalizedUniCodeEntryRec }
  774. { variable-length data for storage of Unicode strings }
  775. end;
  776. { ********************************************************************** }
  777. { ************** ColorSync 1.0 profile specification ******************* }
  778. { ********************************************************************** }
  779. const
  780. cmGrayResponse = 0;
  781. cmRedResponse = 1;
  782. cmGreenResponse = 2;
  783. cmBlueResponse = 3;
  784. cmCyanResponse = 4;
  785. cmMagentaResponse = 5;
  786. cmYellowResponse = 6;
  787. cmUcrResponse = 7;
  788. cmBgResponse = 8;
  789. cmOnePlusLastResponse = 9;
  790. { Device types }
  791. cmMonitorDevice = $6D6E7472 (* 'mntr' *);
  792. cmScannerDevice = $73636E72 (* 'scnr' *);
  793. cmPrinterDevice = $70727472 (* 'prtr' *);
  794. type
  795. CMIStringPtr = ^CMIString;
  796. CMIString = record
  797. theScript: ScriptCode;
  798. theString: Str63;
  799. end;
  800. { Profile options }
  801. const
  802. cmPerceptualMatch = $0000; { Default. For photographic images }
  803. cmColorimetricMatch = $0001; { Exact matching when possible }
  804. cmSaturationMatch = $0002; { For solid colors }
  805. { Profile flags }
  806. cmNativeMatchingPreferred = $00000001; { Default to native not preferred }
  807. cmTurnOffCache = $00000002; { Default to turn on CMM cache }
  808. type
  809. CMMatchOption = SInt32;
  810. CMMatchFlag = SInt32;
  811. CMHeaderPtr = ^CMHeader;
  812. CMHeader = record
  813. size: UInt32;
  814. CMMType: OSType;
  815. applProfileVersion: UInt32;
  816. dataType: OSType;
  817. deviceType: OSType;
  818. deviceManufacturer: OSType;
  819. deviceModel: UInt32;
  820. deviceAttributes: array [0..1] of UInt32;
  821. profileNameOffset: UInt32;
  822. customDataOffset: UInt32;
  823. flags: CMMatchFlag;
  824. options: CMMatchOption;
  825. white: CMXYZColor;
  826. black: CMXYZColor;
  827. end;
  828. CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
  829. CMProfileChromaticities = record
  830. red: CMXYZColor;
  831. green: CMXYZColor;
  832. blue: CMXYZColor;
  833. cyan: CMXYZColor;
  834. magenta: CMXYZColor;
  835. yellow: CMXYZColor;
  836. end;
  837. CMProfileResponsePtr = ^CMProfileResponse;
  838. CMProfileResponse = record
  839. counts: array [0..8] of UInt16;
  840. data: array [0..0] of UInt16; { Variable size }
  841. end;
  842. CMProfilePtr = ^CMProfile;
  843. CMProfile = record
  844. header: CMHeader;
  845. profile: CMProfileChromaticities;
  846. response: CMProfileResponse;
  847. profileName: CMIString;
  848. customData: SInt8; { Variable size }
  849. end;
  850. CMProfileHandle = ^CMProfilePtr;
  851. {$ifc OLDROUTINENAMES}
  852. const
  853. kCMApplProfileVersion = $00000100;
  854. grayResponse = 0;
  855. redResponse = 1;
  856. greenResponse = 2;
  857. blueResponse = 3;
  858. cyanResponse = 4;
  859. magentaResponse = 5;
  860. yellowResponse = 6;
  861. ucrResponse = 7;
  862. bgResponse = 8;
  863. onePlusLastResponse = 9;
  864. rgbData = $52474220 (* 'RGB ' *);
  865. cmykData = $434D594B (* 'CMYK' *);
  866. grayData = $47524159 (* 'GRAY' *);
  867. xyzData = $58595A20 (* 'XYZ ' *);
  868. monitorDevice = $6D6E7472 (* 'mntr' *);
  869. scannerDevice = $73636E72 (* 'scnr' *);
  870. printerDevice = $70727472 (* 'prtr' *);
  871. type
  872. XYZComponent = UInt16;
  873. XYZColor = CMXYZColor;
  874. XYZColorPtr = ^XYZColor;
  875. CMResponseData = UInt16;
  876. IString = CMIString;
  877. IStringPtr = ^IString;
  878. CMResponseColor = SInt32;
  879. responseColor = CMResponseColor;
  880. {$endc} {OLDROUTINENAMES}
  881. {$ALIGN MAC68K}
  882. end.