Here if will do some experiments in GIFBUILDER. I will show some simple example, experiments and tests. From font rendering to multi-transparancy test recently created by Kraft Bernhard from
Think Open.
GIFBUILDER (written with capitals) Is a system in
Typo3 that can create images on the fly. The name GIFBUILDER was originated from the fact that back in the old ages it could only create GIF images, nowdays it will also process and create PNG and JOG images on the fly.
One thing to know is where to find documentation for GIFBUILDER. I would suggest bookmark
TSREF now if you didn't so already.
GIFBUILDER can create images! You know, nowdays with this beautifull image manimulation programs the designers create the most challaging layouts which we need to put in a CMS.
For example, the header above this page is build with GIFBUILDER. Fully automaticly! When I change the text of the header of this article, GIFBUILDER builds a new image for me. No need for Photoshop, the Gimp etc for creatinmg the headers! Cool he?
Here is how the code looks like to generate the header above:
As prommised for Bernhard I was going to do some testing for multi-transparency tests in GIFBUILDER.
Typoscript Code I used for the default below.

Here only the black block is removed

Last but not least we remove the blue color and the cyan color in the middle of the blocks

I did do some code cleanup in the function unifyColors(...) found in the class t3lib_stdgraphic.
The option with two colors didn't work properly and I suspect there is a bug in Graphic Magic that doesn't reduce colors correctly on palette based images. I will not jump into detail, but below you can find the modified function. That will correct the two bugs.
/**
* Unifies all colors given in the colArr color array to the first color in the array.
*
* @param pointer Image resource
* @param array Array containing RGB color arrays
* @param [type] $closest: ...
* @return integer The index of the unified color
*/
function unifyColors(&$img, $colArr, $closest = false) {
$retCol = -1;
if (is_array($colArr) && count($colArr) && function_exists('imagepng') && function_exists('imagecreatefrompng')) {
$firstCol = array_shift($colArr);
$firstColArr = $this->convertColor($firstCol);
$firstCol = $this->hexColor($firstColArr);
if (count($colArr)>=1) {
$imgName = $this->randomName().'.png';
$this->imageWrite($img, $imgName);
foreach ($colArr as $transparentColor) {
$transparentColor = $this->convertColor($transparentColor);
$transparentColor = $this->hexColor($transparentColor);
$cmd = '-fill "'.$firstCol.'" -opaque "'.$transparentColor.'"';
$this->imageMagickExec($imgName, $imgName, $cmd);
}
if (@is_file($imgName)) {
// Accoring to the GM manual duplicated colors will be removed with -colors xxx seting
// However this does not happen. We first convert to TrueColor
// Then back to 256 colors, this will cleanup the palete for sure/
// R. van Twisk ries@vantwisk.nl
$this->imageMagickExec($imgName, $imgName, '-type TrueColor');
$this->imageMagickExec($imgName, $imgName, '-colors 256');
$tmpImg = $this->imageCreateFromFile($imgName);
}
} else {
$tmpImg = $img;
}
if ($tmpImg) {
$img = $tmpImg;
if ($closest) {
$retCol = ImageColorClosest ($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
} else {
$retCol = ImageColorExact ($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
}
}
// unlink files from process
if (!$this->dontUnlinkTempFiles) {
if ($imgName) {
@unlink($imgName);
}
}
}
return $retCol;
}