Exemple #1
0
        internal ICCHeader(byte[] arr)
        {
            bool ile = BitConverter.IsLittleEndian;

            //Profile size field (bytes 0 to 3)
            ProfileSize      = Helper.GetUInt32(0);
            Helper.IsReverse = new bool[ProfileSize];
            //Preferred CMM type field (bytes 4 to 7)
            CMMType = Helper.GetASCIIString(4, 4);
            //Profile version field (bytes 8 to 11) (10 and 11 are not used)
            ProfileVersionNumber = new VersionNumber(ICCProfile.DataBytes[8], ICCProfile.DataBytes[9]);
            //Profile/device class field (bytes 12 to 15)
            ProfileClass = (ProfileClassName)Helper.GetUInt32(12);
            //Data colour space field (bytes 16 to 20)
            DataColorspace = (ColorSpaceType)Helper.GetUInt32(16);
            //PCS field (bytes 20 to 23)
            PCS = (ColorSpaceType)Helper.GetUInt32(20);
            //Date and time field (bytes 24 to 35)
            CreationDate = Helper.GetDateTime(24);
            //Profile file signature field (bytes 36 to 39)
            ProfileFileSignature = Helper.GetASCIIString(36, 4);
            //Primary platform field (bytes 40 to 43)
            PrimaryPlatformSignature = (PrimaryPlatformName)Helper.GetUInt32(40);
            //Profile flags field (bytes 44 to 47)
            ProfileFlags = new ProfileFlag(44);
            //Device manufacturer field (bytes 48 to 51)
            DeviceManufacturer = (TagSignature)Helper.GetUInt32(48);
            //Device model field (bytes 52 to 55)
            DeviceModel = (TagSignature)Helper.GetUInt32(52);
            //Device attributes field (bytes 56 to 63)
            DeviceAttributes = new DeviceAttribute(56);
            //Rendering intent field (bytes 64 to 67) (66 and 67 are zero)
            RenderingIntent = (RenderingIntentName)Helper.GetUInt16(64);
            //PCS illuminant field (Bytes 68 to 79)
            PCSIlluminant = new XYZnumber(68);
            //Profile creator field (bytes 80 to 83)
            ProfileCreatorSignature = Helper.GetUInt32(64);;
            //Profile ID field (bytes 84 to 99)
            ProfileID = Helper.GetProfileID(84);
            //Reserved field (bytes 100 to 127)
        }
Exemple #2
0
        internal ICCHeader(byte[] arr)
        {
            bool ile = BitConverter.IsLittleEndian;

            //Profile size field (bytes 0 to 3)
            ProfileSize = Helper.GetUInt32(0);
            Helper.IsReverse = new bool[ProfileSize];
            //Preferred CMM type field (bytes 4 to 7)
            CMMType = Helper.GetASCIIString(4, 4);
            //Profile version field (bytes 8 to 11) (10 and 11 are not used)
            ProfileVersionNumber = new VersionNumber(ICCProfile.DataBytes[8], ICCProfile.DataBytes[9]);
            //Profile/device class field (bytes 12 to 15)
            ProfileClass = (ProfileClassName)Helper.GetUInt32(12);
            //Data colour space field (bytes 16 to 20)
            DataColorspace = (ColorSpaceType)Helper.GetUInt32(16);
            //PCS field (bytes 20 to 23)
            PCS = (ColorSpaceType)Helper.GetUInt32(20);
            //Date and time field (bytes 24 to 35)
            CreationDate = Helper.GetDateTime(24);
            //Profile file signature field (bytes 36 to 39)
            ProfileFileSignature = Helper.GetASCIIString(36, 4);
            //Primary platform field (bytes 40 to 43)
            PrimaryPlatformSignature = (PrimaryPlatformName)Helper.GetUInt32(40);
            //Profile flags field (bytes 44 to 47)
            ProfileFlags = new ProfileFlag(44);
            //Device manufacturer field (bytes 48 to 51)
            DeviceManufacturer = (TagSignature)Helper.GetUInt32(48);
            //Device model field (bytes 52 to 55)
            DeviceModel = (TagSignature)Helper.GetUInt32(52);
            //Device attributes field (bytes 56 to 63)
            DeviceAttributes = new DeviceAttribute(56);
            //Rendering intent field (bytes 64 to 67) (66 and 67 are zero)
            RenderingIntent = (RenderingIntentName)Helper.GetUInt16(64);
            //PCS illuminant field (Bytes 68 to 79)
            PCSIlluminant = new XYZnumber(68);
            //Profile creator field (bytes 80 to 83)
            ProfileCreatorSignature = Helper.GetUInt32(64); ;
            //Profile ID field (bytes 84 to 99)
            ProfileID = Helper.GetProfileID(84);
            //Reserved field (bytes 100 to 127)
        }