Reply to Gd library: combine text and images

Your name:

Reply:


Posted by Martien van Wanrooij on 09/18/05 21:03

Hi all,

Maybe I just didn't enter the right words in google but I am trying to find
out if a image created with the gd library can be sent together to the
client with text based content as one page.
The sample code below shows the image but not the text, probably because of
the header parameters.
<?php
/* this code seems to be compulsory for the image but obviously it also
suppresses all the text I want to send */
header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
/* the text below doesn't appear */
echo "kijken of er ook tekst op kan";
?>
Thanks for any suggestions (which also can be a reference to a webpage that
gives more explanations)

Martien

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация