lib/ShortPixel/persist/PNGReader.php
public function get_chunks($type) {
        if (!isset($this->_chunks[$type]) || $this->_chunks[$type] === null)
            return null;

        $chunks = array ();

        foreach ($this->_chunks[$type] as $chunk) {
            if ($chunk['size'] > 0) {
                fseek($this->_fp, $chunk['offset'], SEEK_SET);
                $chunks[] = fread($this->_fp, $chunk['size']);
            } else {
                $chunks[] = '';
            }
        }

        return $chunks;
    }
public function get_chunks($type) {
        if (!isset($this->_chunks[$type]) || $this->_chunks[$type] === null)
            return null;

        $chunks = array ();

        foreach ($this->_chunks[$type] as $chunk) {
            if ($chunk['size'] > 0) {
                fseek($this->_fp, $chunk['offset'], SEEK_SET);
                $chunks[] = fread($this->_fp, $chunk['size']);
            } else {
                $chunks[] = '';
            }
        }

        return $chunks;
    }
public function get_chunks ( $ type ) { if ( ! isset ( $ this -> _chunks [ $ type ] ) || $ this -> _chunks [ $ type ] === null ) return null ; $ chunks = array ( ) ; foreach ( $ this -> _chunks [ $ type ] as $ chunk ) { if ( $ chunk [ 'size' ] > 0 ) { fseek ( $ this -> _fp , $ chunk [ 'offset' ] , SEEK_SET ) ; $ chunks [ ] = fread ( $ this -> _fp , $ chunk [ 'size' ] ) ; } else { $ chunks [ ] = '' ; } } return $ chunks ; }
Returns all chunks of said type
Returns all chunks of said type