Author Topic: WX Banner - missing Background Photo  (Read 1547 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan73

  • Member
  • *
  • Posts: 6
  • WX Ham Radio
    • Ham Radio Weather
WX Banner - missing Background Photo
« on: November 29, 2015, 11:59:38 AM »
How to put a background picture to my WX Banner?
I tried many ways but then the PHP program stopped working.
My Banner size is 468 x 60 and the picture (jpg) is the same.

73 de Jan

Weather Station Aercus WS3083
Cumulus v1.9.4 #1094


Offline gluepack

  • Contributor
  • ***
  • Posts: 101
    • Jerbils' Weather Site
Re: WX Banner - missing Background Photo
« Reply #1 on: November 29, 2015, 01:42:29 PM »
You have the following, after the last of the base color definitions, around line 200?…

Code: [Select]
$baseimg = imagecreatefromjpeg("xxxxx.jpg");
   imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);
   imagedestroy($baseimg);

…where xxxxx.jpg is the image, with upper/lower case correct and either appropriate relative location or fully defined location of the image?

Offline Jan73

  • Member
  • *
  • Posts: 6
  • WX Ham Radio
    • Ham Radio Weather
Re: WX Banner - missing Background Photo
« Reply #2 on: December 04, 2015, 05:29:59 AM »
Hi again...
Thanks a lot for your try to help me.
As you noticed I´m still trying to get my image working with the banner.
Your info and also some from others I only get errors. I might not notice anything.

"Warning: imagecopy() expects parameter 1 to be resource, null given in /customers/4/8/6/jel.one/httpd.www/cumuluswx/banner0x.php on line 197"
The image "banpic.jpg" is relative located in the same file as "banner0x.php".  Shall I also replace 0,0,0,0, with other number series?
Can you please write the lines needed completely for me.
SCRIPT BEFORE
header("Content-type: image/" . $SITE['format'] );
$im = @imagecreate($SITE['image_width'], $SITE['image_height'])
 or die("Cannot Initialize new GD image stream");
TRIED
// $baseimg = imagecreatefromjpeg("banpic.jpg");
//    imagecopy($im,$baseimg,0,0,0,0,$SITE['image_width'], $SITE['image_height']);     >>>This is LINE 197
//    imagedestroy($baseimg);
   

Br, Jan

Offline Jan73

  • Member
  • *
  • Posts: 6
  • WX Ham Radio
    • Ham Radio Weather
Re: WX Banner - missing Background Photo
« Reply #3 on: December 04, 2015, 08:04:14 AM »
Hello.  NOW I HAVE IT.

After a coffee break I did it.
All info was OK that you sent me.
I did the mistake that I removed four previous lines and replaced them with yours.

MANY THANKS.
Hope to meet you here on WXForum or direct.
I send you my image banner when I learn how to transfer it to this page. Hi

You are welcome to check my Home Page.

http://www.qsl.net/
http://www.jel.one/cumuluswx/index.htm
http://www.jel.one/cumuluswx/gauges-ss.htm

Best regards.

Jan




 

 

anything