Witam, pisze sobie generator emotek, i podczas nakladania GIFa na płótno,
w gotowym obrazku jaki mi GD oddaje GIF sie nie rusza...
Jak to można naprawić?
<?php
function text2image($mytext, $imheight = 22)
{
{
Header("Content-type: image/Gif");
$imwidth = (strlen($mytext) * 6
) + 10; $half = ($imwidth / 2) - 2;
$im = @ImageCreate
($imwidth, 60
) or
die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 0, 0, 0);
$count = 6;
$patykg = imagecreatefrompng("patykg.png");
imagecopy($im, $patykg, $half, 0, 0, 0, 5, 5);
while(list
($k, $mytext) = each($returns)) {
$count = $count;
$insert_text = substr($mytext, 0
); ImageString ($im, 2, 6, $count, $insert_text, $text_color);
imagerectangle ($im, 2, 5, $imwidth - 2, $imheight - 2, $text_color);
$count = $count + 13;
}
$patykd = imagecreatefrompng("patykd.png");
imagecopy($im, $patykd, $half, $imheight - 1, 0, 0, 5, $imheight - 3);
$emot = imagecreatefromgif("bye.gif");
imagecopy($im, $emot, $half + 5, $imheight, 0, 0, 26, 18);
ImageGif($im);
ImageDestroy($im);
}
}
text2image($_POST['txt']);
?>
gotowa do odpalenia paczka
http://widmo.biz/tmp/emot_gen.rar