Location: PHPKode > scripts > Texture Background Effect > texture-background-effect/fxtext.php
<?php
Header('Content-type: image/gif');
require('FXText.class.php');
require('GifMerge.class.php');
/*///////////////////////////////////////////////*/
set_time_limit(0);
/*///////////////////////////////////////////////*/
$bi = imageCreateFromGif("pattern.gif");
$fi = imageCreateFromGif("image.gif");
$bw = imageSX($bi);
$bh = imageSY($bi);
$fw = imageSX($fi);
$fh = imageSY($fi);
$fr = 20;
/*///////////////////////////////////////////////*/
$bg = imageCreateTrueColor($fw + $fr, $fh + $fr);
$wc = imageColorAllocate($bg, 255, 255, 255);
imageFill($bg, 0, 0, $wc);
/*///////////////////////////////////////////////*/
$fxtext = new FXText($fw, $fh, $bw, $bh, $fr, $bi, $bg, $fi);
for($i = 0; $i < $fr; $i++)
{
	$frames[$i] = $fxtext->CreateFrames($i);
	$framed[$i] = 10;
	$x[$i] = 0;
	$y[$i] = 0;
}
/*///////////////////////////////////////////////*/
imageDestroy($bg);
imageDestroy($fi);
imageDestroy($bi);
/*///////////////////////////////////////////////*/
$gf = new GifMerge($frames, 255, 255, 255, -10, $framed, $x, $y, 'C_MEMORY');
echo $gf->getAnimation();
?>
Return current item: Texture Background Effect