00001 #ifndef __OverrideColorConversion__
00002 #define __OverrideColorConversion__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __AITypes__
00029 #include "AITypes.h"
00030 #endif
00031
00032 #include "AIHeaderBegin.h"
00033
00036
00037
00038
00039
00040
00041
00042 #define kAIOverrideColorConversionSuite "Override AI Color Conversion Suite"
00043 #define kAIOverrideColorConversionSuiteVersion8 AIAPI_VERSION(8)
00044 #define kAIOverrideColorConversionSuiteVersion kAIOverrideColorConversionSuiteVersion8
00045 #define kAIOverrideColorConversionVersion kAIOverrideColorConversionSuiteVersion
00046
00047
00048
00050 enum AIWorkingColorSpace {
00052 kGrayWS = 0,
00054 kRGBWS = 1,
00056 kCMYKWS = 2
00057 };
00058
00059
00061 enum AIRGBPixelFormat {
00063 kARGB = 0,
00065 kRGB = 1
00066 };
00067
00068
00069 constexpr ai::uint32 kCyan = 0x00000001;
00070 constexpr ai::uint32 kMagenta = 0x00000002;
00071 constexpr ai::uint32 kYellow = 0x00000004;
00072 constexpr ai::uint32 kBlack = 0x00000008;
00073 constexpr ai::uint32 kCMYK = 0x0000000f;
00074
00076 enum AIRenderingIntent {
00077 kICPerceptual = 0,
00078 kICRelativeColorimetric = 1,
00079 kICSaturation = 2,
00080 kICAbsoluteColorimetric = 3
00081 };
00082
00084 enum AIFileOpenColorProfilePolicy {
00086 kConvert = 0,
00088 kUntag = 1,
00090 kPreserve = 2,
00092 kCancel = 3
00093 };
00094
00096 enum AIFileSaveColorProfilePolicy {
00098 kNoProfile = 0,
00100 kWSProfile = 1,
00102 kDocProfile = 2
00103 };
00104
00108 typedef enum ColorConvPolicy
00109 {
00111 kPreserveAppearance,
00113 kPreserveNumbers
00114 } ColorConvPolicy;
00115
00126 typedef enum InternalColorTransformType
00127 {
00128 kRGB2RGB=0,
00129 kRGB2CMYK,
00130 kCMYK2CMYK,
00131 kCMYK2RGB,
00132 kRGB2sRGB,
00133 kCMYK2sRGB,
00134 kLAB2RGB,
00135
00136
00137
00138 ksGray2RGB,
00139 ksYCC8_2RGB,
00140 kesRGB2RGB,
00141 kROMMRGB2RGB,
00142 kesYCC8_2RGB,
00143
00144
00145 kCIELab_16Bit2RGB,
00146 ksGray_16Bit2RGB,
00147 ksYCC8_16Bit2RGB,
00148 kesRGB_16Bit2RGB,
00149 kROMMRGB_16Bit2RGB,
00150 kesYCC8_16Bit2RGB,
00151
00152 kNumTransforms
00153 } InternalColorTransformType;
00154
00156 typedef struct {
00159 ASUInt32 Range1;
00160 ASUInt32 Offset1;
00161 ASUInt32 Range2;
00162 ASUInt32 Offset2;
00163 ASUInt32 Range3;
00164 ASUInt32 Offset3;
00166 ASUInt32 Illuminant;
00167 } JPXLabParams;
00168
00170 typedef struct {
00172 AIReal min;
00174 AIReal max;
00175 } AIRange;
00176
00177
00179 typedef struct {
00180 AIReal X;
00181 AIReal Y;
00182 AIReal Z;
00183 } AIXYZColor;
00184
00185
00187 typedef struct {
00188 AIXYZColor whitePoint;
00189 AIXYZColor blackPoint;
00190 AIReal gamma;
00191 } AIGrayCal;
00192
00194 typedef struct {
00195 AIXYZColor whitePoint;
00196 AIXYZColor blackPoint;
00197 AIXYZColor red;
00198 AIXYZColor green;
00199 AIXYZColor blue;
00200 AIReal redGamma;
00201 AIReal greenGamma;
00202 AIReal blueGamma;
00203 } AIRGBCal;
00204
00206 typedef struct {
00207 ASUInt32 bytesPerValue;
00208 ASUInt32 count;
00209 void *data;
00210 } AIToneCurve;
00211
00213 typedef struct {
00214 AIXYZColor whitePoint;
00215 AIXYZColor blackPoint;
00216 AIXYZColor w;
00217 AIXYZColor c;
00218 AIXYZColor m;
00219 AIXYZColor y;
00220 AIXYZColor k;
00221 AIXYZColor cm;
00222 AIXYZColor cy;
00223 AIXYZColor ck;
00224 AIXYZColor my;
00225 AIXYZColor mk;
00226 AIXYZColor yk;
00227 AIXYZColor cmy;
00228 AIXYZColor cmk;
00229 AIXYZColor cyk;
00230 AIXYZColor myk;
00231 AIXYZColor cmyk;
00232
00233 AIToneCurve cTRC;
00234 AIToneCurve mTRC;
00235 AIToneCurve yTRC;
00236 AIToneCurve kTRC;
00237
00238 AIReal opticalGamma;
00239
00240 } AICMYKCal;
00241
00242
00243
00244
00245
00246
00247
00248
00266 typedef struct {
00267
00278 AIAPI AIErr ( *GamutRGBToCMYKImage )( void *srcBuf, const ASUInt32 numSamples,
00279 const ASUInt32 rgbFormat, ASBoolean *inGamut );
00280
00289 AIAPI AIErr ( *CreateXform )(const AIColorProfile srcProfile, const AIColorProfile destProfile, ai::uintptr *xform );
00290
00295 AIAPI void ( *FreeXform )( const ai::uintptr xform );
00296
00304 AIAPI AIErr ( *ApplyXformSample )( const ai::uintptr xform, ASFixed *inColor, ASFixed *outColor,
00305 const InternalColorTransformType convType, ASBoolean isLAB );
00306
00318 AIAPI AIErr ( *ApplyXformImage )( const ai::uintptr xform, void *inBuffer, void *outBuffer, const ASUInt32 numPixels,
00319 const InternalColorTransformType convType, ASBoolean isLAB , ASInt16 format);
00320
00327 AIAPI AIErr ( *CreateProfileFromTag )( void *buffer, const ASUInt32 size, AIColorProfile *profile );
00328
00334 AIAPI AIErr ( *GetWSProfile )( const ASUInt32 whichProfile, AIColorProfile *profile );
00335
00341 AIAPI void ( *FreeProfile )( AIColorProfile profile );
00342
00364 AIAPI ASUInt32 ( *GetOpenPolicy )(AIColorProfile *profile, ASUInt32 colorModel, ASBoolean isLink,
00365 ASBoolean linkHasMultipleProfiles);
00366
00381 AIAPI void ( *GetSavePolicy )( const ASUInt32 whichSpace, ASUInt32 *policy, ASUInt32 *defaultState, ai::UnicodeString& profName);
00382
00390 AIAPI AIErr ( *GetProfileData ) (const AIColorProfile profile, ASUInt32 *size, void *data );
00391
00396 AIAPI AIErr ( *GetProfileName) (const AIColorProfile profile, ai::UnicodeString& profileName ) ;
00397
00404 AIAPI AIErr(*GetProfileByName) (const ai::UnicodeString& profileName, AIColorProfile *profile);
00405
00444 AIAPI AIErr ( *CreateInternalTransform) (const InternalColorTransformType whichOne, AIColorProfile scrProfile, AIColorProfile destProfile);
00445
00450 AIAPI void ( *FreeAllInternalTransforms) (void);
00451
00458 AIAPI void ( *ProfsEqual) (const AIColorProfile srcProfile, const AIColorProfile destProfile, ASUInt32 *match);
00459
00474 AIAPI void ( *GetInternalTransform)(const InternalColorTransformType whichOne, ai::uintptr *xform);
00475
00480 AIAPI void ( *BPCOn ) (void) ;
00481
00485 AIAPI void ( *RestoreBPC )(void);
00486
00487
00488
00493 AIAPI AIErr ( *MakeProfileFromCalGray)(AIGrayCal *grayCal, AIColorProfile *profile);
00498 AIAPI AIErr ( *MakeProfileFromCalRGB)(AIRGBCal *rgbCal, AIColorProfile *profile);
00499
00504 AIAPI AIErr ( *MakeProfileFromCalCMYK)(AICMYKCal *cmykCal, AIColorProfile *profile);
00505
00520 AIAPI AIErr ( *CreateInternalTransform_16Bit)(const InternalColorTransformType whichOne, AIColorProfile srcProfile, AIColorProfile dstProfile,
00521 ASUInt8* bitDepth, JPXLabParams* jpxLabParams);
00522
00529 AIAPI void ( *GetColorSettingsPolicies)(ASBoolean *AI6Mode, ColorConvPolicy *rgbPolicy, ColorConvPolicy *cmykPolicy);
00530
00535 AIAPI AIRenderingIntent ( *GetColorSettingsRenderIntent)(void);
00536
00537
00538
00544 AIAPI AIBoolean ( *IsBPCOn)();
00545
00546 } AIOverrideColorConversionSuite;
00547
00548
00549 #include "AIHeaderEnd.h"
00550
00551
00552 #endif