I would like to have a php function that can take text as the input and generate a nice logo (image) with that text. It would be nice to开发者_开发技巧 have a flexibility in the style of the logo (color, shadow, shape, size and so on). Can anybody recommend something?
I just know the ASCII Generator, but maybe theres a PHP version somewhere.
My suggestion would be to use CSS+HTML to style the text and then generate an image from that using wkHTMLToImage, which is part of the wkHTMLtoPDF project - http://code.google.com/p/wkhtmltopdf/
you want something like this?, http://trevorrudolph.com/image.php heres the code
<?php
$my_img = imagecreate( 400, 200 );
$background = imagecolorallocate( $my_img, 0, 0, 255 );
$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
imagestring( $my_img, 4, 30, 25, "http://trevorrudolph.com",
$text_colour );
imagesetthickness ( $my_img, 5 );
imageline( $my_img, 30, 45, 165, 45, $line_colour );
header( "Content-type: image/png" );
imagepng( $my_img );
imagecolordeallocate( $line_color );
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>
You may need another php code for generating that.
Here is how to Convert Text To Image
精彩评论