Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccIO Class Reference

Type: Class. More...

#include <IccIO.h>

+ Inheritance diagram for CIccIO:
+ Collaboration diagram for CIccIO:

Public Member Functions

bool Align32 ()
 Write operation to make sure that filelength is evenly divisible by 4.
 
virtual void Close ()
 
virtual icInt32Number GetLength ()
 
icInt32Number Read16 (void *pBuf16, icInt32Number nNum=1)
 
icInt32Number Read32 (void *pBuf32, icInt32Number nNum=1)
 
icInt32Number Read64 (void *pBuf64, icInt32Number nNum=1)
 
virtual icInt32Number Read8 (void *pBuf8, icInt32Number nNum=1)
 
icInt32Number ReadFloat16Float (void *pBufFloat, icInt32Number nNum=1)
 
icInt32Number ReadFloat32Float (void *pBufFloat, icInt32Number nNum=1)
 
icInt32Number ReadLine (void *pBuf8, icInt32Number nNum=256)
 
icInt32Number ReadUInt16Float (void *pBufFloat, icInt32Number nNum=1)
 
icInt32Number ReadUInt8Float (void *pBufFloat, icInt32Number nNum=1)
 
virtual icInt32Number Seek (icInt32Number nOffset, icSeekVal pos)
 
bool Sync32 (icUInt32Number nOffset=0)
 Operation to make sure read position is evenly divisible by 4.
 
virtual icInt32Number Tell ()
 
icInt32Number Write16 (void *pBuf16, icInt32Number nNum=1)
 
icInt32Number Write32 (void *pBuf32, icInt32Number nNum=1)
 
icInt32Number Write64 (void *pBuf64, icInt32Number nNum=1)
 
virtual icInt32Number Write8 (void *pBuf8, icInt32Number nNum=1)
 
icInt32Number WriteFloat16Float (void *pBuf16, icInt32Number nNum=1)
 
icInt32Number WriteFloat32Float (void *pBufFloat, icInt32Number nNum=1)
 
icInt32Number WriteUInt16Float (void *pBuf16, icInt32Number nNum=1)
 
icInt32Number WriteUInt8Float (void *pBuf16, icInt32Number nNum=1)
 
virtual ~CIccIO ()
 

Detailed Description

Type: Class.

Purpose: This is the base object that handles the IO with an ICC profile.

Definition at line 96 of file IccIO.h.

Constructor & Destructor Documentation

◆ ~CIccIO()

virtual CIccIO::~CIccIO ( )
inlinevirtual

Definition at line 100 of file IccIO.h.

100{}

Member Function Documentation

◆ Align32()

bool CIccIO::Align32 ( )

Write operation to make sure that filelength is evenly divisible by 4.

Definition at line 341 of file IccIO.cpp.

342{
343 int mod = GetLength() % 4;
344 if (mod != 0) {
345 icUInt8Number buf[4]={0,0,0,0};
346 if (Seek(0, icSeekEnd)<0)
347 return false;
348
349 if (Write8(buf, 4-mod) != 4-mod)
350 return false;
351 }
352
353 return true;
354
355}
@ icSeekEnd
Definition IccIO.h:85
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
virtual icInt32Number GetLength()
Definition IccIO.h:130
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
Definition IccIO.h:132
unsigned char icUInt8Number
Number definitions.

References icSeekEnd.

Referenced by CIccMpeCalculator::Write(), CIccMpeCurveSet::Write(), CIccMpeToneMap::Write(), CIccProfileDescText::Write(), CIccTagArray::Write(), CIccTagCurve::Write(), CIccTagDict::Write(), CIccTagLutAtoB::Write(), CIccTagMultiProcessElement::Write(), CIccTagParametricCurve::Write(), CIccTagProfileSequenceId::Write(), CIccTagSparseMatrixArray::Write(), and CIccTagStruct::Write().

+ Here is the caller graph for this function:

◆ Close()

virtual void CIccIO::Close ( )
inlinevirtual

Reimplemented in CIccEmbedIO, CIccFileIO, CIccMemIO, and CIccNullIO.

Definition at line 102 of file IccIO.h.

102{}

Referenced by CIccEmbedIO::Close().

+ Here is the caller graph for this function:

◆ GetLength()

◆ Read16()

icInt32Number CIccIO::Read16 ( void * pBuf16,
icInt32Number nNum = 1 )

Definition at line 114 of file IccIO.cpp.

115{
116 nNum = Read8(pBuf16, nNum<<1)>>1;
117 icSwab16Array(pBuf16, nNum);
118
119 return nNum;
120}
void icSwab16Array(void *pVoid, int num)
Definition IccUtil.h:218
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104

References icSwab16Array().

Referenced by icCLutFromXml(), CIccSampledCurveSegmentXml::ParseXml(), CIccSinglSampledeCurveXml::ParseXml(), CIccTagXmlCurve::ParseXml(), CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccFormulaCurveSegment::Read(), CIccMpeAcs::Read(), CIccMpeCalculator::Read(), CIccMpeCAM::Read(), CIccMpeCLUT::Read(), CIccMpeCurveSet::Read(), CIccMpeExtCLUT::Read(), CIccMpeMatrix::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralMatrix::Read(), CIccMpeSpectralObserver::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeUnknown::Read(), CIccResponseCurveStruct::Read(), CIccSampledCalculatorCurve::Read(), CIccSegmentedCurve::Read(), CIccSingleSampledCurve::Read(), CIccTagChromaticity::Read(), CIccTagColorantTable::Read(), CIccTagDateTime::Read(), CIccTagDict::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagLut16::Read(), CIccTagLutAtoB::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagMultiProcessElement::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagParametricCurve::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSparseMatrixArray::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagTextDescription::Read(), CIccTagUtf16Text::Read(), and CIccToneMapFunc::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Read32()

icInt32Number CIccIO::Read32 ( void * pBuf32,
icInt32Number nNum = 1 )

Definition at line 143 of file IccIO.cpp.

144{
145 nNum = Read8(pBuf32, nNum<<2)>>2;
146 icSwab32Array(pBuf32, nNum);
147
148 return nNum;
149}
void icSwab32Array(void *pVoid, int num)
Definition IccUtil.h:239

References icSwab32Array().

Referenced by CIccTagStruct::LoadElem(), CIccCalculatorFunc::Read(), CIccFormulaCurveSegment::Read(), CIccMpeAcs::Read(), CIccMpeCalculator::Read(), CIccMpeCAM::Read(), CIccMpeCLUT::Read(), CIccMpeCurveSet::Read(), CIccMpeExtCLUT::Read(), CIccMpeMatrix::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralMatrix::Read(), CIccMpeSpectralObserver::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeUnknown::Read(), CIccProfileDescText::Read(), CIccResponseCurveStruct::Read(), CIccSampledCalculatorCurve::Read(), CIccSampledCurveSegment::Read(), CIccSegmentedCurve::Read(), CIccSingleSampledCurve::Read(), CIccTagArray::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), CIccTagCurve::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagDict::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagEmbeddedProfile::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagLut16::Read(), CIccTagLut8::Read(), CIccTagLutAtoB::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagMultiProcessElement::Read(), CIccTagNamedColor2::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagParametricCurve::Read(), CIccTagProfileSeqDesc::Read(), CIccTagProfileSequenceId::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSignature::Read(), CIccTagSparseMatrixArray::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagStruct::Read(), CIccTagText::Read(), CIccTagTextDescription::Read(), CIccTagUnknown::Read(), CIccTagUtf16Text::Read(), CIccTagUtf8Text::Read(), CIccTagViewingConditions::Read(), CIccTagXYZ::Read(), CIccTagZipUtf8Text::Read(), and CIccToneMapFunc::Read().

+ Here is the call graph for this function:

◆ Read64()

icInt32Number CIccIO::Read64 ( void * pBuf64,
icInt32Number nNum = 1 )

Definition at line 173 of file IccIO.cpp.

174{
175 nNum = Read8(pBuf64, nNum<<3)>>3;
176 icSwab64Array(pBuf64, nNum);
177
178 return nNum;
179}
void icSwab64Array(void *pVoid, int num)
Definition IccUtil.h:264

References icSwab64Array().

Referenced by CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), and CIccTagProfileSeqDesc::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Read8()

◆ ReadFloat16Float()

icInt32Number CIccIO::ReadFloat16Float ( void * pBufFloat,
icInt32Number nNum = 1 )

Definition at line 269 of file IccIO.cpp.

270{
271 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
272 icFloat16Number tmp;
274
275 for (i=0; i<nNum; i++) {
276 if (Read16(&tmp, 1)!=1)
277 break;
278 *ptr = icF16toF(tmp);
279 ptr++;
280 }
281
282 return i;
283}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
icFloatNumber icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
long icInt32Number
icUInt16Number icFloat16Number
IEEE float storage numbers.

References icF16toF().

Referenced by CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccSingleSampledCurve::Read(), CIccTagFloatNum< T, Tsig >::Read(), and CIccTagSparseMatrixArray::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadFloat32Float()

icInt32Number CIccIO::ReadFloat32Float ( void * pBufFloat,
icInt32Number nNum = 1 )

Definition at line 302 of file IccIO.cpp.

303{
304 if (sizeof(icFloat32Number)==sizeof(icFloatNumber))
305 return Read32(pBufFloat, nNum);
306
307 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
308 icFloat32Number tmp;
310
311 for (i=0; i<nNum; i++) {
312 if (Read32(&tmp, 1)!=1)
313 break;
314 *ptr = (icFloatNumber)tmp;
315 ptr++;
316 }
317
318 return i;
319}
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
float icFloat32Number

Referenced by icCLutFromXml(), CIccSampledCurveSegmentXml::ParseXml(), CIccSinglSampledeCurveXml::ParseXml(), CIccTagXmlCurve::ParseXml(), CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccFormulaCurveSegment::Read(), CIccMpeCAM::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeMatrix::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralMatrix::Read(), CIccMpeSpectralObserver::Read(), CIccSampledCalculatorCurve::Read(), CIccSampledCurveSegment::Read(), CIccSegmentedCurve::Read(), CIccSingleSampledCurve::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagSparseMatrixArray::Read(), CIccTagSpectralViewingConditions::Read(), and CIccToneMapFunc::Read().

+ Here is the caller graph for this function:

◆ ReadLine()

icInt32Number CIccIO::ReadLine ( void * pBuf8,
icInt32Number nNum = 256 )

Definition at line 93 of file IccIO.cpp.

94{
95 icInt32Number n=0;
96 icInt8Number c, *ptr=(icInt8Number*)pBuf8;
97
98 while(n<nNum) {
99 if (!Read8(&c)) {
100 break;
101 }
102 if (c=='\n') {
103 break;
104 }
105 else if (c!='\r') {
106 *ptr++ = c;
107 n++;
108 }
109 }
110 *ptr = '\0';
111 return n;
112}
char icInt8Number
Signed numbers.

Referenced by icXmlParseTextString(), and CIccTagXmlTextDescription::ParseXml().

+ Here is the caller graph for this function:

◆ ReadUInt16Float()

icInt32Number CIccIO::ReadUInt16Float ( void * pBufFloat,
icInt32Number nNum = 1 )

Definition at line 236 of file IccIO.cpp.

237{
238 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
239 icUInt16Number tmp;
241
242 for (i=0; i<nNum; i++) {
243 if (Read16(&tmp, 1)!=1)
244 break;
245 *ptr = (icFloatNumber)((icFloatNumber)tmp / 65535.0);
246 ptr++;
247 }
248
249 return i;
250}
unsigned short icUInt16Number

Referenced by CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccSingleSampledCurve::Read(), CIccTagCurve::Read(), CIccTagLut16::Read(), CIccTagNamedColor2::Read(), CIccTagSparseMatrixArray::Read(), and CIccCLUT::ReadData().

+ Here is the caller graph for this function:

◆ ReadUInt8Float()

icInt32Number CIccIO::ReadUInt8Float ( void * pBufFloat,
icInt32Number nNum = 1 )

Definition at line 203 of file IccIO.cpp.

204{
205 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
206 icUInt8Number tmp;
208
209 for (i=0; i<nNum; i++) {
210 if (Read8(&tmp, 1)!=1)
211 break;
212 *ptr = (icFloatNumber)((icFloatNumber)tmp / 255.0);
213 ptr++;
214 }
215
216 return i;
217}

Referenced by CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccSingleSampledCurve::Read(), CIccTagLut8::Read(), CIccTagSparseMatrixArray::Read(), and CIccCLUT::ReadData().

+ Here is the caller graph for this function:

◆ Seek()

◆ Sync32()

bool CIccIO::Sync32 ( icUInt32Number nOffset = 0)

Operation to make sure read position is evenly divisible by 4.

Definition at line 357 of file IccIO.cpp.

358{
359 nOffset &= 0x3;
360
361 icUInt32Number nPos = ((Tell() - nOffset + 3)>>2)<<2;
362 if (Seek(nPos + nOffset, icSeekSet)<0)
363 return false;
364 return true;
365}
@ icSeekSet
Definition IccIO.h:83
unsigned int icUInt32Number
virtual icInt32Number Tell()
Definition IccIO.h:133

References icSeekSet.

Referenced by CIccProfileDescText::Read(), and CIccTagLutAtoB::Read().

+ Here is the caller graph for this function:

◆ Tell()

◆ Write16()

icInt32Number CIccIO::Write16 ( void * pBuf16,
icInt32Number nNum = 1 )

Definition at line 122 of file IccIO.cpp.

123{
124#ifndef ICC_BYTE_ORDER_LITTLE_ENDIAN
125 return Write8(pBuf16, nNum<<1)>>1;
126#else
127 icUInt16Number *ptr = (icUInt16Number*)pBuf16;
128 icUInt16Number tmp;
130
131 for (i=0; i<nNum; i++) {
132 tmp = *ptr;
133 icSwab16(tmp);
134 if (Write8(&tmp, 2)!=2)
135 break;
136 ptr++;
137 }
138
139 return i;
140#endif
141}
#define icSwab16(flt)
Definition IccUtil.h:288

References icSwab16.

Referenced by CIccFormulaCurveSegment::Write(), CIccMpeAcs::Write(), CIccMpeCalculator::Write(), CIccMpeCAM::Write(), CIccMpeCLUT::Write(), CIccMpeCurveSet::Write(), CIccMpeExtCLUT::Write(), CIccMpeMatrix::Write(), CIccMpeSpectralCLUT::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralObserver::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeUnknown::Write(), CIccResponseCurveStruct::Write(), CIccSampledCalculatorCurve::Write(), CIccSegmentedCurve::Write(), CIccSingleSampledCurve::Write(), CIccTagChromaticity::Write(), CIccTagColorantTable::Write(), CIccTagDateTime::Write(), CIccTagDict::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagLut16::Write(), CIccTagLutAtoB::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagMultiProcessElement::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagParametricCurve::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSparseMatrixArray::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagTextDescription::Write(), CIccTagUtf16Text::Write(), and CIccToneMapFunc::Write().

+ Here is the caller graph for this function:

◆ Write32()

icInt32Number CIccIO::Write32 ( void * pBuf32,
icInt32Number nNum = 1 )

Definition at line 152 of file IccIO.cpp.

153{
154#ifndef ICC_BYTE_ORDER_LITTLE_ENDIAN
155 return Write8(pBuf32, nNum<<2)>>2;
156#else
157 icUInt32Number *ptr = (icUInt32Number*)pBuf32;
158 icUInt32Number tmp;
160
161 for (i=0; i<nNum; i++) {
162 tmp = *ptr;
163 icSwab32(tmp);
164 if (Write8(&tmp, 4)!=4)
165 break;
166 ptr++;
167 }
168
169 return i;
170#endif
171}
#define icSwab32(flt)
Definition IccUtil.h:289

References icSwab32.

Referenced by CIccCalculatorFunc::Write(), CIccFormulaCurveSegment::Write(), CIccMpeAcs::Write(), CIccMpeCalculator::Write(), CIccMpeCAM::Write(), CIccMpeCLUT::Write(), CIccMpeCurveSet::Write(), CIccMpeExtCLUT::Write(), CIccMpeMatrix::Write(), CIccMpeSpectralCLUT::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralObserver::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeUnknown::Write(), CIccResponseCurveStruct::Write(), CIccSampledCalculatorCurve::Write(), CIccSampledCurveSegment::Write(), CIccSegmentedCurve::Write(), CIccSingleSampledCurve::Write(), CIccTagArray::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), CIccTagCurve::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagDict::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagEmbeddedProfile::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagLut16::Write(), CIccTagLut8::Write(), CIccTagLutAtoB::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagMultiProcessElement::Write(), CIccTagNamedColor2::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagParametricCurve::Write(), CIccTagProfileSeqDesc::Write(), CIccTagProfileSequenceId::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSignature::Write(), CIccTagSparseMatrixArray::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagStruct::Write(), CIccTagText::Write(), CIccTagTextDescription::Write(), CIccTagUnknown::Write(), CIccTagUtf16Text::Write(), CIccTagUtf8Text::Write(), CIccTagViewingConditions::Write(), CIccTagXYZ::Write(), CIccTagZipUtf8Text::Write(), and CIccToneMapFunc::Write().

◆ Write64()

icInt32Number CIccIO::Write64 ( void * pBuf64,
icInt32Number nNum = 1 )

Definition at line 182 of file IccIO.cpp.

183{
184#ifndef ICC_BYTE_ORDER_LITTLE_ENDIAN
185 return Write8(pBuf64, nNum<<3)>>3;
186#else
187 icUInt64Number *ptr = (icUInt64Number*)pBuf64;
188 icUInt64Number tmp;
190
191 for (i=0; i<nNum; i++) {
192 tmp = *ptr;
193 icSwab64(tmp);
194 if (Write8(&tmp, 8)!=8)
195 break;
196 ptr++;
197 }
198
199 return i;
200#endif
201}
#define icSwab64(flt)
Definition IccUtil.h:290
icUInt32Number icUInt64Number[2]

References icSwab64.

Referenced by CIccTagFloatNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), and CIccTagProfileSeqDesc::Write().

+ Here is the caller graph for this function:

◆ Write8()

◆ WriteFloat16Float()

icInt32Number CIccIO::WriteFloat16Float ( void * pBuf16,
icInt32Number nNum = 1 )

Definition at line 285 of file IccIO.cpp.

286{
287 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
288 icUInt16Number tmp;
290
291 for (i=0; i<nNum; i++) {
292 tmp = icFtoF16(*ptr);
293
294 if (Write16(&tmp, 1)!=1)
295 break;
296 ptr++;
297 }
298
299 return i;
300}
icFloat16Number icFtoF16(icFloat32Number num)
Definition IccUtil.cpp:673
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122

References icFtoF16().

Referenced by CIccMpeExtCLUT::Write(), CIccMpeSpectralCLUT::Write(), CIccSingleSampledCurve::Write(), CIccTagFloatNum< T, Tsig >::Write(), and CIccTagSparseMatrixArray::Write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteFloat32Float()

icInt32Number CIccIO::WriteFloat32Float ( void * pBufFloat,
icInt32Number nNum = 1 )

Definition at line 321 of file IccIO.cpp.

322{
323 if (sizeof(icFloat32Number)==sizeof(icFloatNumber))
324 return Write32(pBufFloat, nNum);
325
326 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
327 icFloat32Number tmp;
329
330 for (i=0; i<nNum; i++) {
331 tmp = (icFloat32Number)*ptr;
332
333 if (Write32(&tmp, 1)!=1)
334 break;
335 ptr++;
336 }
337
338 return i;
339}
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152

Referenced by CIccFormulaCurveSegment::Write(), CIccMpeCAM::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeMatrix::Write(), CIccMpeSpectralCLUT::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralObserver::Write(), CIccSampledCalculatorCurve::Write(), CIccSampledCurveSegment::Write(), CIccSegmentedCurve::Write(), CIccSingleSampledCurve::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagSparseMatrixArray::Write(), CIccTagSpectralViewingConditions::Write(), and CIccToneMapFunc::Write().

+ Here is the caller graph for this function:

◆ WriteUInt16Float()

icInt32Number CIccIO::WriteUInt16Float ( void * pBuf16,
icInt32Number nNum = 1 )

Definition at line 252 of file IccIO.cpp.

253{
254 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
255 icUInt16Number tmp;
257
258 for (i=0; i<nNum; i++) {
259 tmp = (icUInt16Number)(__max(0.0, __min(1.0, *ptr)) * 65535.0 + 0.5);
260
261 if (Write16(&tmp, 1)!=1)
262 break;
263 ptr++;
264 }
265
266 return i;
267}
#define __min
#define __max(a, b)
Definition IccIO.cpp:78

References __max, and __min.

Referenced by CIccMpeExtCLUT::Write(), CIccMpeSpectralCLUT::Write(), CIccSingleSampledCurve::Write(), CIccTagCurve::Write(), CIccTagLut16::Write(), CIccTagNamedColor2::Write(), CIccTagSparseMatrixArray::Write(), and CIccCLUT::WriteData().

+ Here is the caller graph for this function:

◆ WriteUInt8Float()

icInt32Number CIccIO::WriteUInt8Float ( void * pBuf16,
icInt32Number nNum = 1 )

Definition at line 219 of file IccIO.cpp.

220{
221 icFloatNumber *ptr = (icFloatNumber*)pBufFloat;
222 icUInt8Number tmp;
224
225 for (i=0; i<nNum; i++) {
226 tmp = (icUInt8Number)(__max(0.0, __min(1.0, *ptr)) * 255.0 + 0.5);
227
228 if (Write8(&tmp, 1)!=1)
229 break;
230 ptr++;
231 }
232
233 return i;
234}

References __max, and __min.

Referenced by CIccMpeExtCLUT::Write(), CIccMpeSpectralCLUT::Write(), CIccSingleSampledCurve::Write(), CIccTagLut8::Write(), CIccTagSparseMatrixArray::Write(), and CIccCLUT::WriteData().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: