lib/PHPRtfLite/Image.php
protected function writeIntoRtfStream($startFrom = 0)
    {
        if (!is_resource($this->_stream)) {
            throw new PHPRtfLite_Exception("Image stream has been closed!");
        }

        fseek($this->_stream, $startFrom);
        $rtfImageType = $this->getImageTypeAsRtf();

        $rtfStream = $this->_rtf->getWriter();
        $rtfStream->write('{\*\shppict {\pict');

        if ($this->_border) {
            $rtfStream->write($this->_border->getContent());
        }

        $rtfStream->write($rtfImageType . '\picscalex100\picscaley100');
        $rtfStream->write('\picwgoal' . $this->getImageRtfWidth());
        $rtfStream->write('\pichgoal' . $this->getImageRtfHeight());
        $rtfStream->write(' ');

        while (!feof($this->_stream)) {
            $stringBuffer = fread($this->_stream, 1024);
            $stringHex = bin2hex($stringBuffer);
            $rtfStream->write($stringHex);
        }

        $rtfStream->write('}}');
    }
protected function writeIntoRtfStream($startFrom = 0)
    {
        if (!is_resource($this->_stream)) {
            throw new PHPRtfLite_Exception("Image stream has been closed!");
        }

        fseek($this->_stream, $startFrom);
        $rtfImageType = $this->getImageTypeAsRtf();

        $rtfStream = $this->_rtf->getWriter();
        $rtfStream->write('{\*\shppict {\pict');

        if ($this->_border) {
            $rtfStream->write($this->_border->getContent());
        }

        $rtfStream->write($rtfImageType . '\picscalex100\picscaley100');
        $rtfStream->write('\picwgoal' . $this->getImageRtfWidth());
        $rtfStream->write('\pichgoal' . $this->getImageRtfHeight());
        $rtfStream->write(' ');

        while (!feof($this->_stream)) {
            $stringBuffer = fread($this->_stream, 1024);
            $stringHex = bin2hex($stringBuffer);
            $rtfStream->write($stringHex);
        }

        $rtfStream->write('}}');
    }
protected function writeIntoRtfStream ( $ startFrom = 0 ) { if ( ! is_resource ( $ this -> _stream ) ) { throw new PHPRtfLite_Exception ( "Image stream has been closed!" ) ; } fseek ( $ this -> _stream , $ startFrom ) ; $ rtfImageType = $ this -> getImageTypeAsRtf ( ) ; $ rtfStream = $ this -> _rtf -> getWriter ( ) ; $ rtfStream -> write ( '{\*\shppict {\pict' ) ; if ( $ this -> _border ) { $ rtfStream -> write ( $ this -> _border -> getContent ( ) ) ; } $ rtfStream -> write ( $ rtfImageType . '\picscalex100\picscaley100' ) ; $ rtfStream -> write ( '\picwgoal' . $ this -> getImageRtfWidth ( ) ) ; $ rtfStream -> write ( '\pichgoal' . $ this -> getImageRtfHeight ( ) ) ; $ rtfStream -> write ( ' ' ) ; while ( ! feof ( $ this -> _stream ) ) { $ stringBuffer = fread ( $ this -> _stream , 1024 ) ; $ stringHex = bin2hex ( $ stringBuffer ) ; $ rtfStream -> write ( $ stringHex ) ; } $ rtfStream -> write ( '}}' ) ; }
writes image into rtf stream

@param integer $startFrom
@throws PHPRtfLite_Exception
writes image into rtf stream