Convert color value from the YCbCr space to CIE XYZ. The colorspace conversion algorithm comes from the IJG v5a code; see below for more information on how it works.
Пример #1
0
        private bool initYCbCrConversion()
        {
            if (ycbcr == null)
                ycbcr = new TiffYCbCrToRGB();

            FieldValue[] result = tif.GetFieldDefaulted(TiffTag.YCBCRCOEFFICIENTS);
            float[] luma = result[0].ToFloatArray();

            result = tif.GetFieldDefaulted(TiffTag.REFERENCEBLACKWHITE);
            float[] refBlackWhite = result[0].ToFloatArray();

            ycbcr.Init(luma, refBlackWhite);
            return true;
        }