int ColorSpaceSignature2TiffInkset( icColorSpaceSignature cspace, int *len, /* Return length of ASCII inknames */ char **inknames /* Return ASCII inknames if non NULL */ ) { switch(cspace) { case icSigCmyData: return 0xffff; /* ~~9999 */ if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSigCmykData: if (inknames != NULL) { *inknames = NULL; /* No inknames */ *len = 0; } return INKSET_CMYK; case icSigGrayData: case icSigRgbData: case icSigYCbCrData: case icSigLabData: case icSigXYZData: case icSigLuvData: case icSigYxyData: case icSigHsvData: case icSigHlsData: case icSig2colorData: case icSig3colorData: case icSig4colorData: case icSig5colorData: case icSigMch5Data: return 0xffff; case icSig6colorData: case icSigMch6Data: /* This is a cheat and a hack. Should really make sure that icclink */ /* transfers the right information from the destination */ /* profile, and then copies it to the device profile, */ /* allowing cctiff to read it. */ if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000black\000orange\000green\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSig7colorData: case icSigMch7Data: return 0xffff; case icSig8colorData: case icSigMch8Data: /* This is a cheat and a hack. Should really make sure that icclink */ /* transfers the right information from the destination */ /* profile, and then copies it to the device profile, */ /* allowing cctiff to read it. */ if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000black\000orange\000green\000lightcyan\000lightmagenta\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSig9colorData: case icSig10colorData: case icSig11colorData: case icSig12colorData: case icSig13colorData: case icSig14colorData: case icSig15colorData: default: return 0xffff; } return 0xffff; }
int ColorSpaceSignature2TiffInkset( icColorSpaceSignature cspace, int *len, /* Return length of ASCII inknames */ char **inknames /* Return ASCII inknames if non NULL */ ) { switch(cspace) { case icSigCmyData: return 0xffff; // ~~9999 if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSigCmykData: if (inknames != NULL) { *inknames = NULL; /* No inknames */ *len = 0; } return INKSET_CMYK; case icSigGrayData: case icSigRgbData: case icSigYCbCrData: case icSigLabData: case icSigXYZData: case icSigLuvData: case icSigYxyData: case icSigHsvData: case icSigHlsData: case icSig2colorData: case icSig3colorData: case icSig4colorData: case icSig5colorData: case icSigMch5Data: return 0xffff; case icSig6colorData: case icSigMch6Data: /* This is a cheat and a hack. Should really make use of the */ /* ColorantTable to determine the colorant names. */ /* allowing cctiff to read it. */ if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000black\000orange\000green\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSig7colorData: case icSigMch7Data: return 0xffff; case icSig8colorData: case icSigMch8Data: /* This is a cheat and a hack. Should really make use of the */ /* ColorantTable to determine the colorant names. */ /* allowing cctiff to read it. */ if (inknames != NULL) { *inknames = "cyan\000magenta\000yellow\000black\000orange\000green\000lightcyan\000lightmagenta\000\000"; *len = zzstrlen(*inknames); } return 0; /* Not CMYK */ case icSig9colorData: case icSig10colorData: case icSig11colorData: case icSig12colorData: case icSig13colorData: case icSig14colorData: case icSig15colorData: default: return 0xffff; } return 0xffff; }