Jump to content

Dynamic Image Question


Patriot

Recommended Posts

The following works fine if I go to that php page, but I was wondering how I can go to an image file and see that, such as banner.png

==============================================================

<?php

/*

Now for the GD stuff, for ease of use lets create

the image from a background image.

*/

 

$banner = imagecreatefrompng("sigbackground.png");

 

/*

Lets set the colours, the colour $line is used to generate lines.

Using a blue misty colours. The colour codes are in RGB

*/

 

$goal = $_GET['g'];

$black = imagecolorallocate($banner, 0, 0, 0);

 

imagestring($banner, 5, 20, 10, "Current Freebie Goal: " . $goal, $black);

imagestring($banner, 5, 20, 20, "sup", $black);

 

/*

Output the image

*/

header("Content-type: image/png");

imagepng($banner);

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.