1519 }
1520 }
1521 else {
1522
1523 // CRD are always implemented as LUT
1524
1525 if (!WriteOutputLUT(mem, hProfile, Intent, dwFlags)) {
1526 return 0;
1527 }
1528 }
1529
1530 if (!(dwFlags & cmsFLAGS_NODEFAULTRESOURCEDEF)) {
1531
1532 _cmsIOPrintf(mem, "%%%%EndResource\n");
1533 _cmsIOPrintf(mem, "\n%% CRD End\n");
1534 }
1535
1536 // Done, keep memory usage
1537 dwBytesUsed = mem ->UsedSpace;
1538
1539 // Finally, return used byte count
1540 return dwBytesUsed;
1541
1542 cmsUNUSED_PARAMETER(ContextID);
1543 }
1544
1545
1546
1547
1548 cmsUInt32Number CMSEXPORT cmsGetPostScriptColorResource(cmsContext ContextID,
1549 cmsPSResourceType Type,
1550 cmsHPROFILE hProfile,
1551 cmsUInt32Number Intent,
1552 cmsUInt32Number dwFlags,
1553 cmsIOHANDLER* io)
1554 {
1555 cmsUInt32Number rc;
1556
1557
1558 switch (Type) {
1559
1560 case cmsPS_RESOURCE_CSA:
1561 rc = GenerateCSA(ContextID, hProfile, Intent, dwFlags, io);
1562 break;
|
1519 }
1520 }
1521 else {
1522
1523 // CRD are always implemented as LUT
1524
1525 if (!WriteOutputLUT(mem, hProfile, Intent, dwFlags)) {
1526 return 0;
1527 }
1528 }
1529
1530 if (!(dwFlags & cmsFLAGS_NODEFAULTRESOURCEDEF)) {
1531
1532 _cmsIOPrintf(mem, "%%%%EndResource\n");
1533 _cmsIOPrintf(mem, "\n%% CRD End\n");
1534 }
1535
1536 // Done, keep memory usage
1537 dwBytesUsed = mem ->UsedSpace;
1538
1539 cmsUNUSED_PARAMETER(ContextID);
1540
1541 // Finally, return used byte count
1542 return dwBytesUsed;
1543
1544 }
1545
1546
1547
1548
1549 cmsUInt32Number CMSEXPORT cmsGetPostScriptColorResource(cmsContext ContextID,
1550 cmsPSResourceType Type,
1551 cmsHPROFILE hProfile,
1552 cmsUInt32Number Intent,
1553 cmsUInt32Number dwFlags,
1554 cmsIOHANDLER* io)
1555 {
1556 cmsUInt32Number rc;
1557
1558
1559 switch (Type) {
1560
1561 case cmsPS_RESOURCE_CSA:
1562 rc = GenerateCSA(ContextID, hProfile, Intent, dwFlags, io);
1563 break;
|