Lines Matching defs:ContextID

207     ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
210 ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
231 if (ElementOffsets != NULL) _cmsFree(io ->ContextID, ElementOffsets);
232 if (ElementSizes != NULL) _cmsFree(io ->ContextID, ElementSizes);
236 if (ElementOffsets != NULL) _cmsFree(io ->ContextID, ElementOffsets);
237 if (ElementSizes != NULL) _cmsFree(io ->ContextID, ElementSizes);
256 ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
259 ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
296 if (ElementOffsets != NULL) _cmsFree(io ->ContextID, ElementOffsets);
297 if (ElementSizes != NULL) _cmsFree(io ->ContextID, ElementSizes);
301 if (ElementOffsets != NULL) _cmsFree(io ->ContextID, ElementOffsets);
302 if (ElementSizes != NULL) _cmsFree(io ->ContextID, ElementSizes);
322 xyz = (cmsCIEXYZ*) _cmsMallocZero(self ->ContextID, sizeof(cmsCIEXYZ));
326 _cmsFree(self ->ContextID, xyz);
348 return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIEXYZ));
356 _cmsFree(self ->ContextID, Ptr);
383 chrm = (cmsCIExyYTRIPLE*) _cmsMallocZero(self ->ContextID, sizeof(cmsCIExyYTRIPLE));
418 _cmsFree(self ->ContextID, (void*) chrm);
454 return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIExyYTRIPLE));
462 _cmsFree(self ->ContextID, Ptr);
488 ColorantOrder = (cmsUInt8Number*) _cmsCalloc(self ->ContextID, cmsMAXCHANNELS, sizeof(cmsUInt8Number));
496 _cmsFree(self ->ContextID, (void*) ColorantOrder);
531 return _cmsDupMem(self ->ContextID, Ptr, cmsMAXCHANNELS * sizeof(cmsUInt8Number));
540 _cmsFree(self ->ContextID, Ptr);
557 array_double = (cmsFloat64Number*) _cmsCalloc(self ->ContextID, n, sizeof(cmsFloat64Number));
564 _cmsFree(self ->ContextID, array_double);
592 return _cmsDupMem(self ->ContextID, Ptr, n * sizeof(cmsFloat64Number));
599 _cmsFree(self ->ContextID, Ptr);
618 array_double = (cmsFloat64Number*) _cmsCalloc(self ->ContextID, n, sizeof(cmsFloat64Number));
624 _cmsFree(self ->ContextID, (void*) array_double);
658 return _cmsDupMem(self ->ContextID, Ptr, n * sizeof(cmsFloat64Number));
664 _cmsFree(self ->ContextID, Ptr);
679 cmsSignature* SigPtr = (cmsSignature*) _cmsMalloc(self ->ContextID, sizeof(cmsSignature));
704 return _cmsDupMem(self ->ContextID, Ptr, n * sizeof(cmsSignature));
710 _cmsFree(self ->ContextID, Ptr);
729 mlu = cmsMLUalloc(self ->ContextID, 1);
737 Text = (char*) _cmsMalloc(self ->ContextID, SizeOfTag + 1);
749 _cmsFree(self ->ContextID, Text);
756 _cmsFree(self ->ContextID, Text);
775 Text = (char*) _cmsMalloc(self ->ContextID, size);
783 _cmsFree(self ->ContextID, Text);
839 BinData = (cmsICCData*) _cmsMalloc(self ->ContextID, sizeof(cmsICCData) + LenOfData - 1);
844 _cmsFree(self ->ContextID, BinData);
850 _cmsFree(self ->ContextID, BinData);
879 return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsICCData) + BinData ->len - 1);
887 _cmsFree(self ->ContextID, Ptr);
917 mlu = cmsMLUalloc(self ->ContextID, 1);
921 Text = (char*) _cmsMalloc(self ->ContextID, AsciiCount + 1);
933 _cmsFree(self ->ContextID, (void*) Text);
970 if (Text) _cmsFree(self ->ContextID, (void*) Text);
1009 Text = (char*) _cmsDupMem(self ->ContextID, "", sizeof(char));
1010 Wide = (wchar_t*) _cmsDupMem(self ->ContextID, L"", sizeof(wchar_t));
1014 Text = (char*) _cmsCalloc(self ->ContextID, len, sizeof(char));
1017 Wide = (wchar_t*) _cmsCalloc(self ->ContextID, len, sizeof(wchar_t));
1062 if (Text) _cmsFree(self ->ContextID, Text);
1063 if (Wide) _cmsFree(self ->ContextID, Wide);
1123 NewGamma = cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma);
1138 return cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma);
1146 NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, Count, NULL);
1237 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown parametric curve type '%d'", Type);
1249 NewGamma = cmsBuildParametricToneCurve(self ->ContextID, Type+1, Params);
1269 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Multisegment or Inverted parametric curves cannot be written");
1274 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported parametric curve");
1335 NewDateTime = (struct tm*) _cmsMalloc(self ->ContextID, sizeof(struct tm));
1367 return _cmsDupMem(self ->ContextID, Ptr, sizeof(struct tm));
1375 _cmsFree(self ->ContextID, Ptr);
1405 return _cmsDupMem(self ->ContextID, &mc, sizeof(cmsICCMeasurementConditions));
1431 return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsICCMeasurementConditions));
1439 _cmsFree(self ->ContextID, Ptr);
1469 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "multiLocalizedUnicodeType of len != 12 is not supported.");
1473 mlu = cmsMLUalloc(self ->ContextID, Count);
1516 Block = (wchar_t*) _cmsMalloc(self ->ContextID, SizeOfTag);
1650 cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels)
1661 Temp = (cmsUInt8Number*) _cmsMalloc(ContextID, 256);
1665 Tables[i] = cmsBuildTabulatedToneCurve16(ContextID, 256, NULL);
1677 _cmsFree(ContextID, Temp);
1680 if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables)))
1693 if (Temp) _cmsFree(ContextID, Temp);
1699 cmsBool Write8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsUInt32Number n, _cmsStageToneCurvesData* Tables)
1720 cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization");
1790 NewLUT = cmsPipelineAlloc(self ->ContextID, InputChannels, OutputChannels);
1808 if (!cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL)))
1813 if (!Read8bitTables(self ->ContextID, io, NewLUT, InputChannels)) goto Error;
1822 PtrW = T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number));
1825 Temp = (cmsUInt8Number*) _cmsMalloc(self ->ContextID, nTabSize);
1827 _cmsFree(self ->ContextID, T);
1832 _cmsFree(self ->ContextID, T);
1833 _cmsFree(self ->ContextID, Temp);
1841 _cmsFree(self ->ContextID, Temp);
1844 if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T)))
1846 _cmsFree(self ->ContextID, T);
1851 if (!Read8bitTables(self ->ContextID, io, NewLUT, OutputChannels)) goto Error;
1901 cmsSignalError(mpe->ContextID, cmsERROR_UNKNOWN_EXTENSION, "LUT is not suitable to be saved as LUT8");
1944 if (!Write8bitTables(self ->ContextID, io, NewLUT ->InputChannels, PreMPE)) return FALSE;
1962 if (!Write8bitTables(self ->ContextID, io, NewLUT ->OutputChannels, PostMPE)) return FALSE;
1994 cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels, int nEntries)
2011 Tables[i] = cmsBuildTabulatedToneCurve16(ContextID, nEntries, NULL);
2019 if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables)))
2036 cmsBool Write16bitTables(cmsContext ContextID, cmsIOHANDLER* io, _cmsStageToneCurvesData* Tables)
2057 cmsUNUSED_PARAMETER(ContextID);
2083 NewLUT = cmsPipelineAlloc(self ->ContextID, InputChannels, OutputChannels);
2101 if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL)))
2112 if (!Read16bitTables(self ->ContextID, io, NewLUT, InputChannels, InputEntries)) goto Error;
2121 T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number));
2125 _cmsFree(self ->ContextID, T);
2129 if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) {
2130 _cmsFree(self ->ContextID, T);
2133 _cmsFree(self ->ContextID, T);
2138 if (!Read16bitTables(self ->ContextID, io, NewLUT, OutputChannels, OutputEntries)) goto Error;
2190 cmsSignalError(mpe->ContextID, cmsERROR_UNKNOWN_EXTENSION, "LUT is not suitable to be saved as LUT16");
2250 if (!Write16bitTables(self ->ContextID, io, PreMPE)) return FALSE;
2271 if (!Write16bitTables(self ->ContextID, io, PostMPE)) return FALSE;
2337 Mat = cmsStageAllocMatrix(self ->ContextID, 3, 3, dMat, dOff);
2372 CLUT = cmsStageAllocCLut16bitGranular(self ->ContextID, GridPoints, InputChannels, OutputChannels, NULL);
2399 cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown precision of '%d'", Precision);
2426 cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown curve type '%s'", String);
2456 Lin = cmsStageAllocToneCurves(self ->ContextID, nCurves, Curves);
2515 NewLUT = cmsPipelineAlloc(self ->ContextID, inputChan, outputChan);
2630 cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown curve type '%s'", String);
2651 cmsSignalError(self ->ContextID, cmsERROR_NOT_SUITABLE, "Cannot save floating point data, CLUT are 8 or 16 bit only");
2680 cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown precision of '%d'", Precision);
2713 cmsSignalError(self->ContextID, cmsERROR_NOT_SUITABLE, "LUT is not suitable to be saved as LutAToB");
2832 NewLUT = cmsPipelineAlloc(self ->ContextID, inputChan, outputChan);
2896 cmsSignalError(self->ContextID, cmsERROR_NOT_SUITABLE, "LUT is not suitable to be saved as LutBToA");
3005 cmsSignalError(self->ContextID, cmsERROR_RANGE, "Too many colorants '%d'", Count);
3009 List = cmsAllocNamedColorList(self ->ContextID, Count, 0, "", "");
3123 v = cmsAllocNamedColorList(self ->ContextID, count, nDeviceCoords, prefix, suffix);
3125 cmsSignalError(self->ContextID, cmsERROR_RANGE, "Too many named colors '%d'", count);
3130 cmsSignalError(self->ContextID, cmsERROR_RANGE, "Too many device coordinates '%d'", nDeviceCoords);
3283 OutSeq = cmsAllocProfileSequenceDescription(self ->ContextID, Count);
3432 OutSeq = cmsAllocProfileSequenceDescription(self ->ContextID, Count);
3520 cmsUcrBg* n = (cmsUcrBg*) _cmsMallocZero(self ->ContextID, sizeof(cmsUcrBg));
3532 n ->Ucr = cmsBuildTabulatedToneCurve16(self ->ContextID, CountUcr, NULL);
3544 n ->Bg = cmsBuildTabulatedToneCurve16(self ->ContextID, CountBg, NULL);
3552 n ->Desc = cmsMLUalloc(self ->ContextID, 1);
3555 ASCIIString = (char*) _cmsMalloc(self ->ContextID, SizeOfTag + 1);
3559 _cmsFree(self ->ContextID, ASCIIString);
3582 Text = (char*) _cmsMalloc(self ->ContextID, TextSize);
3586 _cmsFree(self ->ContextID, Text);
3597 cmsUcrBg* NewUcrBg = (cmsUcrBg*) _cmsMallocZero(self ->ContextID, sizeof(cmsUcrBg));
3619 _cmsFree(self ->ContextID, Ptr);
3655 Text = (char*) _cmsMalloc(self ->ContextID, Count+1);
3659 _cmsFree(self ->ContextID, Text);
3666 _cmsFree(self ->ContextID, Text);
3679 Text = (char*) _cmsMalloc(self ->ContextID, TextSize);
3686 _cmsFree(self ->ContextID, Text);
3694 cmsMLU* mlu = cmsMLUalloc(self ->ContextID, 5);
3764 sc = (cmsScreening*) _cmsMallocZero(self ->ContextID, sizeof(cmsScreening));
3789 _cmsFree(self ->ContextID, sc);
3823 return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsScreening));
3832 _cmsFree(self ->ContextID, Ptr);
3848 vc = (cmsICCViewingConditions*) _cmsMallocZero(self ->ContextID, sizeof(cmsICCViewingConditions));
3863 _cmsFree(self ->ContextID, vc);
3890 return _cmsDupMem(self->ContextID, Ptr, sizeof(cmsICCViewingConditions));
3899 _cmsFree(self ->ContextID, Ptr);
3954 Segments = (cmsCurveSegment*) _cmsCalloc(self ->ContextID, nSegments, sizeof(cmsCurveSegment));
4003 Segments[i].SampledPoints = (cmsFloat32Number*) _cmsCalloc(self ->ContextID, Count, sizeof(cmsFloat32Number));
4017 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown curve element type '%s' found.", String);
4024 Curve = cmsBuildSegmentedToneCurve(self ->ContextID, nSegments, Segments);
4027 if (Segments[i].SampledPoints) _cmsFree(self ->ContextID, Segments[i].SampledPoints);
4029 _cmsFree(self ->ContextID, Segments);
4033 if (Segments) _cmsFree(self ->ContextID, Segments);
4071 GammaTables = (cmsToneCurve**) _cmsCalloc(self ->ContextID, InputChans, sizeof(cmsToneCurve*));
4076 mpe = cmsStageAllocToneCurves(self ->ContextID, InputChans, GammaTables);
4086 _cmsFree(self ->ContextID, GammaTables);
4221 Matrix = (cmsFloat64Number*) _cmsCalloc(self ->ContextID, nElems, sizeof(cmsFloat64Number));
4224 Offsets = (cmsFloat64Number*) _cmsCalloc(self ->ContextID, OutputChans, sizeof(cmsFloat64Number));
4227 _cmsFree(self ->ContextID, Matrix);
4249 mpe = cmsStageAllocMatrix(self ->ContextID, OutputChans, InputChans, Matrix, Offsets);
4250 _cmsFree(self ->ContextID, Matrix);
4251 _cmsFree(self ->ContextID, Offsets);
4322 mpe = cmsStageAllocCLutFloatGranular(self ->ContextID, GridPoints, InputChans, OutputChans, NULL);
4405 _cmsTagTypePluginChunkType* MPETypePluginChunk = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(self->ContextID, MPEPlugin);
4423 cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown MPE type '%s' found.", String);
4460 NewLUT = cmsPipelineAlloc(self ->ContextID, InputChans, OutputChans);
4492 _cmsTagTypePluginChunkType* MPETypePluginChunk = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(self->ContextID, MPEPlugin);
4500 ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number));
4503 ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number));
4534 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Found unknown MPE type '%s'", String);
4561 if (ElementOffsets != NULL) _cmsFree(self ->ContextID, ElementOffsets);
4562 if (ElementSizes != NULL) _cmsFree(self ->ContextID, ElementSizes);
4566 if (ElementOffsets != NULL) _cmsFree(self ->ContextID, ElementOffsets);
4567 if (ElementSizes != NULL) _cmsFree(self ->ContextID, ElementSizes);
4624 Curves = ( cmsToneCurve**) _cmsCalloc(self ->ContextID, 3, sizeof(cmsToneCurve*));
4639 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported number of channels for VCGT '%d'", nChannels);
4655 Curves[n] = cmsBuildTabulatedToneCurve16(self ->ContextID, nElems, NULL);
4679 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported bit depth for VCGT '%d'", nBytes * 8);
4720 Curves[n] = cmsBuildParametricToneCurve(self ->ContextID, 5, Params);
4728 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported tag type for VCGT '%d'", TagType);
4739 _cmsFree(self ->ContextID, Curves);
4805 NewCurves = ( cmsToneCurve**) _cmsCalloc(self ->ContextID, 3, sizeof(cmsToneCurve*));
4822 _cmsFree(self ->ContextID, Ptr);
4832 cmsContext ContextID;
4844 cmsBool AllocElem(cmsContext ContextID, _cmsDICelem* e, cmsUInt32Number Count)
4846 e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number));
4849 e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number));
4852 _cmsFree(ContextID, e -> Offsets);
4856 e ->ContextID = ContextID;
4864 if (e ->Offsets != NULL) _cmsFree(e -> ContextID, e -> Offsets);
4865 if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e -> Sizes);
4882 cmsBool AllocArray(cmsContext ContextID, _cmsDICarray* a, cmsUInt32Number Count, cmsUInt32Number Length)
4888 if (!AllocElem(ContextID, &a ->Name, Count)) goto Error;
4889 if (!AllocElem(ContextID, &a ->Value, Count)) goto Error;
4892 if (!AllocElem(ContextID, &a -> DisplayName, Count)) goto Error;
4896 if (!AllocElem(ContextID, &a ->DisplayValue, Count)) goto Error;
4998 *wcstr = (wchar_t*) _cmsMallocZero(e ->ContextID, (nChars + 1) * sizeof(wchar_t));
5002 _cmsFree(e ->ContextID, *wcstr);
5111 cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown record length in dictionary '%d'", Length);
5116 hDict = cmsDictAlloc(self -> ContextID);
5120 if (!AllocArray(self -> ContextID, &a, Count, Length)) goto Error;
5141 cmsSignalError(self->ContextID, cmsERROR_CORRUPTION_DETECTED, "Bad dictionary Name/Value");
5149 if (NameWCS != NULL) _cmsFree(self ->ContextID, NameWCS);
5150 if (ValueWCS != NULL) _cmsFree(self ->ContextID, ValueWCS);
5202 if (!AllocArray(self ->ContextID, &a, Count, Length)) goto Error;
5387 cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsContext ContextID, cmsTagTypeSignature sig)
5389 _cmsTagTypePluginChunkType* ctx = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(ContextID, TagTypePlugin);
5584 cmsTagDescriptor* _cmsGetTagDescriptor(cmsContext ContextID, cmsTagSignature sig)
5587 _cmsTagPluginChunkType* TagPluginChunk = ( _cmsTagPluginChunkType*) _cmsContextGetClientChunk(ContextID, TagPlugin);