test: dec97/test/getcrd.h File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# getcrd.h File Reference

Go to the source code of this file.

## Functions

BOOL EXTERN | GetPS2ColorRenderingDictionary (CHANDLE cp, DWORD Intent, MEMPTR lpMem, LPDWORD lpcbSize, BOOL AllowBinary)

## Function Documentation

BOOL EXTERN GetPS2ColorRenderingDictionary | ( | CHANDLE | cp,
|  | DWORD | Intent,
|  | MEMPTR | lpMem,
|  | LPDWORD | lpcbSize,
|  | BOOL | AllowBinary
| ) |

Definition at line 1044 of file aug98/dll32/getcrd.c.

    01050 {
    01051     SINT Index;
    01052     SINT Ret, Size;
    01053     CSIG icSigPs2CRDx, icSigBToAx;
    01054
    01055     if (!cp)
    01056         return FALSE;
    01057
    01058     if ((lpMem == NULL) || (*lpcbSize == 0))
    01059     {
    01060         lpMem = NULL;
    01061         *lpcbSize = 0;
    01062     }
    01063     Ret = 0;
    01064     Size = (SINT) * lpcbSize;
    01065
    01066     switch (Intent)
    01067     {
    01068         case icPerceptual:
    01069             icSigPs2CRDx = icSigPs2CRD0Tag;
    01070             icSigBToAx = icSigBToA0Tag;
    01071             break;
    01072
    01073         case icRelativeColorimetric:
    01074             icSigPs2CRDx = icSigPs2CRD1Tag;
    01075             icSigBToAx = icSigBToA1Tag;
    01076             break;
    01077
    01078         case icSaturation:
    01079             icSigPs2CRDx = icSigPs2CRD2Tag;
    01080             icSigBToAx = icSigBToA2Tag;
    01081             break;
    01082
    01083         case icAbsoluteColorimetric:
    01084             icSigPs2CRDx = icSigPs2CRD3Tag;
    01085             icSigBToAx = icSigBToA1Tag;
    01086             break;
    01087
    01088         default:
    01089             *lpcbSize = (DWORD) Ret;
    01090             return (Ret > 0);
    01091     }
    01092
    01093     if (
    01094         (DoesCPTagExist (cp, icSigPs2CRDx) &&
    01095          GetCPTagIndex (cp, icSigPs2CRDx, (LPSINT) & Index) &&
    01096          GetCPElementDataSize (cp, Index, (LPSINT) & Ret) &&
    01097          ((Size == 0) ||
    01098           GetCPElementData (cp, Index, lpMem, Size)) &&
    01099          (Ret = Convert2Ascii (cp, Index, lpMem, Size, Ret, AllowBinary))
    01100         ) ||
    01101         (DoesCPTagExist (cp, icSigBToAx) &&
    01102          GetCPTagIndex (cp, icSigBToAx, (LPSINT) & Index) &&
    01103          (Ret = CreateLutCRD (cp, Index, lpMem, Intent, AllowBinary))
    01104         ) ||
    01105         // SRGB98 Support Windows 98 sRGB icc profile.
    01106         // Create CRD from TRC and Colorant Tags.
    01107         (DoesTRCAndColorantTagExist (cp) &&
    01108          (Ret = CreateMatrixCRD (cp, lpMem, Intent, AllowBinary))
    01109         ) ||
    01110         (DoesCPTagExist (cp, icSigGrayTRCTag) &&
    01111          GetCPTagIndex (cp, icSigGrayTRCTag, (LPSINT) & Index) &&
    01112          (Ret = CreateMonoCRD (cp, Index, lpMem, Intent))
    01113         )
    01114        )
    01115     {
    01116     }
    01117
    01118     *lpcbSize = (DWORD) Ret;
    01119     return (Ret > 0);
    01120 }