Bug #16545 » class.t3lib_stdgraphic.diff
class.t3lib_stdgraphic.php 2006-11-02 21:26:10.804855750 +0000 | ||
---|---|---|
$this->map.='<area'.
|
||
' shape="poly"'.
|
||
' coords="'.implode(',',$cords).'"'.
|
||
' href="'.htmlspecialchars($conf['url']).'"'.
|
||
($conf['target'] ? ' target="'.htmlspecialchars($conf['target']).'"' : '').
|
||
' coords="'.implode(',',$cords).'" '.
|
||
' href="'.htmlspecialchars($conf['url']).'" '.
|
||
($conf['target'] ? ' target="'.htmlspecialchars($conf['target']).'" ' : '').
|
||
$JS.
|
||
(strlen($conf['titleText']) ? ' title="'.htmlspecialchars($conf['titleText']).'"' : '').
|
||
(strlen($conf['titleText']) ? ' title="'.htmlspecialchars($conf['titleText']).'" ' : '').
|
||
' alt="'.htmlspecialchars($conf['altText']).'" />';
|
||
}
|
||
... | ... | |
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;
|
||
}
|
||
$command = '-crop '.
|
||
$data['0'].
|
||
'x'.$data['1'].
|
||
'+'.(intval(($data['0']-$data['origW'])/2)+round((intval(($data['0']-$data['origW'])/2)/100)*$data['cropH'])).
|
||
'+'.(intval(($data['1']-$data['origH'])/2)+round((intval(($data['1']-$data['origH'])/2)/100)*$data['cropV'])).
|
||
' '.$params;
|
||
$this->imageMagickExec($crsOutput, $crsOutput, $command);
|
||
$command = '-crop '.
|
||
($data['0']-intval(($data['0']-$data['origW'])/2)-round((intval(($data['0']-$data['origW'])/2)/100)*$data['cropH'])).
|
||
'x'.($data['1']-intval(($data['1']-$data['origH'])/2)-round((intval(($data['1']-$data['origH'])/2)/100)*$data['cropV'])).
|
||
'-'.(intval(($data['0']-$data['origW'])/2)-round((intval(($data['0']-$data['origW'])/2)/100)*$data['cropH'])).
|
||
'-'.(intval(($data['1']-$data['origH'])/2)-round((intval(($data['1']-$data['origH'])/2)/100)*$data['cropV'])).
|
||
' '.$params;
|
||
$this->imageMagickExec($crsOutput, $crsOutput, $command);
|
||
$output = $crsOutput;
|
||
}
|
||
} elseif ($this->dontCheckForExistingTempFile || !$this->file_exists_typo3temp_file($output,$imagefile)) {
|
||
$this->imageMagickExec($imagefile.$frame,$output,$command);
|