Add text to gif images

Write name on Ramadan lantern

[insert_php]
include ‘text.php’;
include ‘ads1.php’;
include ‘giffile.php’;

$image = imagecreatefrompng(‘template-gif/ramadan_lantern_1.png’);
imagealphablending($image, false);
imagesavealpha($image, true);
$facebook_white = imagecolorallocate($image, 255, 0, 0); // Create blue color
imagealphablending($image, true); //bring back alpha blending for transperent font
imagettftext($image, 35, 0, 280,270, $facebook_white , $font2, $tx1);
ob_start();
imagegif($image);
$frames[]=ob_get_contents();
$framed[]=15; // Delay in the animation.
ob_end_clean();

$image = imagecreatefrompng(‘template-gif/ramadan_lantern_2.png’);
imagealphablending($image, false);
imagesavealpha($image, true);
$facebook_white = imagecolorallocate($image, 255, 0, 0); // Create blue color
imagealphablending($image, true); //bring back alpha blending for transperent font
imagettftext($image, 35, 0, 280,270, $facebook_white , $font2, $tx1);
ob_start();
imagegif($image);
$frames[]=ob_get_contents();
$framed[]=15; // Delay in the animation.
ob_end_clean();

$image = imagecreatefrompng(‘template-gif/ramadan_lantern_3.png’);
imagealphablending($image, false);
imagesavealpha($image, true);
$facebook_white = imagecolorallocate($image, 255, 0, 0); // Create blue color
imagealphablending($image, true); //bring back alpha blending for transperent font
imagettftext($image, 35, 0, 280,270, $facebook_white , $font2, $tx1);
ob_start();
imagegif($image);
$frames[]=ob_get_contents();
$framed[]=15; // Delay in the animation.
ob_end_clean();

$image = imagecreatefrompng(‘template-gif/ramadan_lantern_4.png’);
imagealphablending($image, false);
imagesavealpha($image, true);
$facebook_white = imagecolorallocate($image, 255, 0, 0); // Create blue color
imagealphablending($image, true); //bring back alpha blending for transperent font
imagettftext($image, 35, 0, 280,270, $facebook_white , $font2, $tx1);
ob_start();
imagegif($image);
$frames[]=ob_get_contents();
$framed[]=15; // Delay in the animation.
ob_end_clean();

$image = imagecreatefrompng(‘template-gif/ramadan_lantern_5.png’);
imagealphablending($image, false);
imagesavealpha($image, true);
$facebook_white = imagecolorallocate($image, 255, 0, 0); // Create blue color
imagealphablending($image, true); //bring back alpha blending for transperent font
imagettftext($image, 35, 0, 280,270, $facebook_white , $font2, $tx1);
ob_start();
imagegif($image);
$frames[]=ob_get_contents();
$framed[]=15; // Delay in the animation.
ob_end_clean();

$gif = new GIFEncoder($frames,$framed,0,2,0,0,0,’bin’);
$fp = fopen( “giftmp/$fn.gif”, ‘w’ );
fwrite($fp, $gif->GetAnimation());
fclose($fp);
imagedestroy($image);
[/insert_php]




[insert_php]
include ‘1name.php’ ;
include ‘gifvip.php’ ;
[/insert_php]

Back to top button