lib/PHPRtfLite/Image.php
public static function createFromString(PHPRtfLite $rtf, $string, $type, $width = null, $height = null)
    {
        $stream = fopen('data://text/plain;base64,' . base64_encode($string), 'rb');
        $image = self::create($rtf, $stream, $type, $width, $height);
        if ($type != self::TYPE_WMF) {
            $imageResource = imagecreatefromstring($string);
            $image->setImageWidth(imagesx($imageResource));
            $image->setImageHeight(imagesy($imageResource));
        }
        return $image;
    }
public static function createFromString(PHPRtfLite $rtf, $string, $type, $width = null, $height = null)
    {
        $stream = fopen('data://text/plain;base64,' . base64_encode($string), 'rb');
        $image = self::create($rtf, $stream, $type, $width, $height);
        if ($type != self::TYPE_WMF) {
            $imageResource = imagecreatefromstring($string);
            $image->setImageWidth(imagesx($imageResource));
            $image->setImageHeight(imagesy($imageResource));
        }
        return $image;
    }
public static function createFromString ( PHPRtfLite $ rtf , $ string , $ type , $ width = null , $ height = null ) { $ stream = fopen ( 'data://text/plain;base64,' . base64_encode ( $ string ) , 'rb' ) ; $ image = self :: create ( $ rtf , $ stream , $ type , $ width , $ height ) ; if ( $ type != self :: TYPE_WMF ) { $ imageResource = imagecreatefromstring ( $ string ) ; $ image -> setImageWidth ( imagesx ( $ imageResource ) ) ; $ image -> setImageHeight ( imagesy ( $ imageResource ) ) ; } return $ image ; }
creates rtf image from string

@param   PHPRtfLite              $rtf
@param   string                  $string
@param   string                  $type   (represented by class constants)
@param   float                   $width  optional
@param   float                   $height optional
@return  PHPRtfLite_Image
creates rtf image from string