Adobe.com
Contents Suites Classes Class Index Member Index

AIOverrideColorConversion.h

Go to the documentation of this file.
00001 #ifndef __OverrideColorConversion__
00002 #define __OverrideColorConversion__
00003 
00004 /*
00005  *        Name: AIOverrideColorConversion.h
00006  *   $Revision: 13 $
00007  *     Purpose: Adobe Illustrator Suite to replace internal color
00008  *              conversion functionality.
00009  *
00010  * ADOBE SYSTEMS INCORPORATED
00011  * Copyright 2002-2007 Adobe Systems Incorporated.
00012  * All rights reserved.
00013  *
00014  * NOTICE:  Adobe permits you to use, modify, and distribute this file
00015  * in accordance with the terms of the Adobe license agreement
00016  * accompanying it. If you have received this file from a source other
00017  * than Adobe, then your use, modification, or distribution of it
00018  * requires the prior written permission of Adobe.
00019  *
00020  */
00021 
00022 
00023 /*******************************************************************************
00024  **
00025  **     Imports
00026  **
00027  **/
00028 
00029 #ifndef __AITypes__
00030 #include "AITypes.h"          /* Include Adobe Standard Types */
00031 #endif
00032 
00033 #include "AIHeaderBegin.h"
00034 
00037 /*******************************************************************************
00038  **
00039  **     Constants
00040  **
00041  **/
00042 
00043 #define kAIOverrideColorConversionSuite                 "Override AI Color Conversion Suite"
00044 #define kAIOverrideColorConversionSuiteVersion7 AIAPI_VERSION(7)
00045 #define kAIOverrideColorConversionSuiteVersion  kAIOverrideColorConversionSuiteVersion7
00046 #define kAIOverrideColorConversionVersion               kAIOverrideColorConversionSuiteVersion
00047 
00048 
00049 // JM - must synch with those in picasso.h
00051 enum AIWorkingColorSpace {
00053         kGrayWS         = 0,
00055         kRGBWS          = 1,
00057         kCMYKWS         = 2
00058 };
00059 
00060 
00062 enum AIRGBPixelFormat {
00064         kARGB               = 0,
00066         kRGB                = 1
00067 };
00068 
00069 
00070 /* CMYK separations/channels */
00071 
00072 #ifndef kCyan
00073 #define kCyan                   0x00000001
00074 #endif
00075 
00076 #ifndef kMagenta
00077 #define kMagenta                0x00000002
00078 #endif
00079 
00080 #ifndef kYellow
00081 #define kYellow                 0x00000004
00082 #endif
00083 
00084 #ifndef kBlack
00085 #define kBlack                  0x00000008
00086 #endif
00087 
00088 #ifndef kCMYK
00089 #define kCMYK                   0x0000000f
00090 #endif
00091 
00093 enum AIRenderingIntent {
00094         kICPerceptual                           = 0,
00095         kICRelativeColorimetric     = 1,
00096         kICSaturation                           = 2,
00097         kICAbsoluteColorimetric         = 3
00098 };
00099 
00101 enum AIFileOpenColorProfilePolicy {
00103         kConvert        = 0,
00105         kUntag          = 1,
00107         kPreserve       = 2,
00109         kCancel         = 3
00110 };
00111 
00113 enum AIFileSaveColorProfilePolicy {
00115         kNoProfile      = 0,
00117         kWSProfile      = 1,
00119         kDocProfile     = 2
00120 };
00121 
00125 typedef enum ColorConvPolicy
00126 {
00128         kPreserveAppearance,
00130         kPreserveNumbers
00131 } ColorConvPolicy;
00132 
00143 typedef enum InternalColorTransformType
00144 {
00145         kRGB2RGB=0,
00146         kRGB2CMYK,
00147         kCMYK2CMYK,
00148         kCMYK2RGB,
00149         kRGB2sRGB,
00150         kCMYK2sRGB,
00151         kLAB2RGB,
00152 
00153         // The types below are new for AI 11
00154         // New for JPEG 2000.
00155         ksGray2RGB,
00156         ksYCC8_2RGB,
00157         kesRGB2RGB,
00158         kROMMRGB2RGB,
00159         kesYCC8_2RGB,
00160 
00161         // Same as above with 8 < BPC <= 16. Only used by Jpeg2000.
00162         kCIELab_16Bit2RGB, //Also for CIELab 8 bit.
00163         ksGray_16Bit2RGB,
00164         ksYCC8_16Bit2RGB,
00165         kesRGB_16Bit2RGB,
00166         kROMMRGB_16Bit2RGB,
00167         kesYCC8_16Bit2RGB,
00168 
00169         kNumTransforms
00170 } InternalColorTransformType;
00171 
00173 typedef struct {
00176         ASUInt32 Range1;
00177         ASUInt32 Offset1;
00178         ASUInt32 Range2;
00179         ASUInt32 Offset2;
00180         ASUInt32 Range3;
00181         ASUInt32 Offset3;
00183         ASUInt32 Illuminant;
00184 } JPXLabParams;
00185 
00187 typedef struct {
00189         AIReal          min;
00191         AIReal          max;
00192 } AIRange;
00193 
00194 
00196 typedef struct  {
00197         AIReal          X;
00198         AIReal          Y;
00199         AIReal          Z;
00200 } AIXYZColor;
00201 
00202 
00204 typedef struct {
00205         AIXYZColor              whitePoint;
00206         AIXYZColor              blackPoint;
00207         AIReal          gamma;
00208 } AIGrayCal;
00209 
00211 typedef struct {
00212         AIXYZColor              whitePoint;
00213         AIXYZColor              blackPoint;
00214         AIXYZColor              red;
00215         AIXYZColor              green;
00216         AIXYZColor              blue;
00217         AIReal          redGamma;
00218         AIReal          greenGamma;
00219         AIReal          blueGamma;
00220 } AIRGBCal;
00221 
00223 typedef struct  {
00224         ASUInt32                bytesPerValue;
00225         ASUInt32                count;
00226         void                    *data;
00227 } AIToneCurve;
00228 
00230 typedef struct {
00231         AIXYZColor              whitePoint;
00232         AIXYZColor              blackPoint;
00233         AIXYZColor              w;
00234         AIXYZColor              c;
00235         AIXYZColor              m;
00236         AIXYZColor              y;
00237         AIXYZColor              k;
00238         AIXYZColor              cm;
00239         AIXYZColor              cy;
00240         AIXYZColor              ck;
00241         AIXYZColor              my;
00242         AIXYZColor              mk;
00243         AIXYZColor              yk;
00244         AIXYZColor              cmy;
00245         AIXYZColor              cmk;
00246         AIXYZColor              cyk;
00247         AIXYZColor              myk;
00248         AIXYZColor              cmyk;
00249 
00250         AIToneCurve     cTRC;
00251         AIToneCurve     mTRC;
00252         AIToneCurve     yTRC;
00253         AIToneCurve     kTRC;
00254 
00255         AIReal          opticalGamma;
00256 
00257 } AICMYKCal;
00258 
00259 /*******************************************************************************
00260  **
00261  **     Suite
00262  **
00263  **
00264  */
00265 
00283 typedef struct {
00284 
00295         AIAPI AIErr ( *GamutRGBToCMYKImage )( void *srcBuf, const ASUInt32 numSamples,
00296                                                                                 const ASUInt32 rgbFormat, ASBoolean *inGamut );
00297 
00306         AIAPI AIErr ( *CreateXform )(const AIColorProfile srcProfile, const AIColorProfile destProfile, ai::uintptr *xform );
00307 
00312         AIAPI void  ( *FreeXform )( const ai::uintptr xform );
00313 
00321         AIAPI AIErr ( *ApplyXformSample )( const ai::uintptr xform, ASFixed *inColor, ASFixed *outColor,
00322                         const InternalColorTransformType convType, ASBoolean isLAB );
00323 
00335         AIAPI AIErr ( *ApplyXformImage )( const ai::uintptr xform, void *inBuffer, void *outBuffer, const ASUInt32 numPixels,
00336                         const InternalColorTransformType convType, ASBoolean isLAB , ASInt16 format);
00337 
00344         AIAPI AIErr ( *CreateProfileFromTag )( void *buffer, const ASUInt32 size, AIColorProfile *profile );
00345 
00351         AIAPI AIErr ( *GetWSProfile )( const ASUInt32 whichProfile, AIColorProfile *profile );
00352 
00358         AIAPI void  ( *FreeProfile )( AIColorProfile profile );
00359 
00381         AIAPI ASUInt32  ( *GetOpenPolicy )(AIColorProfile *profile, ASUInt32 colorModel, ASBoolean isLink,
00382                 ASBoolean linkHasMultipleProfiles);
00383 
00398         AIAPI void  ( *GetSavePolicy )( const ASUInt32 whichSpace, ASUInt32 *policy, ASUInt32 *defaultState, ai::UnicodeString& profName);
00399 
00407         AIAPI AIErr ( *GetProfileData ) (const AIColorProfile profile, ASUInt32 *size, void *data );
00408 
00413         AIAPI AIErr ( *GetProfileName) (const AIColorProfile profile, ai::UnicodeString& profileName ) ;
00414 
00453         AIAPI AIErr ( *CreateInternalTransform) (const InternalColorTransformType whichOne, AIColorProfile scrProfile, AIColorProfile destProfile);
00454 
00459         AIAPI void  ( *FreeAllInternalTransforms) (void);
00460 
00467         AIAPI void  ( *ProfsEqual) (const AIColorProfile srcProfile, const AIColorProfile destProfile, ASUInt32 *match);
00468 
00483         AIAPI   void  ( *GetInternalTransform)(const InternalColorTransformType whichOne,  ai::uintptr *xform);
00484 
00489         AIAPI void  ( *BPCOn ) (void) ;
00490 
00494         AIAPI void  ( *RestoreBPC )(void);
00495 
00496         // New in Illustrator 11.0
00497 
00502         AIAPI AIErr ( *MakeProfileFromCalGray)(AIGrayCal *grayCal, AIColorProfile *profile);
00507         AIAPI AIErr ( *MakeProfileFromCalRGB)(AIRGBCal *rgbCal, AIColorProfile *profile);
00508 
00513         AIAPI AIErr ( *MakeProfileFromCalCMYK)(AICMYKCal *cmykCal, AIColorProfile *profile);
00514 
00529         AIAPI AIErr  ( *CreateInternalTransform_16Bit)(const InternalColorTransformType whichOne, AIColorProfile srcProfile, AIColorProfile dstProfile,
00530                         ASUInt8* bitDepth, JPXLabParams* jpxLabParams);
00531 
00538         AIAPI void   ( *GetColorSettingsPolicies)(ASBoolean *AI6Mode, ColorConvPolicy *rgbPolicy, ColorConvPolicy *cmykPolicy);
00539 
00544         AIAPI AIRenderingIntent ( *GetColorSettingsRenderIntent)(void);
00545 
00546 
00547         // New in Illustrator 16.0
00553         AIAPI AIBoolean   ( *IsBPCOn)();
00554 
00555 } AIOverrideColorConversionSuite;
00556 
00557 
00558 #include "AIHeaderEnd.h"
00559 
00560 
00561 #endif


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks