Bug #14537 » class.t3lib_stdgraphic.php-t3_380b1-truecolor.patch
class.t3lib_stdgraphic.php 2005-04-07 15:44:03.552021800 +0200 | ||
---|---|---|
$theMask2 = $tmpStr.'_mask2.'.trim($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_mask_temp_ext_noloss']);
|
||
// prepare overlay image
|
||
$cpImg = $this->imageCreateFromFile($BBimage[3]);
|
||
$destImg = imagecreate($w,$h);
|
||
if ($this->GD2)
|
||
$destImg = imagecreatetruecolor($w,$h);
|
||
else
|
||
$destImg = imagecreate($w,$h);
|
||
ImageColorAllocate($destImg, 0,0,0);
|
||
$this->copyGifOntoGif($destImg,$cpImg,$conf,$workArea);
|
||
$this->ImageGif($destImg, $theImage);
|
||
... | ... | |
imageDestroy($destImg);
|
||
// prepare mask image
|
||
$cpImg = $this->imageCreateFromFile($BBmask[3]);
|
||
$destImg = imagecreate($w,$h);
|
||
if ($this->GD2)
|
||
$destImg = imagecreatetruecolor($w,$h);
|
||
else
|
||
$destImg = imagecreate($w,$h);
|
||
ImageColorAllocate($destImg, 0,0,0);
|
||
$this->copyGifOntoGif($destImg,$cpImg,$conf,$workArea);
|
||
$this->ImageGif($destImg, $theMask);
|
||
... | ... | |
$newH = ceil($sF*imagesy($im));
|
||
// Make mask
|
||
$maskImg = imagecreate($newW, $newH);
|
||
if ($this->GD2)
|
||
$maskImg = imagecreatetruecolor($newW, $newH);
|
||
else
|
||
$maskImg = imagecreate($newW, $newH);
|
||
ImageColorAllocate($maskImg, 255,255,255);
|
||
$Fcolor = ImageColorAllocate($maskImg, 0,0,0);
|
||
if ($spacing || $wordSpacing) { // If any kind of spacing applys, we use this function:
|
||
... | ... | |
$this->imageMagickExec($fileMask,$fileMask,$command);
|
||
// Make the color-file
|
||
$colorImg = imagecreate($w,$h);
|
||
if ($this->GD2)
|
||
$colorImg = imagecreatetruecolor($w,$h);
|
||
else
|
||
$colorImg = imagecreate($w,$h);
|
||
ImageColorAllocate($colorImg, $cols[0],$cols[1],$cols[2]);
|
||
$this->ImageGif($colorImg, $fileColor);
|
||
ImageDestroy($colorImg);
|
||
... | ... | |
$fileMask = $tmpStr.'_mask.'.$this->gifExtension;
|
||
// BlurColor Image laves
|
||
$blurColImg = imagecreate($w,$h);
|
||
if ($this->GD2)
|
||
$blurColImg = imagecreatetruecolor($w,$h);
|
||
else
|
||
$blurColImg = imagecreate($w,$h);
|
||
$bcols=$this->convertColor($conf['color']);
|
||
ImageColorAllocate($blurColImg, $bcols[0],$bcols[1],$bcols[2]);
|
||
$this->ImageGif($blurColImg, $fileColor);
|
||
ImageDestroy($blurColImg);
|
||
// The mask is made: BlurTextImage
|
||
$blurTextImg = imagecreate($w+$blurBorder*2,$h+$blurBorder*2);
|
||
if ($this->GD2)
|
||
$blurTextImg = imagecreatetruecolor($w+$blurBorder*2,$h+$blurBorder*2);
|
||
else
|
||
$blurTextImg = imagecreate($w+$blurBorder*2,$h+$blurBorder*2);
|
||
ImageColorAllocate($blurTextImg, 0,0,0); // black background
|
||
$txtConf['fontColor'] = 'white';
|
||
$blurBordArr = Array($blurBorder,$blurBorder);
|
||
... | ... | |
if ($blurTextImg_tmp) { // if nothing went wrong we continue with the blurred mask
|
||
// cropping the border from the mask
|
||
$blurTextImg = imagecreate($w,$h);
|
||
if ($this->GD2)
|
||
$blurTextImg = imagecreatetruecolor($w,$h);
|
||
else
|
||
$blurTextImg = imagecreate($w,$h);
|
||
$this->imagecopyresized($blurTextImg, $blurTextImg_tmp, 0, 0, $blurBorder, $blurBorder, $w, $h, $w, $h);
|
||
ImageDestroy($blurTextImg_tmp); // Destroy the temporary mask
|
||
... | ... | |
$commands.=' -flop';
|
||
break;
|
||
case 'colors':
|
||
$commands.=' -colors '.t3lib_div::intInRange($value,2,255);
|
||
$commands.=' -colors '.t3lib_div::intInRange($value,2,65535);
|
||
break;
|
||
case 'shear':
|
||
$commands.=' -shear '.t3lib_div::intInRange($value,-90,90);
|
||
... | ... | |
$conf['offset']=$cords[0].','.$cords[1];
|
||
$cords = $this->objPosition($conf,$this->workArea,Array($cords[2],$cords[3]));
|
||
$newIm = imagecreate($cords[2],$cords[3]);
|
||
if ($this->GD2)
|
||
$newIm = imagecreatetruecolor($cords[2],$cords[3]);
|
||
else
|
||
$newIm = imagecreate($cords[2],$cords[3]);
|
||
$cols=$this->convertColor($conf['backColor']?$conf['backColor']:$this->setup['backColor']);
|
||
ImageColorAllocate($newIm, $cols[0],$cols[1],$cols[2]);
|
||