It is currently March 28th, 2024, 10:33 pm

Clean PNG files

General topics related to Rainmeter.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Clean PNG files

Post by ms310 »

Hi - I would like to create a PNG file as a background shape for a skin I am working on.

On my corporate laptop they gave me Visio - which has some nice functionality. I am struggling however to create a "clean" PNG image. When I do a "save as" the edges are all blurry.

I am not married to Visio. Photoshop and the like are not an option though. What vector graphics tools do you guys use to create images and shapes for your skins?

Thanks for any advice you can provide!
2019-09-21_11h54_31.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clean PNG files

Post by jsmorley »

For vector graphics I would look at Inkscape.

https://inkscape.org/

Whether you do raster (PhotoShop, Gimp etc.) or vector (Illustrator, Inkscape), any curved edges will be aliased, so they look as good as they can in the original size and are not "jaggy". If you zoom them up later as a .png, that aliasing can look pretty bad. No way to avoid that really, except to make the original as large, or larger, than the size you are ever likely to display it at. Things look vastly better when "shrunk" than they do when "zoomed".
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clean PNG files

Post by eclectic-tech »

I use paint.NET for most graphic work. Download
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: Clean PNG files

Post by ms310 »

Thanks guys - I will take a look at these tools. This helps!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clean PNG files

Post by balala »

Beside jsmorley's and eclectic-tech's proposal, my question is if there indeed is needed a software to create a let's say "physical" background file? Because in many cases those background might be created using Shape meters. This method has two great advantages: the created background can be enlarged simply without quality lost and if later anytime needed, it can be easily modified / adjusted for new needs, if they ever change. Since we have the Shape meter added, this looks a much more efficient and desirable approach.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: Clean PNG files

Post by ms310 »

balala wrote: September 21st, 2019, 5:49 am Beside jsmorley's and eclectic-tech's proposal, my question is if there indeed is needed a software to create a let's say "physical" background file? Because in many cases those background might be created using Shape meters. This method has two great advantages: the created background can be enlarged simply without quality lost and if later anytime needed, it can be easily modified / adjusted for new needs, if they ever change. Since we have the Shape meter added, this looks a much more efficient and desirable approach.
When you are right, you are right! Thanks Balala!

Code: Select all

Shape=Rectangle 0,0,260,80,40,80 | StrokeWidth 0 | Stroke Color 255,0,0 | Fill Color 0,0,0,150
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: Clean PNG files

Post by ms310 »

Quick Q on this topic/adventure.

I have my Shape and when I display text at 0,0 it seems to not be at 0,0.

What simple thing am I missing? Time, I would have expected, would be aligned to the very top left of the image.

Code: Select all

[MeterShape]
Meter=Shape
X=0
Y=0
;Rectangle Parameters: X, Y, Width, Height, RadiusX, RadiusY
Shape=Rectangle 0,0,260,160,40,40 | StrokeWidth 0 | Stroke Color 255,0,0 | Fill Color 0,0,0,150

[Time]
Meter=String
MeasureName=MeasureTime
Text=%1
X=0
Y=0
FontFace=Quicksand Medium
FontSize=(24*#scale#)
FontColor=dddddd
StringAlign=LeftCenter
AntiAlias=1
ClipString=1

2019-09-21_18h01_38.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clean PNG files

Post by jsmorley »

The code you have posted simply can't produce that image.

Code: Select all

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

[Variables]
scale=1

[MeasureTime]
Measure=Time

[MeterShape]
Meter=Shape
X=0
Y=0
;Rectangle Parameters: X, Y, Width, Height, RadiusX, RadiusY
Shape=Rectangle 0,0,260,160,40,40 | StrokeWidth 0 | Stroke Color 255,0,0 | Fill Color 0,0,0,150

[Time]
Meter=String
MeasureName=MeasureTime
Text=%1
X=0
Y=0
FontFace=Quicksand Medium
FontSize=(24*#scale#)
FontColor=dddddd
StringAlign=LeftCenter
AntiAlias=1
ClipString=1

1.jpg


https://docs.rainmeter.net/manual/meters/string/#StringAlign

The string will be horizontally aligned to the left, at X=0 and vertically centered on Y=0, so half above 0 and half below 0. That is the meaning of StringAlign=LeftCenter.

I doubt that is what you want.

Given the rounded corners, you are likely to want to offset the X and Y some, and not use StringAlign.

Code: Select all

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

[Variables]
scale=1

[MeasureTime]
Measure=Time

[MeterShape]
Meter=Shape
X=0
Y=0
;Rectangle Parameters: X, Y, Width, Height, RadiusX, RadiusY
Shape=Rectangle 0,0,260,160,40,40 | StrokeWidth 0 | Stroke Color 255,0,0 | Fill Color 0,0,0,150

[Time]
Meter=String
MeasureName=MeasureTime
Text=%1
X=20
Y=5
FontFace=Quicksand Medium
FontSize=(24*#scale#)
FontColor=dddddd
;StringAlign=LeftCenter
AntiAlias=1
ClipString=1

2.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: Clean PNG files

Post by balala »

jsmorley wrote: September 21st, 2019, 9:57 am The code you have posted simply can't produce that image.
Completely agree! That code simply doesn't give what is posted by ms310:
Skin.png
ms310 wrote: September 21st, 2019, 9:03 am I have my Shape and when I display text at 0,0 it seems to not be at 0,0.
I suppose you got something wrong, the posted image doesn't match the posted code.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clean PNG files

Post by jsmorley »

balala wrote: September 21st, 2019, 10:41 am Completely agree! That code simply doesn't give what is posted by ms310:
Skin.png

I suppose you got something wrong, the posted image doesn't match the posted code.
What we don't have is the Format option on the missing Time measure, so I guess it could be something like:

Code: Select all

[MeasureTime]
Measure=Time
Format=#CRLF##CRLF##CRLF#%H:%M
Which with his code would give something approximating his image due to the vertical center.


3.jpg


This I find unlikely in the extreme, and suspect that the code he posted did not create the image he posted.
You do not have the required permissions to view the files attached to this post.