Project

General

Profile

Bug #16545 » t3lib_stdgraphic.diff

Administrator Admin, 2006-09-15 08:45

View differences:

class.t3lib_stdgraphic.php 2006-09-15 08:44:48.000000000 +0200
if ($this->dontCheckForExistingTempFile || !$this->file_exists_typo3temp_file($output, $imagefile)) {
$crsOutput = str_replace('pics/', 'pics/crs-', $output);
$this->imageMagickExec($imagefile.$frame, $crsOutput, $command);
$gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');
$gifCreator->init();
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] !== 0) {
if (!$data['origW']) { $data['origW'] = $data[0]; }
if (!$data['origH']) { $data['origH'] = $data[1]; }
$ofX = intval(($data['origW'] - $data[0]) * ($data['cropH']+100)/200);
$ofY = intval(($data['origH'] - $data[1]) * ($data['cropV']+100)/200);
$tmpParm = Array('XY' => intval($data['origW']).','.intval($data['origH']),
'10' => 'IMAGE',
'10.' => array('file'=> $crsOutput, 'offset'=> $ofX.','.$ofY),
);
$gifCreator->start($tmpParm, array());
$newoutput = $gifCreator->gifBuild();
if (!copy($newoutput,$output)) {
$output = $newoutput;
}
} else {
$output = $crsOutput;
}
if (!$data['origW']) $data['origW'] = $data[0];
if (!$data['origH']) $data['origH'] = $data[1];
$ofX = intval(($info[0] - $data['origW']) / 2 * (($data['cropH'] + 100) / 200));
$ofY = intval(($info[1] - $data['origH']) / 2 * (($data['cropV'] + 100) / 200));
$command = '-crop ' . $data['origW'] . 'x' . $data['origH'] . '+' . $ofX . '+' . $ofY;
$this->imageMagickExec($crsOutput, $output, $command);
}
} elseif ($this->dontCheckForExistingTempFile || !$this->file_exists_typo3temp_file($output,$imagefile)) {
$this->imageMagickExec($imagefile.$frame,$output,$command);
(1-1/7)