Any way to add a logo to the webcam image overlay?

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
User avatar
WessexWeather
Senior Boarder
Senior Boarder
Posts: 41
Joined: Sun Apr 17, 2016 9:54 am
Location: Wimborne, Dorset, UK
Contact:

Any way to add a logo to the webcam image overlay?

Post by WessexWeather »

Hi all,

I've created a neat weather data overlay for my webcam image: -

http://content.meteobridge.com/cam/ff27 ... 8238839228

There are two more things I would like to achieve...

1. Add a logo.
2. Make all or part of the image clickable to link to my website.

Are either of these things possible using Meteobridge and the 'Image Magick' type codes?

Thanks in advance,
Simon

Image

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 6631
Joined: Mon Oct 01, 2007 10:51 pm

Re: Any way to add a logo to the webcam image overlay?

Post by admin »

ad 1) In general imageMagick can work with overlay logos. Only thing I can't say is how to feed the logo picture into the upload. But when the logo can be created with ImageMagick drawing commands it will work for sure.

ad 2) Actions to trigger when someone clicks a picture is not defined inside the picture but defined by the embedding HTML code.

User avatar
WessexWeather
Senior Boarder
Senior Boarder
Posts: 41
Joined: Sun Apr 17, 2016 9:54 am
Location: Wimborne, Dorset, UK
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by WessexWeather »

Thanks for your reply.

I have successfully managed to add the logo using a script run from a cron job every minute. For anyone else interested the thread can be found here: -

http://www.wxforum.net/index.php?topic= ... icseen#new

Regards,
Simon

Image

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 6631
Joined: Mon Oct 01, 2007 10:51 pm

Re: Any way to add a logo to the webcam image overlay?

Post by admin »

Cool! Thanks for sharing, as this might also be helpfull for others!

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by jasonmfarrow »

WessexWeather wrote:
Tue Oct 17, 2017 1:17 pm
Hi all,

I've created a neat weather data overlay for my webcam image: -

http://content.meteobridge.com/cam/ff27 ... 8238839228

There are two more things I would like to achieve...

1. Add a logo.
2. Make all or part of the image clickable to link to my website.

Are either of these things possible using Meteobridge and the 'Image Magick' type codes?

Thanks in advance,
Simon, are you able to share the imagemagick overlay code you use? The curved rectangle boxes look great.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by jasonmfarrow »

I managed to sort it myself. Took a lot of planning though: https://admin.meteobridge.com/cam/07909 ... 0122162021
Last edited by jasonmfarrow on Fri Jan 22, 2021 6:21 pm, edited 1 time in total.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

User avatar
WessexWeather
Senior Boarder
Senior Boarder
Posts: 41
Joined: Sun Apr 17, 2016 9:54 am
Location: Wimborne, Dorset, UK
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by WessexWeather »

Deleted by OP.
Last edited by WessexWeather on Fri Jan 22, 2021 7:52 pm, edited 1 time in total.
Simon

Image

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by jasonmfarrow »

If anyone else is interested here is the overlay code:

Code: Select all

-resize 852x480
-fill green -draw "fill-opacity 0.6 roundrectangle 5 410 105 475 5 5"
-fill red -draw "fill-opacity 0.6 roundrectangle 110 410 210 441 5 5"
-fill blue -draw "fill-opacity 0.6 roundrectangle 110 444 210 475 5 5"
-fill black -draw "fill-opacity 0.6 roundrectangle 215 410 315 475 5 5"
-fill black -draw "fill-opacity 0.6 roundrectangle 320 410 420 475 5 5"
-fill black -draw "fill-opacity 0.6 roundrectangle 425 410 525 475 5 5"
-fill black -draw "fill-opacity 0.6 roundrectangle 530 410 630 475 5 5"
-fill blue -draw "fill-opacity 0.6 roundrectangle 635 410 735 475 5 5"
-fill black -draw "fill-opacity 0.6 roundrectangle 740 410 840 475 5 5"
-pointsize 12
-fill white -draw "text 8 425 'Temperature'"
-fill white -draw "text 218 425 'Humidity'"
-fill white -draw "text 323 425 'Pressure'"
-fill white -draw "text 428 425 'Wind'"
-fill white -draw "text 533 425 'Gust'"
-fill white -draw "text 638 425 'Rain'"
-fill white -draw "text 743 425 'Air Quality'"
-pointsize 20
-fill white -draw "text 8 447 '[th0temp-act.1:--]°C'"
-fill white -draw "text 218 447 '[th0hum-act.0:--]%'"
-fill white -draw "text 323 447 '[thb0seapress-act.1:--] hPa'"
-fill white -draw "text 428 447 '[wind0avgwind-act=mph.1:--] mph'"
-fill white -draw "text 533 447 '[wind0wind-dmax=mph.1:--] mph'"
-fill white -draw "text 638 447 '[rain0total-sumday.1:--] mm'"
-pointsize 12
-fill white -draw "text 8 465 '[hh]:[mm]'"
-fill white -draw "text 218 465 'DewPt [th0dew-act.1:--]°C'"
-fill white -draw "text 323 465 '[thb0seapress-delta3h=enbarotrend]([thb0seapress-delta3h=barotrend.2:--] hPa)'"
-fill white -draw "text 428 465 '[wind0dir-avg10.000:--]°'"
-fill white -draw "text 533 465 '[wind0wind-dmaxtime.ij:--]:[wind0wind-dmaxtime.kl:--]'"
-fill white -draw "text 638 465 '[YYYY]: [rain0total-yearsum.1:--] mm'"
-fill white -draw "text 743 445 'PM2.5: [air1!1pm-act.1:--] µg/m3'"
-fill white -draw "text 743 465 'PM10: [air1!0pm-act.1:--] µg/m3'"
-pointsize 16
-fill white -draw "text 113 428 'Max [th0temp-dmax.1:--]°C'"
-fill white -draw "text 113 462 'Min [th0temp-dmin.1:--]°C'"
-pointsize 10
-fill white -draw "text 113 438 '[th0temp-dmaxtime.ij:--]:[th0temp-dmaxtime.kl:--]'"
-fill white -draw "text 113 472 '[th0temp-dmintime.ij:--]:[th0temp-dmintime.kl:--]'"
The result looks like this:
camplus.jpg
camplus.jpg (19.66 KiB) Viewed 446 times
The top two lines in the picture come from the watermark of the webcam.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by jasonmfarrow »

To increase the picture and text quality I've increased the starting resolution x2. This changed *all* the code to increase dimensions respectively:

Code: Select all

-resize 1706x960
-fill green -draw "fill-opacity 0.6 roundrectangle 10 820 210 950 10 10"
-fill red -draw "fill-opacity 0.6 roundrectangle 220 820 420 882 10 10"
-fill blue -draw "fill-opacity 0.6 roundrectangle 220 888 420 950 10 10"
-fill black -draw "fill-opacity 0.6 roundrectangle 430 820 610 950 10 10"
-fill black -draw "fill-opacity 0.6 roundrectangle 620 820 840 950 10 10"
-fill black -draw "fill-opacity 0.6 roundrectangle 850 820 1050 950 10 10"
-fill black -draw "fill-opacity 0.6 roundrectangle 1060 820 1260 950 10 10"
-fill blue -draw "fill-opacity 0.6 roundrectangle 1270 820 1470 950 10 10"
-fill black -draw "fill-opacity 0.6 roundrectangle 1480 820 1690 950 10 10"
-pointsize 24
-fill white -draw "text 20 850 'Temperature'"
-fill white -draw "text 440 850 'Humidity'"
-fill white -draw "text 630 850 'Pressure'"
-fill white -draw "text 860 850 'Wind'"
-fill white -draw "text 1070 850 'Gust'"
-fill white -draw "text 1280 850 'Rain'"
-fill white -draw "text 1490 850 'Air Quality'"
-pointsize 38
-fill white -draw "text 20 894 '[th0temp-act.1:--]°C'"
-fill white -draw "text 440 894 '[th0hum-act.0:--]%'"
-fill white -draw "text 630 894 '[thb0seapress-act.1:--] hPa'"
-fill white -draw "text 860 894 '[wind0avgwind-act=mph.1:--] mph'"
-fill white -draw "text 1070 894 '[wind0wind-dmax=mph.1:--] mph'"
-fill white -draw "text 1280 894 '[rain0total-sumday.1:--] mm'"
-pointsize 22
-fill white -draw "text 20 930 '[hh]:[mm]'"
-fill white -draw "text 440 930 'DWPT [th0dew-act.1:--]°C'"
-fill white -draw "text 630 930 '[thb0seapress-delta3h=enbarotrend]([thb0seapress-delta3h=barotrend.2:--] hPa)'"
-fill white -draw "text 860 930 '[wind0dir-avg10.000:--]°'"
-fill white -draw "text 1070 930 '[wind0wind-dmaxtime.ij:--]:[wind0wind-dmaxtime.kl:--]'"
-fill white -draw "text 1280 930 '[YYYY]: [rain0total-yearsum.1:--] mm'"
-fill white -draw "text 1490 890 'PM2.5: [air1!1pm-act.1:--] µg/m3'"
-fill white -draw "text 1490 930 'PM10: [air1!0pm-act.1:--] µg/m3'"
-pointsize 28
-fill white -draw "text 230 850 'Max [th0temp-dmax.1:--]°C'"
-fill white -draw "text 230 918 'Min [th0temp-dmin.1:--]°C'"
-pointsize 16
-fill white -draw "text 230 876 '[th0temp-dmaxtime.ij:--]:[th0temp-dmaxtime.kl:--]'"
-fill white -draw "text 230 944 '[th0temp-dmintime.ij:--]:[th0temp-dmintime.kl:--]'"
-pointsize 42
-fill white -draw "text 20 800 'JMFweather.uk'"
The picture improvement can be seen here: https://admin.meteobridge.com/cam/07909 ... 0123212110. Picture quality is not good at night but then it was the cheapest camera I found that would do the job (Foscam C2M)

Ps.: The above code can be cut'n'pasted straight into the meteobridge. There is no need to put this into one long line of code.
Last edited by jasonmfarrow on Mon Jan 25, 2021 12:49 pm, edited 1 time in total.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 6631
Joined: Mon Oct 01, 2007 10:51 pm

Re: Any way to add a logo to the webcam image overlay?

Post by admin »

WOW, this really looks great.

Simon, Jason, would you be fine if I add this as a standard overlay to the Meteobridge templates?

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Any way to add a logo to the webcam image overlay?

Post by jasonmfarrow »

Hi Boris,

As Simon created the original idea (I merely copied and published) he can give the final approval. I have zero objections.

I would suggest that the last box have a couple of options.

I assign mine to Air Quality data (PM2.5/PM10 values). Simon has UV/Wm2 values. it might be worth having a box that has values everyone has but I think we've covered all the basics in the prior boxes.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

Post Reply