Author Topic: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags  (Read 14534 times)

0 Members and 1 Guest are viewing this topic.

Offline chrisgrainger

  • Contributor
  • ***
  • Posts: 122
    • Top of The Rideau
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #25 on: February 16, 2016, 02:53:38 PM »
Glad you got it to work for you, Johnny.

Cheers!

Chris

Offline kokos1405

  • Member
  • *
  • Posts: 20
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #26 on: March 16, 2016, 04:21:47 AM »
Nice script. Works ok.

Two things i want to add but i do not know how.

1.Is it possible to add a logo to the image?

2. I do not use php tags. I have an htm file like here: http://meteotimb.eu/cam/ZWNTANA.htm
Can i use this to display weather conditions on image?
I have edited the file like this:

include_once '../ZWNTANA.htm';   [Also tried: include_once ('../ZWNTANA.htm');] with no result.
$text1 = '$outsideTemp $dailyRain $windSpeed $windDirection';

but i only see the text : $outsideTemp $dailyRain $windSpeed $windDirection and not the measurements.
What am i doing wrong?

« Last Edit: March 16, 2016, 05:49:55 AM by kokos1405 »

Offline chrisgrainger

  • Contributor
  • ***
  • Posts: 122
    • Top of The Rideau
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #27 on: March 16, 2016, 08:24:52 AM »

1.Is it possible to add a logo to the image?

Anything is possible.  This script is designed to overlay text on an image (and a bunch of other image manipulation stuff) but I can't see any section where it allows an overlay of another image.  Perhaps you could look to other software to add that logo before you send the image to this script?

Quote

2. I do not use php tags. I have an htm file like here: http://meteotimb.eu/cam/ZWNTANA.htm
Can i use this to display weather conditions on image?
I have edited the file like this:

include_once '../ZWNTANA.htm';   [Also tried: include_once ('../ZWNTANA.htm');] with no result.
$text1 = '$outsideTemp $dailyRain $windSpeed $windDirection';

but i only see the text : $outsideTemp $dailyRain $windSpeed $windDirection and not the measurements.
What am i doing wrong?

The php file that is included at the top of this script (in my case, MBtags.php and by association MB-defs.php) does the work of converting raw weather data into an array of variables that the script uses to overlay the measurements on the image.   I see that you are using the Leuven template on your site and MeteoHub.  I'm pretty sure that if you dive into the .PHP files that are used in that template set, you'll find one that generates an array of variables containing the measurement data.  If you can't, Wim, the author of the template, is really great at answering questions and will probably be the best person to help you out.

Good luck!

Chris

Offline kokos1405

  • Member
  • *
  • Posts: 20
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #28 on: March 16, 2016, 08:33:35 AM »
Thanks!

Problem 2 solved.

I hope there is a solution to add at this script the logo, cause there is one script running to rename the hikvision camera. One other script to text overlay ... so a third script for one image is too much i believe  :shock:

I hope there is a way to implement it.

Offline johnny

  • Senior Member
  • **
  • Posts: 64
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #29 on: September 17, 2016, 12:08:38 PM »
Hi guys,
I have a little problem and i ask for your help.
If you have a look at my camera, the overlay text says that the max. wind gust is 4.5 km/h, but, according to the station data, the max. speed is 16.2 km/h.
http://www.lefkas-weather.com/platistoma-cached.jpg
http://www.lefkas-weather.com/indexDesktop.php
The overlay text is produced by Mchallis script.
It seems that the function $maxgst gives wrong value...
What's wrong with it?

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #30 on: September 17, 2016, 12:13:32 PM »
Hi Johnny,
the data is taken from the MB test tags directly, so the problem cannot be in the image script itself, but rather in the parameter sent by MB to your test tags. My guess is that maybe you are sending wind average instead of the maximum wind gust. Can you also post the script used for this (the test tags)


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #32 on: September 17, 2016, 12:44:20 PM »
For some reason I cant open that file, it gives me an error while trying to extract it. Change the extension to .txt and attach it directly.

Offline johnny

  • Senior Member
  • **
  • Posts: 64
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #33 on: September 17, 2016, 12:59:38 PM »
For some reason I cant open that file, it gives me an error while trying to extract it. Change the extension to .txt and attach it directly.

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: New Script: Text Overlay Web Cam Image from PHP Weather-Display tags
« Reply #34 on: January 05, 2021, 06:34:40 PM »
Hi guys,
does anyone try with https images?
https://meteopistoia.it/webcam/pistoia.jpg

Result: https://meteopistoia.it/pistoia-webcam.php

Any ideas?
Thanks in advance,


Alessandro


 

anything