IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccIO Class Reference

#include <IccIO.h>

+ Inheritance diagram for CIccIO:

Public Member Functions

virtual ~CIccIO ()
 
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)
 

Detailed Description

Type: Class

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

Constructor & Destructor Documentation

◆ ~CIccIO()

virtual CIccIO::~CIccIO ( )
inlinevirtual
100{}

Member Function Documentation

◆ Align32()

bool CIccIO::Align32 ( )

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

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}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
@ 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

References GetLength(), icSeekEnd, Seek(), and Write8().

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

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

◆ Close()

virtual void CIccIO::Close ( )
inlinevirtual

Reimplemented in CIccFileIO, CIccEmbedIO, CIccMemIO, and CIccNullIO.

102{}

Referenced by CIccEmbedIO::Close().

+ Here is the caller graph for this function:

◆ GetLength()

◆ Read16()

icInt32Number CIccIO::Read16 ( void *  pBuf16,
icInt32Number  nNum = 1 
)
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(), and Read8().

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

+ 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 
)
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(), and Read8().

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

+ Here is the call graph for this function:

◆ Read64()

icInt32Number CIccIO::Read64 ( void *  pBuf64,
icInt32Number  nNum = 1 
)
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(), and Read8().

Referenced by CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< 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 
)
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}
long icInt32Number
Definition icProfileHeader.h:291
icUInt16Number icFloat16Number
Definition icProfileHeader.h:310
float icFloatNumber
Definition IccDefs.h:101
ICCPROFLIB_API icFloat32Number icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114

References icF16toF(), and Read16().

Referenced by CIccTagXmlFloatNum< T, A, Tsig >::ParseXml(), CIccSingleSampledCurve::Read(), CIccMpeExtCLUT::Read(), CIccMpeSpectralCLUT::Read(), CIccTagSparseMatrixArray::Read(), and CIccTagFloatNum< T, Tsig >::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 
)
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}
float icFloat32Number
Definition icProfileHeader.h:313
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143

References Read32().

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

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

◆ ReadLine()

icInt32Number CIccIO::ReadLine ( void *  pBuf8,
icInt32Number  nNum = 256 
)
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
Definition icProfileHeader.h:279

References Read8().

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

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

◆ ReadUInt16Float()

icInt32Number CIccIO::ReadUInt16Float ( void *  pBufFloat,
icInt32Number  nNum = 1 
)
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
Definition icProfileHeader.h:256

References Read16().

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

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

◆ ReadUInt8Float()

icInt32Number CIccIO::ReadUInt8Float ( void *  pBufFloat,
icInt32Number  nNum = 1 
)
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}

References Read8().

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

+ Here is the call graph for this function:
+ 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.

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}
unsigned long icUInt32Number
Definition icProfileHeader.h:262
@ icSeekSet
Definition IccIO.h:83
virtual icInt32Number Tell()
Definition IccIO.h:133

References icSeekSet, Seek(), and Tell().

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

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

◆ Tell()

◆ Write16()

icInt32Number CIccIO::Write16 ( void *  pBuf16,
icInt32Number  nNum = 1 
)
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 Write8().

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

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

◆ Write32()

icInt32Number CIccIO::Write32 ( void *  pBuf32,
icInt32Number  nNum = 1 
)
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 Write8().

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

+ Here is the call graph for this function:

◆ Write64()

icInt32Number CIccIO::Write64 ( void *  pBuf64,
icInt32Number  nNum = 1 
)
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}
icUInt32Number icUInt64Number[2]
Definition icProfileHeader.h:268
#define icSwab64(flt)
Definition IccUtil.h:290

References Write8().

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

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

◆ Write8()

◆ WriteFloat16Float()

icInt32Number CIccIO::WriteFloat16Float ( void *  pBuf16,
icInt32Number  nNum = 1 
)
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}
ICCPROFLIB_API icFloat16Number icFtoF16(icFloat32Number num)
Definition IccUtil.cpp:673
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122

References icFtoF16(), and Write16().

Referenced by CIccSingleSampledCurve::Write(), CIccMpeExtCLUT::Write(), CIccMpeSpectralCLUT::Write(), CIccTagSparseMatrixArray::Write(), and CIccTagFloatNum< T, Tsig >::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 
)
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

References Write32().

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

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

◆ WriteUInt16Float()

icInt32Number CIccIO::WriteUInt16Float ( void *  pBuf16,
icInt32Number  nNum = 1 
)
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 __max(a, b)
Definition IccIO.cpp:78
#define __min
Definition IccArrayBasic.cpp:87

References Write16().

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

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

◆ WriteUInt8Float()

icInt32Number CIccIO::WriteUInt8Float ( void *  pBuf16,
icInt32Number  nNum = 1 
)
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 Write8().

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

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

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