src/thinkextend/image/driver/Gif.php
public function GIFReadDescriptor()
    {

        GIFDecoder::GIFGetByte(9);
        $GIF_screen = $this->GIF_buffer;
        $GIF_colorF = $this->GIF_buffer[8] & 0x80 ? 1 : 0;
        if ($GIF_colorF) {
            $GIF_code = $this->GIF_buffer[8] & 0x07;
            $GIF_sort = $this->GIF_buffer[8] & 0x20 ? 1 : 0;
        } else {
            $GIF_code = $this->GIF_colorC;
            $GIF_sort = $this->GIF_sorted;
        }
        $GIF_size = 2 << $GIF_code;
        $this->GIF_screen[4] &= 0x70;
        $this->GIF_screen[4] |= 0x80;
        $this->GIF_screen[4] |= $GIF_code;
        if ($GIF_sort) {
            $this->GIF_screen[4] |= 0x08;
        }
        $this->GIF_string = "GIF87a";
        GIFDecoder::GIFPutByte($this->GIF_screen);
        if (1 == $GIF_colorF) {
            GIFDecoder::GIFGetByte(3 * $GIF_size);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
        } else {
            GIFDecoder::GIFPutByte($this->GIF_global);
        }
        $this->GIF_string .= chr(0x2C);
        $GIF_screen[8] &= 0x40;
        GIFDecoder::GIFPutByte($GIF_screen);
        GIFDecoder::GIFGetByte(1);
        GIFDecoder::GIFPutByte($this->GIF_buffer);
        for (;;) {
            GIFDecoder::GIFGetByte(1);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
            if (($u = $this->GIF_buffer[0]) == 0x00) {
                break;
            }
            GIFDecoder::GIFGetByte($u);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
        }
        $this->GIF_string .= chr(0x3B);
        /*
        Add frames into $GIF_stream array...
         */
        $this->GIF_arrays[] = $this->GIF_string;
    }
public function GIFReadDescriptor()
    {

        GIFDecoder::GIFGetByte(9);
        $GIF_screen = $this->GIF_buffer;
        $GIF_colorF = $this->GIF_buffer[8] & 0x80 ? 1 : 0;
        if ($GIF_colorF) {
            $GIF_code = $this->GIF_buffer[8] & 0x07;
            $GIF_sort = $this->GIF_buffer[8] & 0x20 ? 1 : 0;
        } else {
            $GIF_code = $this->GIF_colorC;
            $GIF_sort = $this->GIF_sorted;
        }
        $GIF_size = 2 << $GIF_code;
        $this->GIF_screen[4] &= 0x70;
        $this->GIF_screen[4] |= 0x80;
        $this->GIF_screen[4] |= $GIF_code;
        if ($GIF_sort) {
            $this->GIF_screen[4] |= 0x08;
        }
        $this->GIF_string = "GIF87a";
        GIFDecoder::GIFPutByte($this->GIF_screen);
        if (1 == $GIF_colorF) {
            GIFDecoder::GIFGetByte(3 * $GIF_size);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
        } else {
            GIFDecoder::GIFPutByte($this->GIF_global);
        }
        $this->GIF_string .= chr(0x2C);
        $GIF_screen[8] &= 0x40;
        GIFDecoder::GIFPutByte($GIF_screen);
        GIFDecoder::GIFGetByte(1);
        GIFDecoder::GIFPutByte($this->GIF_buffer);
        for (;;) {
            GIFDecoder::GIFGetByte(1);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
            if (($u = $this->GIF_buffer[0]) == 0x00) {
                break;
            }
            GIFDecoder::GIFGetByte($u);
            GIFDecoder::GIFPutByte($this->GIF_buffer);
        }
        $this->GIF_string .= chr(0x3B);
        /*
        Add frames into $GIF_stream array...
         */
        $this->GIF_arrays[] = $this->GIF_string;
    }
public function GIFReadDescriptor ( ) { GIFDecoder :: GIFGetByte ( 9 ) ; $ GIF_screen = $ this -> GIF_buffer ; $ GIF_colorF = $ this -> GIF_buffer [ 8 ] & 0x80 ? 1 : 0 ; if ( $ GIF_colorF ) { $ GIF_code = $ this -> GIF_buffer [ 8 ] & 0x07 ; $ GIF_sort = $ this -> GIF_buffer [ 8 ] & 0x20 ? 1 : 0 ; } else { $ GIF_code = $ this -> GIF_colorC ; $ GIF_sort = $ this -> GIF_sorted ; } $ GIF_size = 2 << $ GIF_code ; $ this -> GIF_screen [ 4 ] &= 0x70 ; $ this -> GIF_screen [ 4 ] |= 0x80 ; $ this -> GIF_screen [ 4 ] |= $ GIF_code ; if ( $ GIF_sort ) { $ this -> GIF_screen [ 4 ] |= 0x08 ; } $ this -> GIF_string = "GIF87a" ; GIFDecoder :: GIFPutByte ( $ this -> GIF_screen ) ; if ( 1 == $ GIF_colorF ) { GIFDecoder :: GIFGetByte ( 3 * $ GIF_size ) ; GIFDecoder :: GIFPutByte ( $ this -> GIF_buffer ) ; } else { GIFDecoder :: GIFPutByte ( $ this -> GIF_global ) ; } $ this -> GIF_string .= chr ( 0x2C ) ; $ GIF_screen [ 8 ] &= 0x40 ; GIFDecoder :: GIFPutByte ( $ GIF_screen ) ; GIFDecoder :: GIFGetByte ( 1 ) ; GIFDecoder :: GIFPutByte ( $ this -> GIF_buffer ) ; for ( ; ; ) { GIFDecoder :: GIFGetByte ( 1 ) ; GIFDecoder :: GIFPutByte ( $ this -> GIF_buffer ) ; if ( ( $ u = $ this -> GIF_buffer [ 0 ] ) == 0x00 ) { break ; } GIFDecoder :: GIFGetByte ( $ u ) ; GIFDecoder :: GIFPutByte ( $ this -> GIF_buffer ) ; } $ this -> GIF_string .= chr ( 0x3B ) ; /*
        Add frames into $GIF_stream array...
         */ $ this -> GIF_arrays [ ] = $ this -> GIF_string ; }
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::
::
::    GIFReadExtension ( )
::
/ * ::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: GIFReadExtension ( ) ::