It is currently May 21st, 2024, 11:41 am

Image Fades when streched

Report bugs with the Rainmeter application and suggest features.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Image Fades when streched

Post by smurfier »

When I take an image 2 pixels wide and stretch it to the width of my screen, the right end fades to transparent. It's neither part of the image file or the code.


Code: Select all

[mBackL]
Meter=Image
ImageName=Themes\Pixies\Left.png

[mBackM]
Meter=Image
ImageName=Themes\Pixies\MiddleT.png
W=(#SWidth#-8)
H=31
X=R

[mBackL]
Meter=Image
ImageName=Themes\Pixies\Right.png
X=R
H=31
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Image Fades when streched

Post by smurfier »

Download example skin here.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Image Fades when streched

Post by jsmorley »

Yeah, I see the behavior. Beats me right off the top of my head. If I bring Middle.png into photoshop and actually size it to 1680 wide, it works fine. If Rainmeter sizes it based on a formula in the W= setting, you get that left-to-right fade effect.

It is nothing to do with your image as such, as even a really vanilla 2x31 image like this:
test.png
Does the same thing.

It's not in your code, as even the most basic Meter=Image stretching the image does it:

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeterTest]
Meter=Image
ImageName=Themes\Pixies\Test.png
W=1680
H=31

There has to be something amiss with the "stretching" routines in Meter=Image.
You do not have the required permissions to view the files attached to this post.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Image Fades when streched

Post by poiru »

Probably related to issue 145.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Image Fades when streched

Post by jsmorley »

poiru wrote:Probably related to issue 145.
I suspect you are right.

Smurf, I suspect that if you start with a reasonable size image, like 1024 (not many are going to have a screen smaller than that) and stretch from there, rather than from a width of 2, it should work fine until this is sorted out.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Image Fades when streched

Post by jsmorley »

I notice that with AntiAlias=1 on the image meter, the effect is less pronounced and seems to happen (but not as bad) on both the left and right. If AntiAlias=0 on the meter, the effect is very pronounced, and is only on the right of the image.
User avatar
kenz0
Developer
Posts: 263
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Image Fades when streched

Post by kenz0 »

Issue 145 is an obvious defect, so I hope that the issue will be fixed in the future.
But as for this case, we can now solve the problem by using ScaleMargins.

[MeterTest]
Meter=Image
ImageName=Themes\Pixies\Test.png
W=1680
H=31
ScaleMargins=0,0,1,0


And another thing in smurfier's example, you will not need three separated backgrounds anymore if you use a ScaleMargins sensibly.
.
Image
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Image Fades when streched

Post by jsmorley »

kenz0 wrote: But as for this case, we can now solve the problem by using ScaleMargins.

[MeterTest]
Meter=Image
ImageName=Themes\Pixies\Test.png
W=1680
H=31
ScaleMargins=0,0,1,0
Outstanding. ScaleMargins never even occurred to me to try.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Image Fades when streched

Post by smurfier »

Yeah... I didn't know about Tile and ScaleMargins. Maybe I should read the manual a bit more often.

Tile=1 solves this issue for me.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .