This project is read-only.
1
Vote

some time big gif loaded by gifDecoder partly

description

File:GifDecoder.cs
Code:
long length = stream.Length;
                    while (stream.Position < length)  
//seems work good.  Why soom gif meet "nextFlag ==0x00" befor read to the end??
                    {
                        readLoopCount++;
                        if (nextFlag == ImageLabel)
                        {
                            frameCount++;
                            ReadFrame();
                        }
                        else if (nextFlag == ExtensionIntroducer)
                        {
                            int gcl = stream.ReadByte();
                            switch (gcl)
                            {
                                case GraphicControlLabel:
                                    ReadGraphicalControlExtension();
                                    break;
                                case CommentLabel:
                                    ReadComments();
                                    break;
                                case ApplicationExtensionLabel:
                                    Skip(12);
                                    break;
                                case PlainTextLabel:
                                    Skip(13);
                                    break;
                            }
                        }
                        else if (nextFlag == EndIntroducer)
                        {
                            break;
                        }
                        nextFlag = stream.ReadByte();
                    }

comments