lib/PHPRtfLite/Image.php
private static function create(PHPRtfLite $rtf, $stream, $type, $width, $height)
    {
        switch ($type) {
            case self::TYPE_WMF:
                return new PHPRtfLite_Image_Wmf($rtf, $stream, $width, $height);
            default:
                $image = new PHPRtfLite_Image_Gd($rtf, $stream, $width, $height);
                $image->setImageType($type);
                return $image;
        }
    }
private static function create(PHPRtfLite $rtf, $stream, $type, $width, $height)
    {
        switch ($type) {
            case self::TYPE_WMF:
                return new PHPRtfLite_Image_Wmf($rtf, $stream, $width, $height);
            default:
                $image = new PHPRtfLite_Image_Gd($rtf, $stream, $width, $height);
                $image->setImageType($type);
                return $image;
        }
    }
private static function create ( PHPRtfLite $ rtf , $ stream , $ type , $ width , $ height ) { switch ( $ type ) { case self :: TYPE_WMF : return new PHPRtfLite_Image_Wmf ( $ rtf , $ stream , $ width , $ height ) ; default : $ image = new PHPRtfLite_Image_Gd ( $ rtf , $ stream , $ width , $ height ) ; $ image -> setImageType ( $ type ) ; return $ image ; } }
factory method
creates rtf image from stream

@param   PHPRtfLite $rtf
@param   resource   $stream
@param   string     $type   (represented by class constants)
@param   float      $width  optional
@param   float      $height optional
@return  PHPRtfLite_Image_Wmf|PHPRtfLite_Image_Gd|PHPRtfLite_Image
factory method creates rtf image from stream