< prev index next >

src/java.desktop/share/native/liblcms/cmspack.c

Print this page

2963                      ((cmsFloat32Number*)output)[i + start] = (cmsFloat32Number)v;
2964        }
2965 
2966 
2967        if (Extra == 0 && SwapFirst) {
2968 
2969               memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsFloat32Number));
2970               *swap1 = (cmsFloat32Number)v;
2971        }
2972 
2973        if (T_PLANAR(info->OutputFormat))
2974               return output + sizeof(cmsFloat32Number);
2975        else
2976               return output + (nChan + Extra) * sizeof(cmsFloat32Number);
2977 }
2978 
2979 
2980 
2981 // --------------------------------------------------------------------------------------------------------
2982 






































































































2983 static
2984 cmsUInt8Number* PackFloatsFromFloat(_cmsTRANSFORM* info,
2985                                     cmsFloat32Number wOut[],
2986                                     cmsUInt8Number* output,
2987                                     cmsUInt32Number Stride)
2988 {
2989        cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
2990        cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
2991        cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
2992        cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
2993        cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
2994        cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
2995        cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
2996        cmsFloat64Number maximum = IsInkSpace(info->OutputFormat) ? 100.0 : 1.0;
2997        cmsFloat32Number* swap1 = (cmsFloat32Number*)output;
2998        cmsFloat64Number v = 0;
2999        cmsUInt32Number i, start = 0;
3000 
3001        Stride /= PixelSize(info->OutputFormat);
3002 

3126         Stride /= PixelSize(Info->OutputFormat);
3127 
3128         Out[0]        = (cmsFloat64Number) (wOut[0] * 100.0);
3129         Out[Stride]   = (cmsFloat64Number) (wOut[1] * 255.0 - 128.0);
3130         Out[Stride*2] = (cmsFloat64Number) (wOut[2] * 255.0 - 128.0);
3131 
3132         return output + sizeof(cmsFloat64Number);
3133     }
3134     else {
3135 
3136         Out[0] = (cmsFloat64Number) (wOut[0] * 100.0);
3137         Out[1] = (cmsFloat64Number) (wOut[1] * 255.0 - 128.0);
3138         Out[2] = (cmsFloat64Number) (wOut[2] * 255.0 - 128.0);
3139 
3140         return output + (sizeof(cmsFloat64Number)*3 + T_EXTRA(Info ->OutputFormat) * sizeof(cmsFloat64Number));
3141     }
3142 
3143 }
3144 
3145 







































































3146 // From 0..1 range to 0..MAX_ENCODEABLE_XYZ
3147 static
3148 cmsUInt8Number* PackXYZFloatFromFloat(_cmsTRANSFORM* Info,
3149                                       cmsFloat32Number wOut[],
3150                                       cmsUInt8Number* output,
3151                                       cmsUInt32Number Stride)
3152 {
3153     cmsFloat32Number* Out = (cmsFloat32Number*) output;
3154 
3155     if (T_PLANAR(Info -> OutputFormat)) {
3156 
3157         Stride /= PixelSize(Info->OutputFormat);
3158 
3159         Out[0]        = (cmsFloat32Number) (wOut[0] * MAX_ENCODEABLE_XYZ);
3160         Out[Stride]   = (cmsFloat32Number) (wOut[1] * MAX_ENCODEABLE_XYZ);
3161         Out[Stride*2] = (cmsFloat32Number) (wOut[2] * MAX_ENCODEABLE_XYZ);
3162 
3163         return output + sizeof(cmsFloat32Number);
3164     }
3165     else {

3659     { CHANNELS_SH(6)|BYTES_SH(2),                                  ANYSPACE,  Pack6Words},
3660     { CHANNELS_SH(6)|BYTES_SH(2)|DOSWAP_SH(1),                     ANYSPACE,  Pack6WordsSwap},
3661 
3662     { BYTES_SH(2),                  ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYENDIAN|
3663                                      ANYEXTRA|ANYCHANNELS|ANYSPACE|ANYPREMUL, PackChunkyWords},
3664     { BYTES_SH(2)|PLANAR_SH(1),     ANYFLAVOR|ANYENDIAN|ANYSWAP|ANYEXTRA|
3665                                      ANYCHANNELS|ANYSPACE|ANYPREMUL,          PackPlanarWords}
3666 
3667 };
3668 
3669 
3670 static const cmsFormattersFloat OutputFormattersFloat[] = {
3671     //    Type                                          Mask                                 Function
3672     //  ----------------------------   ---------------------------------------------------  ----------------------------
3673     {     TYPE_Lab_FLT,                                                ANYPLANAR|ANYEXTRA,   PackLabFloatFromFloat},
3674     {     TYPE_XYZ_FLT,                                                ANYPLANAR|ANYEXTRA,   PackXYZFloatFromFloat},
3675 
3676     {     TYPE_Lab_DBL,                                                ANYPLANAR|ANYEXTRA,   PackLabDoubleFromFloat},
3677     {     TYPE_XYZ_DBL,                                                ANYPLANAR|ANYEXTRA,   PackXYZDoubleFromFloat},
3678 



3679     {     FLOAT_SH(1)|BYTES_SH(4), ANYPLANAR|
3680                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackFloatsFromFloat },
3681     {     FLOAT_SH(1)|BYTES_SH(0), ANYPLANAR|
3682                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackDoublesFromFloat },







3683 #ifndef CMS_NO_HALF_SUPPORT
3684     {     FLOAT_SH(1)|BYTES_SH(2),
3685                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackHalfFromFloat },
3686 #endif
3687 
3688 };
3689 
3690 
3691 // Bit fields set to one in the mask are not compared
3692 static
3693 cmsFormatter _cmsGetStockOutputFormatter(cmsUInt32Number dwInput, cmsUInt32Number dwFlags)
3694 {
3695     cmsUInt32Number i;
3696     cmsFormatter fr;
3697 
3698     // Optimization is only a hint
3699     dwInput &= ~OPTIMIZED_SH(1);
3700 
3701     switch (dwFlags)
3702     {

3873 
3874     cmsColorSpaceSignature ColorSpace      = cmsGetColorSpace(hProfile);
3875     cmsUInt32Number        ColorSpaceBits  = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
3876     cmsInt32Number         nOutputChans    = cmsChannelsOfColorSpace(ColorSpace);
3877     cmsUInt32Number        Float           = lIsFloat ? 1U : 0;
3878 
3879     // Unsupported color space?
3880     if (nOutputChans < 0) return 0;
3881 
3882     // Create a fake formatter for result
3883     return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
3884 }
3885 
3886 // Build a suitable formatter for the colorspace of this profile
3887 cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat)
3888 {
3889 
3890     cmsColorSpaceSignature ColorSpace = cmsGetPCS(hProfile);
3891 
3892     cmsUInt32Number ColorSpaceBits = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
3893     cmsUInt32Number nOutputChans = cmsChannelsOf(ColorSpace);
3894     cmsUInt32Number Float = lIsFloat ? 1U : 0;
3895 
3896     // Unsupported color space?
3897     if (nOutputChans < 0) return 0;
3898 
3899     // Create a fake formatter for result
3900     return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
3901 }
3902 

2963                      ((cmsFloat32Number*)output)[i + start] = (cmsFloat32Number)v;
2964        }
2965 
2966 
2967        if (Extra == 0 && SwapFirst) {
2968 
2969               memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsFloat32Number));
2970               *swap1 = (cmsFloat32Number)v;
2971        }
2972 
2973        if (T_PLANAR(info->OutputFormat))
2974               return output + sizeof(cmsFloat32Number);
2975        else
2976               return output + (nChan + Extra) * sizeof(cmsFloat32Number);
2977 }
2978 
2979 
2980 
2981 // --------------------------------------------------------------------------------------------------------
2982 
2983 static
2984 cmsUInt8Number* PackBytesFromFloat(_cmsTRANSFORM* info,
2985                                     cmsFloat32Number wOut[],
2986                                     cmsUInt8Number* output,
2987                                     cmsUInt32Number Stride)
2988 {
2989     cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
2990     cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
2991     cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
2992     cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
2993     cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
2994     cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
2995     cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
2996     cmsUInt8Number* swap1 = (cmsUInt8Number*)output;
2997     cmsFloat64Number v = 0;
2998     cmsUInt8Number vv = 0;
2999     cmsUInt32Number i, start = 0;
3000 
3001     if (ExtraFirst)
3002         start = Extra;
3003 
3004     for (i = 0; i < nChan; i++) {
3005 
3006         cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
3007 
3008         v = wOut[index] * 65535.0;
3009 
3010         if (Reverse)
3011             v = 65535.0 - v;
3012 
3013         vv =  FROM_16_TO_8(_cmsQuickSaturateWord(v));
3014 
3015         if (Planar)
3016             ((cmsUInt8Number*)output)[(i + start) * Stride] = vv;
3017         else
3018             ((cmsUInt8Number*)output)[i + start] = vv;
3019     }
3020 
3021 
3022     if (Extra == 0 && SwapFirst) {
3023 
3024         memmove(swap1 + 1, swap1, (nChan - 1) * sizeof(cmsUInt8Number));
3025         *swap1 = vv;
3026     }
3027 
3028     if (T_PLANAR(info->OutputFormat))
3029         return output + sizeof(cmsUInt8Number);
3030     else
3031         return output + (nChan + Extra) * sizeof(cmsUInt8Number);
3032 }
3033 
3034 static
3035 cmsUInt8Number* PackWordsFromFloat(_cmsTRANSFORM* info,
3036                                     cmsFloat32Number wOut[],
3037                                     cmsUInt8Number* output,
3038                                     cmsUInt32Number Stride)
3039 {
3040     cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
3041     cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
3042     cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
3043     cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
3044     cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
3045     cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
3046     cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
3047     cmsUInt16Number* swap1 = (cmsUInt16Number*)output;
3048     cmsFloat64Number v = 0;
3049     cmsUInt16Number vv = 0;
3050     cmsUInt32Number i, start = 0;
3051 
3052     if (ExtraFirst)
3053         start = Extra;
3054 
3055     for (i = 0; i < nChan; i++) {
3056 
3057         cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
3058 
3059         v = wOut[index] * 65535.0;
3060 
3061         if (Reverse)
3062             v = 65535.0 - v;
3063 
3064         vv = _cmsQuickSaturateWord(v);
3065 
3066         if (Planar)
3067             ((cmsUInt16Number*)output)[(i + start) * Stride] = vv;
3068         else
3069             ((cmsUInt16Number*)output)[i + start] = vv;
3070     }
3071 
3072     if (Extra == 0 && SwapFirst) {
3073 
3074         memmove(swap1 + 1, swap1, (nChan - 1) * sizeof(cmsUInt16Number));
3075         *swap1 = vv;
3076     }
3077 
3078     if (T_PLANAR(info->OutputFormat))
3079         return output + sizeof(cmsUInt16Number);
3080     else
3081         return output + (nChan + Extra) * sizeof(cmsUInt16Number);
3082 }
3083 
3084 
3085 static
3086 cmsUInt8Number* PackFloatsFromFloat(_cmsTRANSFORM* info,
3087                                     cmsFloat32Number wOut[],
3088                                     cmsUInt8Number* output,
3089                                     cmsUInt32Number Stride)
3090 {
3091        cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
3092        cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
3093        cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
3094        cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
3095        cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
3096        cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
3097        cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
3098        cmsFloat64Number maximum = IsInkSpace(info->OutputFormat) ? 100.0 : 1.0;
3099        cmsFloat32Number* swap1 = (cmsFloat32Number*)output;
3100        cmsFloat64Number v = 0;
3101        cmsUInt32Number i, start = 0;
3102 
3103        Stride /= PixelSize(info->OutputFormat);
3104 

3228         Stride /= PixelSize(Info->OutputFormat);
3229 
3230         Out[0]        = (cmsFloat64Number) (wOut[0] * 100.0);
3231         Out[Stride]   = (cmsFloat64Number) (wOut[1] * 255.0 - 128.0);
3232         Out[Stride*2] = (cmsFloat64Number) (wOut[2] * 255.0 - 128.0);
3233 
3234         return output + sizeof(cmsFloat64Number);
3235     }
3236     else {
3237 
3238         Out[0] = (cmsFloat64Number) (wOut[0] * 100.0);
3239         Out[1] = (cmsFloat64Number) (wOut[1] * 255.0 - 128.0);
3240         Out[2] = (cmsFloat64Number) (wOut[2] * 255.0 - 128.0);
3241 
3242         return output + (sizeof(cmsFloat64Number)*3 + T_EXTRA(Info ->OutputFormat) * sizeof(cmsFloat64Number));
3243     }
3244 
3245 }
3246 
3247 
3248 static
3249 cmsUInt8Number* PackEncodedBytesLabV2FromFloat(_cmsTRANSFORM* Info,
3250                                            cmsFloat32Number wOut[],
3251                                            cmsUInt8Number* output,
3252                                            cmsUInt32Number Stride)
3253 {
3254     cmsCIELab Lab;
3255     cmsUInt16Number wlab[3];
3256 
3257     Lab.L = (cmsFloat64Number)(wOut[0] * 100.0);
3258     Lab.a = (cmsFloat64Number)(wOut[1] * 255.0 - 128.0);
3259     Lab.b = (cmsFloat64Number)(wOut[2] * 255.0 - 128.0);
3260 
3261     cmsFloat2LabEncoded(wlab, &Lab);
3262 
3263     if (T_PLANAR(Info -> OutputFormat)) {
3264 
3265         Stride /= PixelSize(Info->OutputFormat);
3266 
3267         output[0]        = wlab[0] >> 8;
3268         output[Stride]   = wlab[1] >> 8;
3269         output[Stride*2] = wlab[2] >> 8;
3270 
3271         return output + 1;
3272     }
3273     else {
3274 
3275         output[0] = wlab[0] >> 8;
3276         output[1] = wlab[1] >> 8;
3277         output[2] = wlab[2] >> 8;
3278 
3279         return output + (3 + T_EXTRA(Info ->OutputFormat));
3280     }
3281 }
3282 
3283 static
3284 cmsUInt8Number* PackEncodedWordsLabV2FromFloat(_cmsTRANSFORM* Info,
3285                                            cmsFloat32Number wOut[],
3286                                            cmsUInt8Number* output,
3287                                            cmsUInt32Number Stride)
3288 {
3289     cmsCIELab Lab;
3290     cmsUInt16Number wlab[3];
3291 
3292     Lab.L = (cmsFloat64Number)(wOut[0] * 100.0);
3293     Lab.a = (cmsFloat64Number)(wOut[1] * 255.0 - 128.0);
3294     Lab.b = (cmsFloat64Number)(wOut[2] * 255.0 - 128.0);
3295 
3296     cmsFloat2LabEncodedV2(wlab, &Lab);
3297 
3298     if (T_PLANAR(Info -> OutputFormat)) {
3299 
3300         Stride /= PixelSize(Info->OutputFormat);
3301 
3302         ((cmsUInt16Number*) output)[0]        = wlab[0];
3303         ((cmsUInt16Number*) output)[Stride]   = wlab[1];
3304         ((cmsUInt16Number*) output)[Stride*2] = wlab[2];
3305 
3306         return output + sizeof(cmsUInt16Number);
3307     }
3308     else {
3309 
3310          ((cmsUInt16Number*) output)[0] = wlab[0];
3311          ((cmsUInt16Number*) output)[1] = wlab[1];
3312          ((cmsUInt16Number*) output)[2] = wlab[2];
3313 
3314         return output + (3 + T_EXTRA(Info ->OutputFormat)) * sizeof(cmsUInt16Number);
3315     }
3316 }
3317 
3318 
3319 // From 0..1 range to 0..MAX_ENCODEABLE_XYZ
3320 static
3321 cmsUInt8Number* PackXYZFloatFromFloat(_cmsTRANSFORM* Info,
3322                                       cmsFloat32Number wOut[],
3323                                       cmsUInt8Number* output,
3324                                       cmsUInt32Number Stride)
3325 {
3326     cmsFloat32Number* Out = (cmsFloat32Number*) output;
3327 
3328     if (T_PLANAR(Info -> OutputFormat)) {
3329 
3330         Stride /= PixelSize(Info->OutputFormat);
3331 
3332         Out[0]        = (cmsFloat32Number) (wOut[0] * MAX_ENCODEABLE_XYZ);
3333         Out[Stride]   = (cmsFloat32Number) (wOut[1] * MAX_ENCODEABLE_XYZ);
3334         Out[Stride*2] = (cmsFloat32Number) (wOut[2] * MAX_ENCODEABLE_XYZ);
3335 
3336         return output + sizeof(cmsFloat32Number);
3337     }
3338     else {

3832     { CHANNELS_SH(6)|BYTES_SH(2),                                  ANYSPACE,  Pack6Words},
3833     { CHANNELS_SH(6)|BYTES_SH(2)|DOSWAP_SH(1),                     ANYSPACE,  Pack6WordsSwap},
3834 
3835     { BYTES_SH(2),                  ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYENDIAN|
3836                                      ANYEXTRA|ANYCHANNELS|ANYSPACE|ANYPREMUL, PackChunkyWords},
3837     { BYTES_SH(2)|PLANAR_SH(1),     ANYFLAVOR|ANYENDIAN|ANYSWAP|ANYEXTRA|
3838                                      ANYCHANNELS|ANYSPACE|ANYPREMUL,          PackPlanarWords}
3839 
3840 };
3841 
3842 
3843 static const cmsFormattersFloat OutputFormattersFloat[] = {
3844     //    Type                                          Mask                                 Function
3845     //  ----------------------------   ---------------------------------------------------  ----------------------------
3846     {     TYPE_Lab_FLT,                                                ANYPLANAR|ANYEXTRA,   PackLabFloatFromFloat},
3847     {     TYPE_XYZ_FLT,                                                ANYPLANAR|ANYEXTRA,   PackXYZFloatFromFloat},
3848 
3849     {     TYPE_Lab_DBL,                                                ANYPLANAR|ANYEXTRA,   PackLabDoubleFromFloat},
3850     {     TYPE_XYZ_DBL,                                                ANYPLANAR|ANYEXTRA,   PackXYZDoubleFromFloat},
3851 
3852     {     TYPE_LabV2_8,                                                ANYPLANAR|ANYEXTRA,   PackEncodedBytesLabV2FromFloat},
3853     {     TYPE_LabV2_16,                                               ANYPLANAR|ANYEXTRA,   PackEncodedWordsLabV2FromFloat},
3854 
3855     {     FLOAT_SH(1)|BYTES_SH(4), ANYPLANAR|
3856                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackFloatsFromFloat },
3857     {     FLOAT_SH(1)|BYTES_SH(0), ANYPLANAR|
3858                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackDoublesFromFloat },
3859 
3860     {     BYTES_SH(2), ANYPLANAR|
3861                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackWordsFromFloat },
3862 
3863     {     BYTES_SH(1), ANYPLANAR|
3864                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackBytesFromFloat },
3865 
3866 #ifndef CMS_NO_HALF_SUPPORT
3867     {     FLOAT_SH(1)|BYTES_SH(2),
3868                              ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE,   PackHalfFromFloat },
3869 #endif
3870 
3871 };
3872 
3873 
3874 // Bit fields set to one in the mask are not compared
3875 static
3876 cmsFormatter _cmsGetStockOutputFormatter(cmsUInt32Number dwInput, cmsUInt32Number dwFlags)
3877 {
3878     cmsUInt32Number i;
3879     cmsFormatter fr;
3880 
3881     // Optimization is only a hint
3882     dwInput &= ~OPTIMIZED_SH(1);
3883 
3884     switch (dwFlags)
3885     {

4056 
4057     cmsColorSpaceSignature ColorSpace      = cmsGetColorSpace(hProfile);
4058     cmsUInt32Number        ColorSpaceBits  = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
4059     cmsInt32Number         nOutputChans    = cmsChannelsOfColorSpace(ColorSpace);
4060     cmsUInt32Number        Float           = lIsFloat ? 1U : 0;
4061 
4062     // Unsupported color space?
4063     if (nOutputChans < 0) return 0;
4064 
4065     // Create a fake formatter for result
4066     return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
4067 }
4068 
4069 // Build a suitable formatter for the colorspace of this profile
4070 cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat)
4071 {
4072 
4073     cmsColorSpaceSignature ColorSpace = cmsGetPCS(hProfile);
4074 
4075     cmsUInt32Number ColorSpaceBits = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
4076     cmsInt32Number  nOutputChans = cmsChannelsOfColorSpace(ColorSpace);
4077     cmsUInt32Number Float = lIsFloat ? 1U : 0;
4078 
4079     // Unsupported color space?
4080     if (nOutputChans < 0) return 0;
4081 
4082     // Create a fake formatter for result
4083     return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
4084 }
4085 
< prev index next >