Feature #19748 ยป 10025_v8.patch
t3lib/config_default.php (Arbeitskopie) | ||
---|---|---|
'im_noScaleUp' => 0, // Boolean. If set, images are not being scaled up if told so (in t3lib/stdgraphics.php)
|
||
'im_combine_filename' => 'combine', // String. Latest ImageMagick versions has changed the name of combine to composite. Configure here if needed.
|
||
'im_noFramePrepended' => 0, // Boolean. If set, the [x] frame indicator is NOT prepended to filenames in stdgraphic. Some IM5+ version didn't work at all with the typical [0]-prefix, which allow multipage pdf's and animated gif's to be scaled only for the first frame/page and that seriously cuts down rendering time. Set this flag only if your ImageMagick version cannot find the files. Notice that changing this flag causes temporary filenames to change, thus the server will begin scaling images again which were previously cached.
|
||
'im_stripProfileCommand' => '+profile \'*\'', // String. Specify the command to strip the profile information, which can reduce thumbnail size up to 60KB. Command can differ in IM/GM, IM also know the -strip command. See http://www.imagemagick.org/Usage/thumbnails/#profiles for details
|
||
'im_useStripProfileByDefault' => 0, // Boolean. If set, the im_stripProfileCommand is used with all IM Image operations by default. See tsRef for setting this parameter explocit for IMAGE generation.
|
||
'jpg_quality' => 70, // Integer. Default JPEG generation quality
|
||
'enable_typo3temp_db_tracking' => 0, // Boolean. If set, then all files in typo3temp will be logged in a database table. In addition to being a log of the files with original filenames, it also serves to secure that the same image is not rendered simultaneously by two different processes.
|
||
'TTFLocaleConv' => '', // String. Enter locale conversion string used to recode input to TrueType functions. Eg. 'cp1250..UTF-8'. Deprecated from ver. 3.6.0 of TYPO3. Set up [BE][forceCharset] as strings are automatically converted from database charset to UTF-8.
|
t3lib/class.t3lib_div.php (Arbeitskopie) | ||
---|---|---|
$path .= (($command=='composite') ? $combineScript : $command).$isExt;
|
||
}
|
||
// strip profile information for thumbnails and reduce their size
|
||
if ($gfxConf['im_useStripProfileByDefault'] && $gfxConf['im_stripProfileCommand'] != '') {
|
||
if (strpos($parameters, $gfxConf['im_stripProfileCommand']) === false) {
|
||
// Determine whether the strip profile action has be disabled by TypoScript:
|
||
if ($parameters !== '' && $parameters !== '-version' && strpos($parameters, '###SkipStripProfile###') === false) {
|
||
$parameters = $gfxConf['im_stripProfileCommand'] . ' ' . $parameters;
|
||
} else {
|
||
$parameters = str_replace('###SkipStripProfile###', '', $parameters);
|
||
}
|
||
}
|
||
}
|
||
$cmdLine = $path.' '.$parameters;
|
||
if($command=='composite' && $switchCompositeParameters) { // Because of some weird incompatibilities between ImageMagick 4 and 6 (plus GraphicsMagick), it is needed to change the parameters order under some preconditions
|
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
// Scaling: ****
|
||
$tempScale=array();
|
||
$command = '-geometry '.$tempFileInfo[0].'x'.$tempFileInfo[1].'!';
|
||
$command = $this->modifyImageMagickStripProfileParameters($command, $fileArray);
|
||
$tmpStr = $gifCreator->randomName();
|
||
// m_mask
|
||
... | ... | |
}
|
||
$GLOBALS['TSFE']->tmpl->fileCache[$hash]= $gifCreator->getImageDimensions($dest);
|
||
} else { // Normal situation:
|
||
$fileArray['params'] = $this->modifyImageMagickStripProfileParameters($fileArray['params'], $fileArray);
|
||
$GLOBALS['TSFE']->tmpl->fileCache[$hash]= $gifCreator->imageMagickConvert($theImage,$fileArray['ext'],$fileArray['width'],$fileArray['height'],$fileArray['params'],$fileArray['frame'],$options);
|
||
if (($fileArray['reduceColors'] || ($imgExt=='png' && !$gifCreator->png_truecolor)) && is_file($GLOBALS['TSFE']->tmpl->fileCache[$hash][3])) {
|
||
$reduced = $gifCreator->IMreduceColors($GLOBALS['TSFE']->tmpl->fileCache[$hash][3], t3lib_div::intInRange($fileArray['reduceColors'], 256, $gifCreator->truecolorColors, 256));
|
||
... | ... | |
}
|
||
}
|
||
/**
|
||
* Modifies the parameters for ImageMagick for stripping of profile information.
|
||
*
|
||
* @param string $parameters: The parameters to be modified (if required)
|
||
* @param array $configuration: The TypoScript configuration of [IMAGE].file
|
||
* @param string The modified parameters
|
||
*/
|
||
protected function modifyImageMagickStripProfileParameters($parameters, array $configuration) {
|
||
// Strips profile information of image to save some space:
|
||
if (isset($configuration['stripProfile'])) {
|
||
if ($configuration['stripProfile']) {
|
||
$parameters = $gfxConf['im_stripProfileCommand'] . $parameters;
|
||
} else {
|
||
$parameters.= '###SkipStripProfile###';
|
||
}
|
||
}
|
||
return $parameters;
|
||
}
|
||
... | ... | |
/***********************************************
|
||
*
|
||
* Data retrieval etc.
|