OK ...rp4111 wrote:I'm lost on the "imagecreatetruecolor(" for the banner. It looks like to me I have to input color codes into the code? ..
The code shown in the other thread is a cut 'n' paste replacement for the similar existing part in the 'standard' banner code. BUT remember to edit the bits as stated that relate to your background image.
You should already have some 'color' allocations - These are (almost) nothing to do with pictures !
Having created the truecolor (or otherwise) blank canvass, you then define the background colour (whether it is used or not).
Then you define colours you want to 'paint' with - eg. text / data
Here is part of my declarations for my customised banner:
Code: Select all
// Set colors we want to use...
$background_color = imagecolorallocate($im, 0x00, 0x00, 0x00); // Black
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$green = imagecolorallocate($im, 0x00, 0xff, 0x00);
$blue = imagecolorallocate($im, 122, 208, 248);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
$turq = imagecolorallocate($im,100,250,250); // TURQ
$yellow = imagecolorallocate($im,255,255,0); // YELLOW
You can name a colour whatever you want ! - eg. $mywhitetitlecolor = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
The numbers maybe decimal or hexadecimal and relate to the Red / Green / Blue components of the colour.
More information here: http://us.php.net/imagecolorallocate
So if you wanted to replace ALL the red text in your banner with eg. yellow, the cheats way of doing it would be to define $red with the values for yellow ! - this saves having to search through the code looking for and replacing $red with your new variable name. eg. $yellow.
Here is typical part of the code using a defined 'color': imageWriteString($im, $size, $text, $green, "right", 1);
Has that lightened your darkness