CSJ2K.Icc.ICCProfiler.getICCProfile C# (CSharp) Метод

getICCProfile() приватный Метод

Get the ICCProfile information JP2 ColorSpace
/// /// ///
private getICCProfile ( CSJ2K csm ) : CSJ2K.Icc.RestrictedICCProfile
csm CSJ2K provides all necessary info about the colorspace ///
Результат CSJ2K.Icc.RestrictedICCProfile
        private RestrictedICCProfile getICCProfile(CSJ2K.Color.ColorSpace csm)
        {
            switch (ncomps)
            {

                case 1:
                    icc = ICCMonochromeInputProfile.createInstance(csm);
                    ricc = icc.parse();
                    if (ricc.Type != RestrictedICCProfile.kMonochromeInput)
                        throw new System.ArgumentException("wrong ICCProfile type" + " for image");
                    break;

                case 3:
                    icc = ICCMatrixBasedInputProfile.createInstance(csm);
                    ricc = icc.parse();
                    if (ricc.Type != RestrictedICCProfile.kThreeCompInput)
                        throw new System.ArgumentException("wrong ICCProfile type" + " for image");
                    break;

                default:
                    throw new System.ArgumentException("illegal number of " + "components (" + ncomps + ") in image");

            }
            return ricc;
        }