Author Topic: Webcam Thumbnailler / Cropping  (Read 5994 times)

Offline beteljuice

  • Full Member
  • ***
  • Posts: 172
  • Country: 00
  • Karma: 41
Webcam Thumbnailler / Cropping
« on: February 15, 2015, 03:35:48 AM »
The beteljuice has been playing again !

Whilst on another project it was mentioned they couldn't get a decent thumbnail to show current conditions.

Easy with php said the betejuice, It might be for you said the other.

So, the beteljuice has put something together where you can select your thumbnail size and easily pick the area of your (large) webcam pic that you want for a thumb.
This might be square or a vertical rectangle rather than the usual horizontal rectangle, depending upon what reference points you want displayed and your page layout.

> Another beteljuice plaything <

From the page:

There are several ways that the cropped thumbnail can be achieved.
This will give the code for TWO different methods.

Pure CSS
Pros:

    NO php requirement
    Original image is loaded in the page and thus available eg. could be a full screen option.

Cons:

    Original image is loaded in the page, this could significantly affect download time !.


PHP Thumbnailer
Pros:

    Simple image call
    Small upload in the page.

Cons:

    None really.


Code for both the CSS method and a 'personal' PHP file will be created for you to cut 'n' paste.
Which you chose is up to you !

It may not work for all, tough :P
« Last Edit: February 15, 2015, 03:37:54 AM by beteljuice »


Imagine what you will KNOW tomorrow

Offline JennyLeez

  • Administrator
  • Hero Member
  • *****
  • Posts: 10086
  • Country: nz
  • Karma: 654
  • Gender: Female
  • Wairoa
    • Wairoa, Hawkes Bay Weather
  • Station: WS3085
Re: Webcam Thumbnailler / Cropping
« Reply #1 on: February 15, 2015, 01:50:26 PM »
and here is my test so far :)
Thank beteljuice.

Gisborne West
« Last Edit: December 01, 2016, 03:20:07 PM by JennyLeez »
Living in Wairoa, Northern Hawkes Bay
Website: wairoa.net/weather

Offline beteljuice

  • Full Member
  • ***
  • Posts: 172
  • Country: 00
  • Karma: 41
Re: Webcam Thumbnailler / Cropping
« Reply #2 on: February 16, 2015, 08:33:22 AM »
What ?

Nobody even wants to 'play' and see what it does  :o

Offline TonyC

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 3698
  • Country: nz
  • Karma: 407
  • Gender: Male
    • Port Robinson Home Page
  • Station: Davis Vantage Pro 2
Re: Webcam Thumbnailler / Cropping
« Reply #3 on: February 16, 2015, 11:53:00 AM »
I did give it a quick try.
My webserver is on my local network.
It can't find the file when I use the url:- http://192.168.1.137/Weatherfiles/webcam2.jpg which is the web server local ip,  to resize the picture.
Haven't tried using localhost or another browser (using Firefox). Might have another look when there's less real work to do.
cheers
TC
Davis VP Pro2 wireless with Solar sensor using Weather Display (ver10.37S(Build93) running on a Micro PC Windows 10
Port Robinson, North Canterbury weather station: Port Robinson, NewZealand

Offline beteljuice

  • Full Member
  • ***
  • Posts: 172
  • Country: 00
  • Karma: 41
Re: Webcam Thumbnailler / Cropping
« Reply #4 on: February 16, 2015, 03:00:08 PM »
I don't get that in a browser either ! - do you mean http://203.99.134.247/Weatherfiles/webcam2.jpg ?

Offline TonyC

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 3698
  • Country: nz
  • Karma: 407
  • Gender: Male
    • Port Robinson Home Page
  • Station: Davis Vantage Pro 2
Re: Webcam Thumbnailler / Cropping
« Reply #5 on: February 16, 2015, 11:20:17 PM »
I still don't get any graphic come up to resize, though it did move to the next screen. Maybe it's because the server is "in house" on the same internal network as the workstation. Not to worry.

Offline beteljuice

  • Full Member
  • ***
  • Posts: 172
  • Country: 00
  • Karma: 41
Re: Webcam Thumbnailler / Cropping
« Reply #6 on: February 17, 2015, 12:04:34 AM »
@TonyC

It can't go to the second screen unless it passes various checks.
I just tried it and it works, although the image itself looks like a spiders web in a fog ATM  :D

Offline TonyC

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 3698
  • Country: nz
  • Karma: 407
  • Gender: Male
    • Port Robinson Home Page
  • Station: Davis Vantage Pro 2
Re: Webcam Thumbnailler / Cropping
« Reply #7 on: February 17, 2015, 07:59:42 AM »
That's because it's night and has IR.
All I get is a blank thumbnail box. I'll give it a go when I'm off site at my Christchurch home.
cheers
TC
« Last Edit: February 17, 2015, 08:09:49 AM by TonyC »

Offline TonyC

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 3698
  • Country: nz
  • Karma: 407
  • Gender: Male
    • Port Robinson Home Page
  • Station: Davis Vantage Pro 2
Re: Webcam Thumbnailler / Cropping
« Reply #8 on: February 17, 2015, 05:07:57 PM »
I'm now in Christchurch and yes it works fine.
The webserver and workstation obviously have to be on different networks to get the code generator to operate.


Share via twitter

xx
WebCam

Started by Te Puke Weather

34 Replies
19826 Views
Last post September 23, 2012, 09:09:22 AM
by TonyC
xx
webcam for cumulus

Started by hotcop65

6 Replies
7703 Views
Last post March 14, 2015, 08:35:27 AM
by TonyC
xx
Webcam Ideas

Started by gabba

16 Replies
12810 Views
Last post July 28, 2016, 09:07:34 PM
by Martin4Jay
xx
Webcam sale

Started by gabba

3 Replies
4996 Views
Last post February 20, 2016, 08:07:02 AM
by TonyC
xx
Stewart Island Webcam issues

Started by Wolfie33

6 Replies
5903 Views
Last post May 16, 2016, 11:25:40 AM
by davidrg