CSJ2K.j2k.codestream.reader.HeaderDecoder.readCRG C# (CSharp) Method

readCRG() private method

Reads a CRG marker segment and checks its length. CRG is an informational marker segment that allows specific registration of components with respect to each other.
private readCRG ( System ehs ) : void
ehs System The encoded header stream /// ///
return void
        private void readCRG(System.IO.BinaryReader ehs)
        {
            HeaderInfo.CRG ms = hi.NewCRG;
            hi.crgValue = ms;

            ms.lcrg = ehs.ReadUInt16();
            ms.xcrg = new int[nComp];
            ms.ycrg = new int[nComp];

            FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "Information in CRG marker segment " + "not taken into account. This may affect the display " + "of the decoded image.");
            for (int c = 0; c < nComp; c++)
            {
                ms.xcrg[c] = ehs.ReadUInt16();
                ms.ycrg[c] = ehs.ReadUInt16();
            }

            // Check marker length
            checkMarkerLength(ehs, "CRG marker");
        }