Jump to content
xisto Community
alexia

How To Create Images?

Recommended Posts

not everyone is good at flash as you arefirst you would need to know php then you can use gd to make images with phpi have a script that does something like thatill post it if i can find it

Share this post


Link to post
Share on other sites

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:

 

<?phpif (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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.