I have an image meter displaying a png-file - this png has the background color (0,0,0) set as transparent. As an example see from wikimedia: a tree with transparent background.
I have tried both the ImageAlpha and ImageTint options but they act on "the tree" and keep the background in pure black. My goal is to make the "pure black" semi-transparent, so that the desktop background is visible with e.g. alpha 200. The tree however should be displayed without any transparency - only the background of the png should get some transparency.
How can I achieve this goal? Thanks for pulling me on the road to success, I'm surely overlooking an option but could not find it. Thanks for your help!
It is currently October 18th, 2024, 3:51 am
Image meter: PNG file with background transparency
-
- Posts: 118
- Joined: October 7th, 2022, 8:08 pm
-
- Posts: 44
- Joined: January 25th, 2023, 2:56 am
Re: Image meter: PNG file with background transparency
Probably you messed up some option, beacuse using a simple meter without adding a lot of options works fine.
Code: Select all
[Tree]
Meter=Image
ImageName=tree.png
ImageTint=255,255,255
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22861
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Image meter: PNG file with background transparency
Code: Select all
[MeterTree]
Meter=Image
ImageName=C:\DN\Tree_Transparent_Background.png
SolidColor=0,0,0,100
https://docs.rainmeter.net/manual/meters/general-options/#SolidColor
You do not have the required permissions to view the files attached to this post.
-
- Posts: 118
- Joined: October 7th, 2022, 8:08 pm
Re: Image meter: PNG file with background transparency
Thanks guys - I must have been drunk and blind at the same time, it worked all the time: ImageAlpha and ImageTint are not needed, using the transparent png in the image meter works out of the box. My mistake, thanks for looking at this!
-
- Rainmeter Sage
- Posts: 8485
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Image meter: PNG file with background transparency
The replies from KazukiGames and jsmorley probably answered your question, but based on your description, how can a background be 'transparent' and 'pure black' at the same time, like alluded in your OP? Are you sure you don't have some black meter behind the image?
EDIT:
Yep, my point above exactly... don't worry, it sometimes happens to all of us, not seeing the forest for the trees (pun intended).
-
- Posts: 118
- Joined: October 7th, 2022, 8:08 pm
Re: Image meter: PNG file with background transparency
... and exactly this was my mistake. You got me.Yincognito wrote: ↑July 21st, 2024, 7:51 pm Are you sure you don't have some black meter behind the image?
-
- Developer
- Posts: 22861
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Image meter: PNG file with background transparency
To be clear, nothing can act only on the "transparent" background of the .png image itself. What my suggestion was is to simply color the meter container itself, which you can do with any color and any opacity using SolidColor. Since the background of the tree is fully transparent, the meter container will "show through" and give you the effect you want.