cloudy cloudy

Author Topic: Tricks with WSPIC  (Read 6400 times)

0 Members and 1 Guest are viewing this topic.

Offline sloweather

  • Posts: 356
  • Notes from the outpost...
    • SLOweather.com
Tricks with WSPIC
« on: March 22, 2007, 08:50:24 PM »
I've been working on a project and thinking WAY too much about PHP and some of the cool weather scripts that are available.

This idea came to me, and, with a little help from Ken True and some of script hacking, I have successfully created a proof of concept. It's not pretty (yet). Don't ask for the code. It's not pretty right now,either. ;) If you're not already familiar with Anole's banner and sticker script, (which a lot of us use to make our sig banners), the following may not make a lot of sense.

Basically, I wondered if Wspic could be used as a background image on which to write Anole's sticker script.

With Ken's help I shortened up wspic to only do 3 units of forecast. Then from my own notes, I changed the size of the wspic rectangle and moved the text and forecast images down, and tested it until it all worked.

Then I hardcoded the URL for that image into a copy of sticker.php, and, in that script, changed imagecreatefromgif to imagecreatefrompng.

Then I got impatient and tested the newly created modifications using an existing sticker config file. Note that this isn't a live link to the script, mainly because I'm probably going to break it again soon. The text overwrites the images and the color is wrong. But it works!



(I know, if I really knew what I was doing, I'd just combine both scripts. But I don't.)

And, BTW, the main reason was to make a PDA screen size wspic image:

See it at http://wx.sloweather.com/forecast/wspicpda.php. It looks great on my Axim, but the text gets sampled down to illegibility on my cell phone.


SLOweather Chris

Offline BfdWx

  • Posts: 1,607
  • Branford Connecticut
    • Southern CT Weather
Re: Tricks with WSPIC
« Reply #1 on: March 22, 2007, 11:53:41 PM »
Quote
And, BTW, the main reason was to make a PDA screen size wspic image:

Wow, very nice, what a great idea to make it PDA friendly.

Offline sloweather

  • Posts: 356
  • Notes from the outpost...
    • SLOweather.com
Re: Tricks with WSPIC
« Reply #2 on: March 23, 2007, 03:37:48 AM »
Thanks. The PDA panel isn't such a bad hack. Ken helped me figure out where the number of day periods is determined. Then I tested and documented the code for where the background, day text, icons, forecast, and temps get placed, and then tinkered with the settings to get everything looking better.
SLOweather Chris

 

cumulus