2 namespace TYPO3\CMS\Core\Resource\Processing;
65 $configuration = array_merge(array(
'width' => 64,
'height' => 64), $task->
getConfiguration());
70 if ($sourceFile->getProperty(
'width') > 0 && $sourceFile->getProperty(
'height') > 0
71 && $configuration[
'width'] > $sourceFile->getProperty(
'width')
72 && $configuration[
'height'] > $sourceFile->getProperty(
'height')) {
76 return $this->generatePreviewFromFile($sourceFile, $configuration, $this->
getTemporaryFilePath($task));
98 protected function generatePreviewFromFile(
File $file, array $configuration, $targetFilePath)
107 $graphicalFunctions->getTemporaryImageWithText(
114 'filePath' => $targetFilePath,
120 $gifBuilder->absPrefix = PATH_site;
121 $info = $gifBuilder->getImageDimensions($originalFileName);
122 $newInfo = $gifBuilder->getImageScale($info, $configuration[
'width'], $configuration[
'height'], array());
124 'width' => $newInfo[0],
125 'height' => $newInfo[1],
130 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'GFX'][
'im']) {
131 $parameters =
'-sample ' . $configuration[
'width'] .
'x' . $configuration[
'height'] .
' '
137 if (!file_exists($targetFilePath)) {
140 $graphicalFunctions->getTemporaryImageWithText(
149 'filePath' => $targetFilePath,