I found the function and installed it. But now I find I don't know how to handle it.
Code: Select all
<?php
require "Systools\class.gradient_image.php";
$fade_from = "#000000"; // Start colour in hex
$fade_to = "#0000FF"; // Stop colour inhex
$steps = 32; // Number of gradient steps
$width = 320; // Image Width
$height = 240; // Image height
$gradient = new gradient_image($fade_from, $fade_to, $steps, $width, $height);
$im = $gradient->createImage(true);
$gradient->createPNG($im, true);
?>
This is the code that creates the image. My limited php knowledge assumes that the variable
$im will contain the image, but when I type the following code in my page
Code: Select all
<img src="<?php $gradient->createPNG($im,true);?>">
I see in IE the MissingImage icon, and in FF I need to revert to the source to find the followng error:
Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\....\Wrapper02.php:6) in C:\Documents and Settings\....\Systools\class.gradient_image.php on line 149
I also tried
<img src="<?php $im;?>"> but that doesn't help either.
The downloaded stuff also contain an example calle
image.php: when I run that in my browser, a beautifull gradient image is shown. So the class that calculates the image, is working fine: it is my way of addressing / using it.
So basically I have the next two questions:
- How do I refer to the created image in my html?
- What do I have to change to stop getting errors about header information?