PHP Class Sulu\Bundle\MediaBundle\Media\ImageConverter\MediaImageExtractor

Inheritance: implements Sulu\Bundle\MediaBundle\Media\ImageConverter\MediaImageExtractorInterface
显示文件 Open project: sulu/sulu

Public Methods

Method Description
__construct ( Imagine\Image\ImagineInterface $imagine, Sulu\Bundle\MediaBundle\Media\Video\VideoThumbnailServiceInterface $videoThumbnail, $ghostScriptPath )
extract ( $content )

Private Methods

Method Description
convertPdfToImage ( string $content ) : string Converts the first page of pdf to an image using ghostscript.
convertPsdToImage ( string $content ) : string Converts a PSD to a png using imagine. Only works with Imagick and not with GD.
convertSvgToImage ( $content )
convertVideoToImage ( string $content ) : string Converts one frame of a video to an image using FFMPEG.
createTemporaryFile ( string $content ) : string Returns the path to a temporary file containing the given content.

Method Details

__construct() public method

public __construct ( Imagine\Image\ImagineInterface $imagine, Sulu\Bundle\MediaBundle\Media\Video\VideoThumbnailServiceInterface $videoThumbnail, $ghostScriptPath )
$imagine Imagine\Image\ImagineInterface
$videoThumbnail Sulu\Bundle\MediaBundle\Media\Video\VideoThumbnailServiceInterface

extract() public method

public extract ( $content )