WXforum.net
Weather Software => Cumulus => Topic started by: Jan73 on December 03, 2015, 12:16:40 PM
-
I like to put a picture in the background of my
Cumulus Weather Banner
banner.php
Vers. 3.0 (Project of TNET Services Inc)
The banner script at this point looks like... about on line 200:
// Output the header to let the browser know we are
// sending a graphic file format
header("Content-type: image/" . $SITE['format'] );
$im= @imagecreate($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
My photo is located under cumuluswx/images/banpic.jpg
and the banner has the same size 468x60 as the photo.
How do I write the script in the above code stream.
My expertise iis in this case very limited.
Thank you
Jan
-
Hi Jan,
I also use this banner script from TNET, version 3.
I suggest you insert your background jpg picture in the same directory as the php script, ie image.jpg
This image must have the same size as the banner.
And then you only have to insert the name of your background jpg picture in line 208.
208 $baseimg = imagecreatefromjpeg("image.jpg");
Regards
Marcel
-
@ m st brevin.... J'aime bien ton site web mon cher...tres bien realisé =D>
-
Deja vu :)
I replied to your previous post on this subject…
http://www.wxforum.net/index.php?topic=28019.msg270864#msg270864
-
@ virusdunil Merci pour le compliment.
Ton site est très complet aussi avec une combinaison originale de 2 templates. =D>
-
I also would like to put an image in the background but this is something I have never done. Maybe I have a much older version of the TNET banner.php as mine has:
// Output the header to let the browser know we are
// sending a graphic file format
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreate($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
// Set colors we want to use...
// first background is a white background
$background_color = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$green = imagecolorallocate($im, 0x00, 0x80, 0x00);
$blue = imagecolorallocate($im, 0x00, 0x00, 0xff);
$red = imagecolorallocate($im, 0xff, 0x00, 0x00);
What and were would I put my image info?
Thanks,
Paul
-
C'est un test que je fasais et...ca a fini que c'est rester hehehe
-
Hi Paul,
In version 3, the line for the background image is just below the colors settings
// Output the header to let the browser know we are
// sending a graphic file format
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreatetruecolor($SITE['image_width'], $SITE['image_height'])
or die("Cannot Initialize new GD image stream");
// Set colors we want to use...
// first background is a white background
$background_color = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x40, 0x40, 0x40);
$green = imagecolorallocate($im, 0x00, 0xdd, 0x00);
$blue = imagecolorallocate($im, 0x00, 0xdd, 0xff);
$red = imagecolorallocate($im, 0xee, 0x88, 0x55);
$orange = imagecolorallocate($im, 0xff, 0xD7, 0x00);
$white = imagecolorallocate($im, 0xff, 0xff, 0xff);
$yellow = imagecolorallocate($im, 0xff, 0xf7, 0x00);
$violet = imagecolorallocate($im, 0x88, 0x00, 0xff);
$grey = imagecolorallocate($im, 0xe2, 0xe2, 0xe2);
// The line below is for the background image, which must be placed in the same directory as the banner.php script
$baseimg = imagecreatefromjpeg("image.jpg");
imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
imagedestroy($baseimg);
// Make a Border Around the box
Regards
Marcel
-
Thanks very much Marcel. That was easy once I understood #-o Now to work on the text colour...
Enjoying,
Paul
-
Hi
Now the Banner Background Photo is ok but I have to work on the text because it is low-readable (see remarks).
Can´t change letter colours any more. No effect. Have I to do something with the previous background colour?
I still have it in the script.
- One thing more.
I´m not using ttf-fonts but like to. The `usettf` setting is "no"
Where to get a suitable ttf font file? How does it look? My fonts.html file is empty.
Br,
Jan
Remarks: http://www.jel.one/cumuluswx/banner0pic.php