Author Topic: wxgraphic icons question  (Read 775 times)

0 Members and 1 Guest are viewing this topic.

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
wxgraphic icons question
« on: July 03, 2017, 02:52:05 PM »
Does anyone know of a set of conditions icons where the background has been made transparent?

I know it's possible with gif's and png's but not sure if been done.

There's nothing in the config file that turns it on.

Thanks
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxgraphic icons question
« Reply #1 on: July 03, 2017, 04:03:20 PM »
There's a set of transparent background .gif/.png images in the ./MESO-images directory of the regional network mesonet map script.
See https://saratoga-weather.org/scripts-mesonet-map.php for download.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: wxgraphic icons question
« Reply #2 on: July 03, 2017, 05:24:16 PM »
Thanks, Ken.  The script does something odd for making the icons sort of transparent.  His icons are not set to be transparent and, if they are, he said weird things would happen.  I'm weird and will give it a go.
« Last Edit: July 03, 2017, 10:02:39 PM by mldenison »
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: wxgraphic icons question
« Reply #3 on: July 04, 2017, 11:51:51 AM »
I downloaded the icons and they do have the transparent background layer.

I chose the sunny one that's showing right now.

I can't get the transparency working with either the original icon or this one.

The config.txt only has 3 settings that affect this property:

    $trans_color = imagecolorallocate($img,250,250,250);
    $trans_color = imagecolortransparent($img,$trans_color);
    $anti_alias = 'on';

If I set the color allocate setting to 0,0,0 (black) then the background is black.  If I change it to 255,255,255 (white) then the background is white.  Any other color setting has no effect.

Setting the antialias to either yes or no has no effect.

It's going to require more code horsepower than I have.

Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

 

anything