It is currently April 28th, 2024, 12:52 pm

Fast changing PNG's with transparencies

Get help with creating, editing & fixing problems with skins
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Fast changing PNG's with transparencies

Post by kanine »

I've completed phase one of getting my weather script up to speed. Now I wan't to tackle getting this rain radar effect on the desktop.

Seen here:
http://www.bom.gov.au/products/IDR023.loop.shtml#skip

If you look at the code the images are based on a number of transparent PNGs that are cycling through a sequence. I propose to cache the GIF's locally every 15 minutes or so, so as not to over burden the host, but I'm not sure where to start in terms of getting these gifs overlayed and switching on some sort 1-2/s frequency.

I'll be able to name the sequence of PNGs consistently eg Rain1.png Rain2.png etc and handle the dynamic parts in my collector script.

Any initial pointers would be great.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fast changing PNG's with transparencies

Post by jsmorley »

I'm not entirely sure you are going to be able to parse out those images as I think they are "pushed" as a part of some .cgi processing. But if you can get by that, here is a skin that demonstrates one way to looping a series of images like that.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[WebImageOne]
Measure=Plugin
Plugin=WebParser
Url=http://i.imwx.com/looper/archive/us_tlh_closeradar_plus_usen/1L.jpg?1317157901954
UpdateRate=1200
Download=1
DownloadFile=0.jpg

[WebImageTwo]
Measure=Plugin
Plugin=WebParser
Url=http://i.imwx.com/looper/archive/us_tlh_closeradar_plus_usen/2L.jpg?1317157901954
UpdateRate=1200
Download=1
DownloadFile=1.jpg

[WebImageThree]
Measure=Plugin
Plugin=WebParser
Url=http://i.imwx.com/looper/archive/us_tlh_closeradar_plus_usen/3L.jpg?1317157901954
UpdateRate=1200
Download=1
DownloadFile=2.jpg

[CalcImageRotate]
Measure=Calc
Formula=Counter % 3
UpdateDivider=1

[MeterImage]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\[CalcImageRotate].jpg"
DynamicVariables=1
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

jsmorley wrote:I'm not entirely sure you are going to be able to parse out those images as I think they are "pushed" as a part of some .cgi processing.
That's the job of my little worker script, I'm hoping it's feasible because the result, as shown by your demonstration is pretty cool. It's the sort of thing that could do with a little on screen control to turn the meter on and off, but that's a question for after I get the images caching properly.

Thanks again.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Fast changing PNG's with transparencies

Post by Mordasius »

You should be able to use jsmorley's example if you grab the image names from this part of the http://www.bom.gov.au/products/IDR023.loop.shtml#skip Page Source:

Code: Select all

// Generated by write.free.loop.filenames.js.sh
theImageNames = new Array();
theImageNames[0] = "/radar/IDR023.T.201207021148.png";
theImageNames[1] = "/radar/IDR023.T.201207021154.png";
theImageNames[2] = "/radar/IDR023.T.201207021159.png";
theImageNames[3] = "/radar/IDR023.T.201207021205.png";
theImageNames[4] = "/radar/IDR023.T.201207021212.png";
theImageNames[5] = "/radar/IDR023.T.201207021218.png";
nImages = 6;
You can then download them as:

http://www.bom.gov.au/radar/IDR023.T.201207021148.png
http://www.bom.gov.au/radar/IDR023.T.201207021154.png
.. etc.

then superimpose them on top of these four images in this order:

http://www.bom.gov.au/products/radar_transparencies/IDR023.background.png
http://www.bom.gov.au/products/radar_transparencies/IDR023.locations.png
http://www.bom.gov.au/products/radar_transparencies/IDR023.range.png
http://www.bom.gov.au/products/radar_transparencies/IDR023.topography.png

and there you go.. Bruce is your Uncle..

I'll try and post a working example a little later :)
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

Mordasius wrote:You should be able to use jsmorley's example if you grab the image names from this part of the http://www.bom.gov.au/products/IDR023.loop.shtml#skip Page and there you go.. Bruce is your Uncle..
I'll try and post a working example a little later :)
Yep, I've done that and have extracted the attached set of files. The images consist of a number of static files with then 6 layers over the top. If you could help with an elegant skin for displaying this I've already got my little collector script gathering the attached files on the set polling frequency.

Edit: It would be very neat if this could all be gathered within the skin, one of the things my script does is to keep track of the configuration information. In this case the identifier IDR023 is important as it identifies the particular radar sequence.

Still learning... it's amazing what can be done with Rainmeter huh.
You do not have the required permissions to view the files attached to this post.
Last edited by kanine on July 2nd, 2012, 1:04 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fast changing PNG's with transparencies

Post by jsmorley »

kanine wrote: Yep, I've done that and have extracted the attached set of files. The images consist of a number of static files with then 6 layers over the top. If you could help with an elegant skin for displaying this I've already got my little collector script gathering the attached files on the set polling frequency.
We won't do it for you, that isn't how we roll here. We are glad to help out with any questions you have or any places you get stuck as you create your skin however.
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

jsmorley wrote: We won't do it for you, that isn't how we roll here. We are glad to help out with any questions you have or any places you get stuck as you create your skin however.
Not expecting that, just keen to use a best practice approach. Really appreciating the help.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fast changing PNG's with transparencies

Post by jsmorley »

You shouldn't need any external "helper" app to get the images. Since that overlay html file has the images listed, you should be able to just parse that file, download all the images, and use something like that Calc/Counter approach I posted to display them in order. A pause / start button will be a little trickier, but we can cross that bridge after you get the basics working.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Fast changing PNG's with transparencies

Post by Mordasius »

You might find some ideas on this thread
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

Mordasius wrote:You might find some ideas on this thread
Yeah that looks good, I've got this going for now, I had the original order of the images wrong but it looks pretty cool, as a standalone example.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[CalcImageRotate]
Measure=Calc
Formula=Counter % 6
UpdateDivider=1

[MeterStatic1]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Static1.png"

[MeterStatic2]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Static2.png"

[MeterStatic3]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Static3.png"

[MeterStatic4]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Static4.png"

[MeterStatic5]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Static5.png"


[MeterImage]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\Radar[CalcImageRotate].png"
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.