animation - PHP imagecreatefromgif animated + color -
i'm trying create image php.
with png works pretty (the font colors works!).
but if i'm using gif, fonts dont colors (always white).
and gif image use background not animated!
this how works in png (font color):
<?php $zeile1 = @file_get_contents('zeile1.txt'); $zeile1_title = @file_get_contents('zeile1_title.txt'); $image = imagecreatefrompng("bg_text.png"); imagesavealpha($image, true); imagealphablending($image, true); $finalimage = imagecreatetruecolor(391,300); $font = '../banner1/arial.ttf'; $color = imagecolorallocate($finalimage, 0, 0, 0); $font_title = '../banner1/arialbd.ttf'; $color_title = imagecolorallocate($finalimage, 255, 0, 126); imagettftext($image, 15, 0, 2, 130, $color, $font, $zeile1); imagettftext($image, 25, 0, 2, 130, $color_title, $font_title, $zeile1_title); header('content-type: image/png'); imagepng($image); ?>
but want animated gif background:
<?php $zeile1 = @file_get_contents('zeile1.txt'); $zeile1_title = @file_get_contents('zeile1_title.txt'); $image = imagecreatefromgif("bg_text.gif"); imagesavealpha($image, true); imagealphablending($image, true); $finalimage = imagecreatetruecolor(391,300); $font = '../banner1/arial.ttf'; $color = imagecolorallocate($finalimage, 0, 0, 0); $font_title = '../banner1/arialbd.ttf'; $color_title = imagecolorallocate($finalimage, 255, 0, 126); imagettftext($image, 15, 0, 2, 130, $color, $font, $zeile1); imagettftext($image, 25, 0, 2, 130, $color_title, $font_title, $zeile1_title); header('content-type: image/gif'); imagegif($image); ?>
now text white , title text, not showing + image not animated.
i hope understand mean, because english bad :/
Comments
Post a Comment