Project

General

Profile

Bug #17775 ยป iconRendering__gdlib_png__onAndOff.diff

Administrator Admin, 2007-11-12 14:20

View differences:

t3lib/class.t3lib_iconworks.php (working copy)
* @access private
*/
function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h) {
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_2'] && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) { // Maybe I'll have to change this if GD2/gif does not work either...
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']) {
$tempBaseName = PATH_site.'typo3temp/ICRZ_'.md5(uniqid('.'));
ImagePng($im, $tempBaseName.'_im.png');
ImagePng($cpImg, $tempBaseName.'_cpImg.png');
$cmd = t3lib_div::imageMagickCommand('combine', '-compose over '.$tempBaseName.'_cpImg.png '.$tempBaseName.'_im.png '.$tempBaseName.'_out.png ');
exec($cmd);
$im = imagecreatefrompng($tempBaseName.'_out.png');
unlink($tempBaseName.'_im.png');
unlink($tempBaseName.'_cpImg.png');
unlink($tempBaseName.'_out.png');
}
} else {
imagecopyresized($im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h);
}
imagecopyresized($im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h);
}
/**
    (1-1/1)