Adobe.com
Contents Suites Classes Class Index Member Index

AIColorConversion.h

Go to the documentation of this file.
00001 #ifndef __AIColorConversion__
00002 #define __AIColorConversion__
00003 
00004 /*
00005  *        Name: AIColorConversion.h
00006  *   $Revision: 6 $
00007  *      Author:
00008  *        Date:
00009  *     Purpose: Adobe Illustrator Color Conversion Suite.
00010  *
00011  * ADOBE SYSTEMS INCORPORATED
00012  * Copyright 1986-2007 Adobe Systems Incorporated.
00013  * All rights reserved.
00014  *
00015  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00016  * in accordance with the terms of the Adobe license agreement 
00017  * accompanying it. If you have received this file from a source other 
00018  * than Adobe, then your use, modification, or distribution of it 
00019  * requires the prior written permission of Adobe.
00020  *
00021  */
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
00027  **
00028  **/
00029 
00030 #ifndef __AITypes__
00031 #include "AITypes.h"
00032 #endif
00033 
00034 #include "IAIColorSpace.hpp"
00035 
00036 #include "AIHeaderBegin.h"
00037 
00040 /*******************************************************************************
00041  **
00042  **     Constants
00043  **
00044  **/
00045 
00046 #define kAIColorConversionSuite                 "AI Color Conversion Suite"
00047 #define kAIColorConversionVersion10             AIAPI_VERSION(10)
00048 #define kAIColorConversionSuiteVersion  kAIColorConversionVersion10
00049 #define kAIColorConversionVersion               kAIColorConversionSuiteVersion
00050 
00053 enum AIColorConversionSpaceValue {
00054         kAIMonoColorSpace       =               0,
00055         kAIGrayColorSpace       =               1,
00056         kAIRGBColorSpace        =               2,
00057         kAIARGBColorSpace       =               3,
00058         kAICMYKColorSpace       =               4,
00059         kAIACMYKColorSpace      =               5,
00060         kAIAGrayColorSpace      =               6,
00061         kAILabColorSpace        =               7
00062 };
00063 
00064 
00067 #define kColorConversionErr                     'CCER'
00068 
00069 
00070 
00071 /*******************************************************************************
00072  **
00073  **     Types
00074  **
00075  **/
00076 
00078 typedef AIReal AISampleComponent;
00079 typedef AIFloat AIFloatSampleComponent;
00081 typedef unsigned char AIImageComponent;
00082 
00094 class AIColorConvertOptions {
00095 public:
00097         enum Purpose {
00099                 kDefault,
00102                 kForPreview,
00105                 kForExport,
00106                 kDummy = 0xFFFFFFFF
00107         };
00111         AIColorConvertOptions () :
00112                 purpose(kDefault)
00113         {
00114         }
00115 
00127         AIColorConvertOptions (const Purpose& _purpose) :
00128                 purpose(_purpose)
00129         {
00130         }
00132         AIColorConvertOptions (const AIColorConvertOptions& src) :
00133                 purpose(src.purpose)
00134         {
00135         }
00136 
00138         AIColorConvertOptions& operator= (const AIColorConvertOptions& src)
00139         {
00140                 purpose = src.purpose;
00141                 return *this;
00142         }
00145         Purpose purpose;
00146 };
00147 
00148 /*******************************************************************************
00149  **
00150  **     Suite
00151  **
00152  **/
00153 
00166 typedef struct {
00167 
00179         AIAPI AIErr (*ConvertSampleColorEx) ( const ai::ColorSpace &srcSpace, AIFloatSampleComponent *srcColor,
00180                                                   const ai::ColorSpace &dstSpace, AIFloatSampleComponent *dstColor,
00181                                                                                   const AIColorConvertOptions& options,
00182                                                                                   ASBoolean *inGamut);
00183 
00201         AIAPI AIErr (*ConvertImageColorEx)   ( const ai::ColorSpace &srcSpace,
00202                                                                                         ai::int32 srcBitsPerPixel,
00203                                                                                    AIImageComponent *srcColor,
00204                                                    const ai::ColorSpace &dstSpace,
00205                                                                                    ai::int32 dstBitsPerPixel,
00206                                                                                    AIImageComponent *dstColor,
00207                                                                                    ai::int32 pixelCount, ai::uint16 flags,
00208                                                                                    const AIColorConvertOptions& options);
00209 
00222         AIAPI AIErr (*ConvertSampleColor) ( ai::int32 srcSpace, AIFloatSampleComponent *srcColor,
00223                                                                                 ai::int32 dstSpace, AIFloatSampleComponent *dstColor,
00224                                                                                 const AIColorConvertOptions& options,
00225                                                                                 AIBoolean *inGamut);
00226 
00242         AIAPI AIErr (*ConvertImageColor)   ( ai::int32 srcSpace, AIImageComponent *srcColor,
00243                                                                                 ai::int32 dstSpace, AIImageComponent *dstColor,
00244                                                                                 ai::int32 pixelCount, ai::uint16 flags,
00245                                                                                  const AIColorConvertOptions& options);
00246 } AIColorConversionSuite;
00247 
00248 
00249 #include "AIHeaderEnd.h"
00250 
00251 
00252 #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