Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccWrapper.cpp File Reference

File: IccWrapper.h. More...

#include "IccWrapper.h"
#include "IccApplyBPC.h"
+ Include dependency graph for IccWrapper.cpp:

Go to the source code of this file.

Classes

class  CIccCmmEnvVarsWrapper
 
class  CIccCmmEnvVarWrapperHint
 

Functions

icStatusCMM IccApplyApplyFloat (CIccApplyHandle *pApply, icFloatNumber *pTo, icFloatNumber *pFrom)
 
icStatusCMM IccApplyApplyFloatMulti (CIccApplyHandle *pApply, icFloatNumber *pTo, icFloatNumber *pFrom, icUInt32Number nPixels)
 
void IccApplyFree (CIccApplyHandle *pApply)
 
icStatusCMM IccCmmApplyFloat (CIccCmmHandle *pCmm, icFloatNumber *pTo, icFloatNumber *pFrom)
 
icStatusCMM IccCmmApplyFloatMulti (CIccCmmHandle *pCmm, icFloatNumber *pTo, icFloatNumber *pFrom, icUInt32Number nPixels)
 
icStatusCMM IccCmmAttachProfileFile (CIccCmmHandle *pCmm, const char *szFname, icRenderingIntent nIntent, icXformInterp nInterp, CIccProfileHandle *pPcc, icXformLutType nLutType, unsigned char bUseDtoBTags, unsigned char bUseBPC, SIccCmmEnvVars *pVars)
 
icStatusCMM IccCmmAttachProfileHandle (CIccCmmHandle *pCmm, CIccProfileHandle *pProfile, icRenderingIntent nIntent, icXformInterp nInterp, CIccProfileHandle *pPcc, icXformLutType nLutType, unsigned char bUseDtoBTags, unsigned char bUseBPC, SIccCmmEnvVars *pVars)
 
icStatusCMM IccCmmBegin (CIccCmmHandle *pCmm)
 
CIccCmmHandleIccCmmCreate (icColorSpaceSignature srcSpace, icColorSpaceSignature dstSpace, unsigned char bFirstIsInput)
 
void IccCmmFree (CIccCmmHandle *pCmm)
 
CIccApplyHandleIccCmmGetApply (CIccCmmHandle *pCmm)
 
icStatusCMM IccCmmGetInfo (CIccCmmHandle *pCmm, SIccCmmStruct *pCmmInfo)
 
void IccProfileFree (CIccProfileHandle *pProfile)
 
icBoolean IccProfileGetHeader (CIccProfileHandle *pProfile, icHeader *pHeader)
 
CIccProfileHandleIccProfileOpenHandle (const char *szFname)
 
CIccProfileHandleIccProfileReadHandle (const char *szFname)
 

Detailed Description

File: IccWrapper.h.

Contains: Header file for C Wrapper interface functions for CIccProfile and CIccCmm classes.

Version: V1

Copyright: (c) see ICC Software License

Definition in file IccWrapper.cpp.

Function Documentation

◆ IccApplyApplyFloat()

icStatusCMM IccApplyApplyFloat ( CIccApplyHandle * pApply,
icFloatNumber * pTo,
icFloatNumber * pFrom )

Definition at line 257 of file IccWrapper.cpp.

258{
259 if (!pApply || !pTo || !pFrom)
260 return icCmmStatBad;
261
262 CIccApplyCmm *pApplyPtr = (CIccApplyCmm*)pApply;
263
264 return pApplyPtr->Apply(pTo, pFrom);
265}
@ icCmmStatBad
Definition IccCmm.h:91

References icCmmStatBad.

◆ IccApplyApplyFloatMulti()

icStatusCMM IccApplyApplyFloatMulti ( CIccApplyHandle * pApply,
icFloatNumber * pTo,
icFloatNumber * pFrom,
icUInt32Number nPixels )

Definition at line 267 of file IccWrapper.cpp.

268{
269 if (!pApply || !pTo || !pFrom)
270 return icCmmStatBad;
271
272 CIccApplyCmm *pApplyPtr = (CIccApplyCmm*)pApply;
273
274 return pApplyPtr->Apply(pTo, pFrom, nPixels);
275}

References icCmmStatBad.

◆ IccApplyFree()

void IccApplyFree ( CIccApplyHandle * pApply)

Definition at line 277 of file IccWrapper.cpp.

278{
279 if (pApply) {
280 CIccApplyCmm *pApplyPtr = (CIccApplyCmm*)pApply;
281 delete pApplyPtr;
282 }
283}

◆ IccCmmApplyFloat()

icStatusCMM IccCmmApplyFloat ( CIccCmmHandle * pCmm,
icFloatNumber * pTo,
icFloatNumber * pFrom )

Definition at line 229 of file IccWrapper.cpp.

230{
231 if (!pCmm || !pTo || !pFrom)
232 return icCmmStatBad;
233
234 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
235
236 return pCmmPtr->Apply(pTo, pFrom);
237}

References icCmmStatBad.

◆ IccCmmApplyFloatMulti()

icStatusCMM IccCmmApplyFloatMulti ( CIccCmmHandle * pCmm,
icFloatNumber * pTo,
icFloatNumber * pFrom,
icUInt32Number nPixels )

Definition at line 239 of file IccWrapper.cpp.

240{
241 if (!pCmm || !pTo || !pFrom)
242 return icCmmStatBad;
243
244 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
245
246 return pCmmPtr->Apply(pTo, pFrom, nPixels);
247}

References icCmmStatBad.

◆ IccCmmAttachProfileFile()

icStatusCMM IccCmmAttachProfileFile ( CIccCmmHandle * pCmm,
const char * szFname,
icRenderingIntent nIntent,
icXformInterp nInterp,
CIccProfileHandle * pPcc,
icXformLutType nLutType,
unsigned char bUseDtoBTags,
unsigned char bUseBPC,
SIccCmmEnvVars * pVars )

Definition at line 131 of file IccWrapper.cpp.

140{
141 if (!pCmm)
142 return icCmmStatBad;
143
144 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
145
146 CIccCreateXformHintManager hint;
147 bool bUseHint = false;
148
149 if (bUseBPC) {
150 hint.AddHint(new CIccApplyBPCHint());
151 bUseHint = true;
152 }
153
154 if (pVars) {
155 hint.AddHint(new CIccCmmEnvVarWrapperHint(pVars));
156 bUseHint = true;
157 }
158
159 return pCmmPtr->AddXform(szFname, nIntent, nInterp, (CIccProfile*)pPcc, nLutType, bUseDtoBTags != 0, bUseHint ? &hint : NULL);
160}
Type: Class.
Definition IccApplyBPC.h:89

References icCmmStatBad.

◆ IccCmmAttachProfileHandle()

icStatusCMM IccCmmAttachProfileHandle ( CIccCmmHandle * pCmm,
CIccProfileHandle * pProfile,
icRenderingIntent nIntent,
icXformInterp nInterp,
CIccProfileHandle * pPcc,
icXformLutType nLutType,
unsigned char bUseDtoBTags,
unsigned char bUseBPC,
SIccCmmEnvVars * pVars )

Definition at line 162 of file IccWrapper.cpp.

171{
172 if (!pCmm)
173 return icCmmStatBad;
174
175 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
176 CIccProfile *pProfilePtr = (CIccProfile*)pProfile;
177
178 CIccCreateXformHintManager hint;
179 bool bUseHint = false;
180
181 if (bUseBPC) {
182 hint.AddHint(new CIccApplyBPCHint());
183 bUseHint = true;
184 }
185
186 if (pVars) {
187 hint.AddHint(new CIccCmmEnvVarWrapperHint(pVars));
188 bUseHint = true;
189 }
190
191 return pCmmPtr->AddXform(pProfilePtr, nIntent, nInterp, (CIccProfile*)pPcc, nLutType, bUseDtoBTags != 0, bUseHint ? &hint : NULL);
192}

References icCmmStatBad.

◆ IccCmmBegin()

icStatusCMM IccCmmBegin ( CIccCmmHandle * pCmm)

Definition at line 194 of file IccWrapper.cpp.

195{
196 if (!pCmm)
197 return icCmmStatBad;
198
199 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
200
201 return pCmmPtr->Begin();
202}

References icCmmStatBad.

◆ IccCmmCreate()

CIccCmmHandle * IccCmmCreate ( icColorSpaceSignature srcSpace,
icColorSpaceSignature dstSpace,
unsigned char bFirstIsInput )

Definition at line 126 of file IccWrapper.cpp.

127{
128 return (CIccCmmHandle*)new CIccCmm(srcSpace, dstSpace, bFirstIsInput != 0);
129}
void CIccCmmHandle
Definition IccWrapper.h:76

◆ IccCmmFree()

void IccCmmFree ( CIccCmmHandle * pCmm)

Definition at line 249 of file IccWrapper.cpp.

250{
251 if (pCmm) {
252 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
253 delete pCmmPtr;
254 }
255}

◆ IccCmmGetApply()

CIccApplyHandle * IccCmmGetApply ( CIccCmmHandle * pCmm)

Definition at line 204 of file IccWrapper.cpp.

205{
206 if (!pCmm)
207 return NULL;
208
209 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
210
211 return (CIccApplyHandle*)pCmmPtr->GetApply();
212}
void CIccApplyHandle
Definition IccWrapper.h:77

◆ IccCmmGetInfo()

icStatusCMM IccCmmGetInfo ( CIccCmmHandle * pCmm,
SIccCmmStruct * pCmmInfo )

Definition at line 214 of file IccWrapper.cpp.

215{
216 if (!pCmm || !pCmmInfo)
217 return icCmmStatBad;
218
219 CIccCmm *pCmmPtr = (CIccCmm*)pCmm;
220
221 pCmmInfo->srcSpace = pCmmPtr->GetSourceSpace();
222 pCmmInfo->srcSamples = pCmmPtr->GetSourceSamples();
223 pCmmInfo->dstSpace = pCmmPtr->GetDestSpace();
224 pCmmInfo->dstSamples = pCmmPtr->GetDestSamples();
225
226 return icCmmStatOk;
227}
@ icCmmStatOk
Definition IccCmm.h:92
icColorSpaceSignature dstSpace
Definition IccWrapper.h:82
icUInt16Number srcSamples
Definition IccWrapper.h:83
icUInt16Number dstSamples
Definition IccWrapper.h:84
icColorSpaceSignature srcSpace
Definition IccWrapper.h:81

References SIccCmmStruct::dstSamples, SIccCmmStruct::dstSpace, icCmmStatBad, icCmmStatOk, SIccCmmStruct::srcSamples, and SIccCmmStruct::srcSpace.

◆ IccProfileFree()

void IccProfileFree ( CIccProfileHandle * pProfile)

Definition at line 306 of file IccWrapper.cpp.

307{
308 if (pProfile) {
309 CIccProfileHandle *pProfilePtr = (CIccProfileHandle*)pProfile;
310 delete pProfilePtr;
311 }
312}
void CIccProfileHandle
Definition IccWrapper.h:78

◆ IccProfileGetHeader()

icBoolean IccProfileGetHeader ( CIccProfileHandle * pProfile,
icHeader * pHeader )

Definition at line 294 of file IccWrapper.cpp.

295{
296 if (!pProfile || !pHeader)
297 return 0;
298
299 CIccProfile *pProfilePtr = (CIccProfile*)pProfile;
300
301 *pHeader = pProfilePtr->m_Header;
302
303 return 1;
304}

◆ IccProfileOpenHandle()

CIccProfileHandle * IccProfileOpenHandle ( const char * szFname)

Definition at line 290 of file IccWrapper.cpp.

291{
292 return (CIccProfileHandle*)OpenIccProfile(szFname);
293}
CIccProfile * OpenIccProfile(const icChar *szFilename, bool bUseSubProfile)
Name: OpenIccProfile.

References OpenIccProfile().

+ Here is the call graph for this function:

◆ IccProfileReadHandle()

CIccProfileHandle * IccProfileReadHandle ( const char * szFname)

Definition at line 285 of file IccWrapper.cpp.

286{
287 return (CIccProfileHandle*)ReadIccProfile(szFname);
288}
CIccProfile * ReadIccProfile(const icChar *szFilename, bool bUseSubProfile)
Name: ReadIccProfile.

References ReadIccProfile().

+ Here is the call graph for this function: