Ejemplo n.º 1
0
        private void ParseIDAT(PngChunk chunk)
        {
            byte[] decodedSequence = Inflate(IDATdata);
            rgbNumber = Width * Length * 3;
            lineSize  = Width * 3;

            if (ColourType == 6)
            {
                decodedSequence = GetAlpha(decodedSequence);
            }

            if (Plte.Length != 0)                                       //color type 3
            {
                decodedSequence = UsePLTE(decodedSequence);
            }

            RGBArray = new byte[rgbNumber];
            UseFilters(decodedSequence);

            if (ColourType == 6)
            {
                UseAlphaChannel();
            }
        }