Project

General

Profile

Bug #21360 » 0012341_v4_4-3_trunk.patch

Administrator Admin, 2009-12-21 20:48

View differences:

t3lib/thumbs.php (working copy)
} else {
$colors = ($sizeMax>56)?'-colors 64':'-colors 16';
}
$parameters = '-sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input.'[0]').' '.$this->wrapFileName($this->output);
$parameters = '-sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input).'[0] '.$this->wrapFileName($this->output);
$cmd = t3lib_div::imageMagickCommand('convert', $parameters);
exec($cmd);
if (!file_exists($this->output)) {
t3lib/class.t3lib_stdgraphic.php (working copy)
$GLOBALS['TEMP_IMAGES_ON_PAGE'][] = $output;
if ($this->dontCheckForExistingTempFile || !$this->file_exists_typo3temp_file($output, $imagefile)) {
$this->imageMagickExec($imagefile.$frame, $output, $command);
$this->imageMagickExec($imagefile, $output, $command, $frame);
}
if (file_exists($output)) {
$info[3] = $output;
......
* @param string The relative (to PATH_site) image filepath, input file (read from)
* @param string The relative (to PATH_site) image filepath, output filename (written to)
* @param string ImageMagick parameters
* @param string Refers to which frame-number to select in the image. '' or 0 will select the first frame, 1 will select the next and so on...
* @return string The result of a call to PHP function "exec()"
*/
function imageMagickExec($input,$output,$params) {
function imageMagickExec($input,$output,$params,$frame = '') {
if (!$this->NO_IMAGE_MAGICK) {
$cmd = t3lib_div::imageMagickCommand('convert', $params.' '.$this->wrapFileName($input).' '.$this->wrapFileName($output));
$cmd = t3lib_div::imageMagickCommand('convert', $params.' '.$this->wrapFileName($input).$frame.' '.$this->wrapFileName($output));
$this->IM_commands[] = array($output,$cmd);
$ret = exec($cmd);
(5-5/5)