It is currently March 28th, 2024, 9:53 pm

Asia Weather Map

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Asia Weather Map

Post by jsmorley »

So for ImageCrop...

If I have an image like this:

This image is 1080 X 680
GMSIR0.gif
And I want to crop off that black information border at the bottom and everything to the right of the international date line on the right, I would need to know how many pixels big the original image is, and how it big would be without those areas.

Lots of ways to do that I guess, but I just loaded the original image into an image editor (I used Photoshop, but most things will work) and manually "cropped" the image to the content I wanted. I now know the size of the "cropped" image. That size is the stuff I want to "keep" from the original image.

ImageCrop is used to define what you want to "keep", not what you want to "remove".

This image is 977 X 644
Cropped.gif
Note that I used a copy of the actual image downloaded to %TEMP% by your skin, so these measurements will work for you, and you can skip that first bit... It's important that you know "how and why" I did it though, for future reference.

Now I have the information I need... I create a skin like:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
; Original image is 1080 X 680
; Manually cropped image is 977 X 644
; So we want to display 977 of the width and 
;   644 of the height of the original image
;   starting at the top left of the image
;   to crop it in Rainmeter to the desired content

; We move the image in (X) and down (Y) by 10 pixels, to allow for our border
; We then crop the image to the desired content, using ImageCrop
; Then we size the cropped image to our desired width, using
;   PreserveAspectRatio=1 so we don't squish or stretch it

[MeterImage]
Meter=Image
X=10
Y=10
ImagePath=#@#Images\
ImageName=GMSIR0.
ImageCrop=0,0,977,644
W=400
PreserveAspectRatio=1

; Now we add our border around the image. I refuse to use an Image meter for this,
;   it just adds more complexity to the "sizing" that I dont' need. So I'm using a Shape meter.
; I know I want a border width of 10 pixels, and that a stroke is half-inside and half-outside
;   the shape, so I first move the Rectangle in and down by 5 pixels (half). That
;   is the Rectangle=5,5 bit.
; Then I set the width and height of the rectangle to the current width and height 
;   of the Image meter, plus 10 pixels.

[MeterBorder]
Meter=Shape
Shape=Rectangle 5,5,([MeterImage:W]+10),([MeterImage:H]+10) | StrokeWidth 10 | Stroke Color 47,47,47,255 | Fill Color 0,0,0,1
DynamicVariables=1
And end up with:
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Asia Weather Map

Post by balala »

vHAPpY wrote:I cant see the image in Rainmeter temp. is there a way that my downloaded images are being save as .png or .jpg/jpeg
Also note that the images will be downloaded without extension, as GMSIR0 - GMSIR10, into the folder indicated by jsmorley above.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Asia Weather Map

Post by jsmorley »

So like this maybe:
WeatherRadar_1.0.rmskin
Click to animate:
GIF.gif

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Current=0

[MeasureImage0]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR0
StringIndex=1
Download=1
FinishAction=[!EnableMeasure MeasureImage1][!SetVariable Current "1"][!UpdateMeter *][!Redraw]

[MeasureImage1]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR1
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage2][!SetVariable Current "2"][!UpdateMeter *][!Redraw]

[MeasureImage2]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR2
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage3][!SetVariable Current "3"][!UpdateMeter *][!Redraw]

[MeasureImage3]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR3
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage4][!SetVariable Current "4"][!UpdateMeter *][!Redraw]

[MeasureImage4]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR4
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage5][!SetVariable Current "5"][!UpdateMeter *][!Redraw]

[MeasureImage5]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR5
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage6][!SetVariable Current "6"][!UpdateMeter *][!Redraw]

[MeasureImage6]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR6
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage7][!SetVariable Current "7"][!UpdateMeter *][!Redraw]

[MeasureImage7]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR7
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage8][!SetVariable Current "8"][!UpdateMeter *][!Redraw]

[MeasureImage8]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR8
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage9][!SetVariable Current "9"][!UpdateMeter *][!Redraw]

[MeasureImage9]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR9
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage10][!SetVariable Current "10"][!UpdateMeter *][!Redraw]

[MeasureImage10]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/GMSIR10
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureLoop][!CommandMeasure MeasureLoop "Reset"][!SetOption MeterLoopImage ImageName "GMSIR[*MeasureLoop*]."]

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=10
LoopCount=0
Disabled=1

[MeterStartImage]
Meter=Image
X=10
Y=10
W=400
PreserveAspectRatio=1
ImageName=#@#Images\NoSignal.jpg

[MeterSplines]
Meter=String
InlineSetting=Size | 30
InlineSetting2=Color | 255,255,255,255
X=210
Y=145
StringAlign=CenterCenter
Text=Reticulating#CRLF#Splines#CRLF##Current#
DynamicVariables=1
AntiAlias=1

[MeterLoopImage]
Meter=Image
X=10
Y=10
W=400
PreserveAspectRatio=1
ImageCrop=0,0,977,644
ImagePath=%TEMP%\Rainmeter-Cache\
DynamicVariables=1

[MeterBorder]
Meter=Shape
Shape=Rectangle 5,5,([MeterStartImage:W]+10),([MeterStartImage:H]+10) | StrokeWidth 10 | Stroke Color 47,47,47,255 | Fill Color 0,0,0,1
DynamicVariables=1
Note that I can't help it that it takes about 10 seconds to fully get started on load and refresh, as you really MUST download all the images before you start the Loop counter, and the only way to know you are "done" is to download them one after the other, with the success of each starting the download of the next, so that when you successfully get "10", you know you are done. While you could just kick off all the WebParser / Download measures at once, there is no certainty, in fact it is pretty much random, which image will be done downloading before or after which. So you can't know that you are "done".

It takes time to reticulate all the splines...
You do not have the required permissions to view the files attached to this post.
User avatar
vHAPpY
Posts: 84
Joined: November 26th, 2016, 2:45 am

Re: Asia Weather Map

Post by vHAPpY »

Is there another way not to display the reticulating splines? I mean Mr. Balala once showed me if the images are not yet complete on downloading it just display this Image

Once finish, it'll just loop
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Asia Weather Map

Post by jsmorley »

vHAPpY wrote:Is there another way not to display the reticulating splines? I mean Mr. Balala once showed me if the images are not yet complete on downloading it just display this Image

Once finish, it'll just loop
Just remove the String meter.
User avatar
vHAPpY
Posts: 84
Joined: November 26th, 2016, 2:45 am

Re: Asia Weather Map

Post by vHAPpY »

I prefer the first size this one

Image

but they are crop like this Image

is it possible?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Asia Weather Map

Post by jsmorley »

I think my explanations, and the code in the .rmskin I posted should be all you need to know how to crop and size things any way you want. I'm going to step back now, unless you have a specific question about YOUR code.
Bring me a rock.
No, that's not the right rock.
Bring me another rock.
User avatar
vHAPpY
Posts: 84
Joined: November 26th, 2016, 2:45 am

Re: Asia Weather Map

Post by vHAPpY »

Help. I want to Add these New Imagery Scans

How to add it in my skin

GEOCOLOR
Image
Loop Directory is http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirbbm/
INFRARED
Image
Loop Directory is http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsir/
WATER VAPOR
Image
Loop Directory is http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmswv/
AIRMASS
Image
Loop Directory is http://tropic.ssec.wisc.edu/real-time/westpac/movies/gmsirn/

And when on mouse hover

Code: Select all

LeftMouseUpAction=[!ShowMeter MeterCover2][!HideMeter MeterCover1]
TooltipText="Click to switch to GEOCOLOR map."

Code: Select all

LeftMouseUpAction=[!ShowMeter MeterCover2][!HideMeter MeterCover1]
TooltipText="Click to switch to WATER VAPOR map."

Code: Select all

LeftMouseUpAction=[!ShowMeter MeterCover2][!HideMeter MeterCover1]
TooltipText="Click to switch to AIRMASS map."

Code: Select all

LeftMouseUpAction=[!ShowMeter MeterCover2][!HideMeter MeterCover1]
TooltipText="Click to switch to INFRARED map."
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Asia Weather Map

Post by balala »

I think the last posted ToolTipText options are wrong, but here is an approach. I've added a few new variables, a new measure ([MeasureSource]) and a lot of new options to some of the existing sections:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Current=0
Source=0

[MeasureSource]
Measure=Calc
Formula=#Source#
IfCondition=(MeasureSource=0)
IfTrueAction=[!DisableMeasure MeasureLoop][!DisableMeasureGroup "ImageDownload"][!SetVariable Current "0"][!SetVariable Ord ""][!SetVariable ImgSource "gmsirbbm"][!SetVariable ImgSource2 "GMSIR"][!SetOption MeterLoopImage ImageName ""][!SetOption MeterLoopImage TooltipText "Click to switch to INFRARED map."][!UpdateMeasureGroup "ImageDownload"][!EnableMeasure "MeasureImage0"][!CommandMeasure "MeasureImage0" "Update"][!HideMeter "MeterLoopImage"]
IfCondition2=(MeasureSource=1)
IfTrueAction2=[!DisableMeasure MeasureLoop][!DisableMeasureGroup "ImageDownload"][!SetVariable Current "0"][!SetVariable Ord "_1"][!SetVariable ImgSource "gmsir"][!SetVariable ImgSource2 "GMSIR"][!SetOption MeterLoopImage ImageName ""][!SetOption MeterLoopImage TooltipText "Click to switch to WATER VAPOR map."][!UpdateMeasureGroup "ImageDownload"][!EnableMeasure "MeasureImage0"][!CommandMeasure "MeasureImage0" "Update"][!HideMeter "MeterLoopImage"]
IfCondition3=(MeasureSource=2)
IfTrueAction3=[!DisableMeasure MeasureLoop][!DisableMeasureGroup "ImageDownload"][!SetVariable Current "0"][!SetVariable Ord ""][!SetVariable ImgSource "gmswv"][!SetVariable ImgSource2 "GMSWV"][!SetOption MeterLoopImage ImageName ""][!SetOption MeterLoopImage TooltipText "Click to switch to AIRMASS map."][!UpdateMeasureGroup "ImageDownload"][!EnableMeasure "MeasureImage0"][!CommandMeasure "MeasureImage0" "Update"][!HideMeter "MeterLoopImage"]
IfCondition4=(MeasureSource=3)
IfTrueAction4=[!DisableMeasure MeasureLoop][!DisableMeasureGroup "ImageDownload"][!SetVariable Current "0"][!SetVariable Ord ""][!SetVariable ImgSource "gmsirn"][!SetVariable ImgSource2 "GMSIRNHC"][!SetOption MeterLoopImage ImageName ""][!SetOption MeterLoopImage TooltipText "Click to switch to GEOCOLOR map."][!UpdateMeasureGroup "ImageDownload"][!EnableMeasure "MeasureImage0"][!CommandMeasure "MeasureImage0" "Update"][!HideMeter "MeterLoopImage"]
DynamicVariables=1

[MeasureImage0]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#0
StringIndex=1
Download=1
FinishAction=[!EnableMeasure MeasureImage1][!SetVariable Current "1"][!CommandMeasure "MeasureImage1" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage1]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#1
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage2][!SetVariable Current "2"][!CommandMeasure "MeasureImage2" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage2]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#2
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage3][!SetVariable Current "3"][!CommandMeasure "MeasureImage3" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage3]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#3
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage4][!SetVariable Current "4"][!CommandMeasure "MeasureImage4" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage4]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#4
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage5][!SetVariable Current "5"][!CommandMeasure "MeasureImage5" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage5]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#5
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage6][!SetVariable Current "6"][!CommandMeasure "MeasureImage6" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage6]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#6
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage7][!SetVariable Current "7"][!CommandMeasure "MeasureImage7" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage7]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#7
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage8][!SetVariable Current "8"][!CommandMeasure "MeasureImage8" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage8]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#8
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage9][!SetVariable Current "9"][!CommandMeasure "MeasureImage9" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage9]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#9
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureImage10][!SetVariable Current "10"][!CommandMeasure "MeasureImage10" "Update"][!UpdateMeter "MeterSplines"][!Redraw]
DynamicVariables=1
Group=ImageDownload

[MeasureImage10]
Measure=Plugin
Plugin=WebParser
URL=http://tropic.ssec.wisc.edu/real-time/westpac/movies/#ImgSource#/#ImgSource2#10
StringIndex=1
Download=1
Disabled=1
FinishAction=[!EnableMeasure MeasureLoop][!CommandMeasure MeasureLoop "Reset"][!SetOption MeterLoopImage ImageName "#ImgSource2#[*MeasureLoop*]#Ord#."][!ShowMeter "MeterLoopImage"]
DynamicVariables=1
Group=ImageDownload

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=10
LoopCount=0
Disabled=1

[MeterStartImage]
Meter=Image
X=10
Y=10
W=400
PreserveAspectRatio=1
ImageName=#@#Images\NoSignal.jpg

[MeterSplines]
Meter=String
InlineSetting=Size | 30
InlineSetting2=Color | 255,255,255,255
FontEffectColor=0,0,0
StringEffect=Border
X=210
Y=145
StringAlign=CenterCenter
Text=Reticulating#CRLF#Splines#CRLF##Current#
DynamicVariables=1
AntiAlias=1

[MeterLoopImage]
Meter=Image
X=10
Y=10
W=400
PreserveAspectRatio=1
ImageCrop=0,0,977,644
ImagePath=%TEMP%\Rainmeter-Cache\
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Source "((#Source#+1)%4)"][!UpdateMeasure "MeasureSource"]
DynamicVariables=1
Hidden=1

[MeterBorder]
Meter=Shape
Shape=Rectangle 5,5,([MeterStartImage:W]+10),([MeterStartImage:H]+10) | StrokeWidth 10 | Stroke Color 47,47,47,255 | Fill Color 0,0,0,1
DynamicVariables=1
What you think?
User avatar
vHAPpY
Posts: 84
Joined: November 26th, 2016, 2:45 am

Re: Asia Weather Map

Post by vHAPpY »

This is what I'm saying :-( :-( :-( :-( thank you thank you :bow: :bow:

BTW Can the border be way too black then a slight thin? what to input? and is it possible to add time and dates? like what you help me on my Himawari8 skin