|
|
|
|
![]() ![]() |
Jun 23 2005, 01:09 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 310 Joined: 9-February 05 From: Italian Member No.: 3,677 |
How can i create images (using php) of 128x128 by giving some types of background... and users can write text on the background...
QUOTE you can take example from the followinbg site:
http://zedge.no/?side=navnelogo |
|
|
|
Jun 23 2005, 04:15 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 463 Joined: 8-November 04 Member No.: 2,186 |
I would just do the thing in flash, seems tons easier than doing it php.
round |
|
|
|
Jun 23 2005, 08:15 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 293 Joined: 14-August 04 Member No.: 808 |
not everyone is good at flash as you are
first you would need to know php then you can use gd to make images with php i have a script that does something like that ill post it if i can find it |
|
|
|
Jun 24 2005, 11:09 AM
Post
#4
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 27 Joined: 22-June 05 Member No.: 8,557 |
QUOTE(Raptrex @ Jun 23 2005, 10:15 PM) then you can use gd to make images with php Just make sure that GD-support is enabled in the PHP you're using (it usually is, but you can always try a call to phpinfo()). Here's a small example that does what the OP is asking for: CODE <?php if (isset($_REQUEST['img'])) { header("Content-type: image/png"); $image = imageCreateFromPng("background.png"); $black = imageColorAllocate($image, 0, 0, 0); imageString($image, 5, 10, 10, $_REQUEST['img'], $black); imagePng($image); imageDestroy($image); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Add text to image</title> </head> <body> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Text: <input name="text" type="text" value="<?=$_REQUEST['text']?>"> <input type="submit" value="OK"> </form> <br> <img src="<?=$_SERVER['PHP_SELF']?>?img=<?=$_REQUEST['text']?>"> </body> </html> save the above somewhere your webserver can find it and place a png image called background.png in the same directory. For more information and examples check http://php.net/manual/en/ref.image.php |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 6th September 2008 - 05:23 PM |