src/thinkextend/image/driver/Gif.php
public function GIFDecoder($GIF_pointer)
    {
        $this->GIF_stream = $GIF_pointer;

        GIFDecoder::GIFGetByte(6); // GIF89a
        GIFDecoder::GIFGetByte(7); // Logical Screen Descriptor

        $this->GIF_screen = $this->GIF_buffer;
        $this->GIF_colorF = $this->GIF_buffer[4] & 0x80 ? 1 : 0;
        $this->GIF_sorted = $this->GIF_buffer[4] & 0x08 ? 1 : 0;
        $this->GIF_colorC = $this->GIF_buffer[4] & 0x07;
        $this->GIF_colorS = 2 << $this->GIF_colorC;

        if (1 == $this->GIF_colorF) {
            GIFDecoder::GIFGetByte(3 * $this->GIF_colorS);
            $this->GIF_global = $this->GIF_buffer;
        }
        /*
         *
         *  05.06.2007.
         *  Made a little modification
         *
         *
        -    for ( $cycle = 1; $cycle; ) {
        +        if ( GIFDecoder::GIFGetByte ( 1 ) ) {
        -            switch ( $this->GIF_buffer [ 0 ] ) {
        -                case 0x21:
        -                    GIFDecoder::GIFReadExtensions ( );
        -                    break;
        -                case 0x2C:
        -                    GIFDecoder::GIFReadDescriptor ( );
        -                    break;
        -                case 0x3B:
        -                    $cycle = 0;
        -                    break;
        -              }
        -        }
        +        else {
        +            $cycle = 0;
        +        }
        -    }
         */
        for ($cycle = 1; $cycle;) {
            if (GIFDecoder::GIFGetByte(1)) {
                switch ($this->GIF_buffer[0]) {
                    case 0x21:
                        GIFDecoder::GIFReadExtensions();
                        break;
                    case 0x2C:
                        GIFDecoder::GIFReadDescriptor();
                        break;
                    case 0x3B:
                        $cycle = 0;
                        break;
                }
            } else {
                $cycle = 0;
            }
        }
    }
public function GIFDecoder($GIF_pointer)
    {
        $this->GIF_stream = $GIF_pointer;

        GIFDecoder::GIFGetByte(6); // GIF89a
        GIFDecoder::GIFGetByte(7); // Logical Screen Descriptor

        $this->GIF_screen = $this->GIF_buffer;
        $this->GIF_colorF = $this->GIF_buffer[4] & 0x80 ? 1 : 0;
        $this->GIF_sorted = $this->GIF_buffer[4] & 0x08 ? 1 : 0;
        $this->GIF_colorC = $this->GIF_buffer[4] & 0x07;
        $this->GIF_colorS = 2 << $this->GIF_colorC;

        if (1 == $this->GIF_colorF) {
            GIFDecoder::GIFGetByte(3 * $this->GIF_colorS);
            $this->GIF_global = $this->GIF_buffer;
        }
        /*
         *
         *  05.06.2007.
         *  Made a little modification
         *
         *
        -    for ( $cycle = 1; $cycle; ) {
        +        if ( GIFDecoder::GIFGetByte ( 1 ) ) {
        -            switch ( $this->GIF_buffer [ 0 ] ) {
        -                case 0x21:
        -                    GIFDecoder::GIFReadExtensions ( );
        -                    break;
        -                case 0x2C:
        -                    GIFDecoder::GIFReadDescriptor ( );
        -                    break;
        -                case 0x3B:
        -                    $cycle = 0;
        -                    break;
        -              }
        -        }
        +        else {
        +            $cycle = 0;
        +        }
        -    }
         */
        for ($cycle = 1; $cycle;) {
            if (GIFDecoder::GIFGetByte(1)) {
                switch ($this->GIF_buffer[0]) {
                    case 0x21:
                        GIFDecoder::GIFReadExtensions();
                        break;
                    case 0x2C:
                        GIFDecoder::GIFReadDescriptor();
                        break;
                    case 0x3B:
                        $cycle = 0;
                        break;
                }
            } else {
                $cycle = 0;
            }
        }
    }
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::
::
::    GIFDecoder ( $GIF_pointer )
::