It is currently April 26th, 2024, 7:34 am

AntiAlias 0 not working properly

Get help with creating, editing & fixing problems with skins
Sug
Posts: 3
Joined: August 5th, 2020, 2:08 am

AntiAlias 0 not working properly

Post by Sug »

The AntiAlias = 0 has been set in a image meter and the scaling is still using antialiasing.
Original image:
Image

Rainmeter skin:

Code: Select all

[Rainmeter]
Update=50

[MeterOneIcon]
Meter = Image
ImageName = #@#\ico.png
AntiAlias = 0
W = 256
H = 256
Result:
Image

Is this a bug or is there a catch?
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: AntiAlias 0 not working properly

Post by jsmorley »

Rainmeter is just not going to successfully resize a 16x16 image to 256x256. Nothing will really.
Sug
Posts: 3
Joined: August 5th, 2020, 2:08 am

Re: AntiAlias 0 not working properly

Post by Sug »

jsmorley wrote: August 5th, 2020, 2:33 am Rainmeter is just not going to successfully resize a 16x16 image to 256x256. Nothing will really.
Not sure what software you use, but most stuff successfully resize images.
I'm not talking about the "quality" of the result, I'm talking about the antialiasing in the result.
A result without antialiasing should look like this:
Image
Not like what was given.
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: AntiAlias 0 not working properly

Post by jsmorley »

Sug wrote: August 5th, 2020, 2:42 am Not sure what software you use, but most stuff successfully resize images.
I'm not talking about the "quality" of the result, I'm talking about the antialiasing in the result.
A result without antialiasing should look like this:
Image
Not like what was given.
Right, I was talking about the "quality" when you resize such a small image. In any case, Rainmeter is just not good at that kind of resizing. I do think that antialiasing is unavoidable with images when resizing "up" with the method Rainmeter uses. I would really suggest resizing it in something else, and saving the larger file, then just use it as-is in Rainmeter.
Sug
Posts: 3
Joined: August 5th, 2020, 2:08 am

Re: AntiAlias 0 not working properly

Post by Sug »

jsmorley wrote: August 5th, 2020, 2:45 am Right, I was talking about the "quality" when you resize such a small image. In any case, Rainmeter is just not good at that kind of resizing. I do think that antialiasing is unavoidable with images when resizing "up" with the method Rainmeter uses. I would really suggest resizing it in something else, and saving the larger file, then just use it as-is in Rainmeter.
I see.
Appreciated.
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: AntiAlias 0 not working properly

Post by jsmorley »

I'd be interested in what software you used to scale up that 16x16 png image without getting "blurring".

If I download that hXB8u7B.png image from your first post, everything I use to zoom it to 256x256 pretty much looks like this:


1.jpg


I tried Photoshop and FastStone Image Viewer, both the same...

Edit: Ah, ok. I was able to get that by zooming with a "nearest neighbor" resize method. Yeah, not supported in Rainmeter.


2.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: AntiAlias 0 not working properly

Post by Yincognito »

jsmorley wrote: August 5th, 2020, 2:52 amEdit: Ah, ok. I was able to get that by zooming with a "nearest neighbor" resize method. Yeah, not supported in Rainmeter.
Yep, that was it. By the way, does Rainmeter have a method to do this or it's just some method baked in the functions you use in the code itself?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Brian
Developer
Posts: 2684
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: AntiAlias 0 not working properly

Post by Brian »

When we switched over to D2D rendering, we had to make a judgement call when rendering images and shapes.

In D2D, drawn images basically ignores anti-aliasing altogether and relies on a defined interpolation. Instead of using the nearest neighbor method, we chose the high quality cubic method which basically pre-downscales the image (if needed) then applies a cubic interpolation. This produces much better image quality. We planned on introducing an "interpolation" option for images at some point, but it has not come to fruition.

For the Shape meter, aliasing on vector graphics just looks terrible, especially when using transforms, so we chose to ignore the AntiAlias option altogether. I guess we could just default AntiAlias to 1 in this case, but I am not sure if that is very consistent with other AntiAlias options.

-Brian
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: AntiAlias 0 not working properly

Post by Yincognito »

Brian wrote: August 5th, 2020, 9:50 pm When we switched over to D2D rendering, we had to make a judgement call when rendering images and shapes.

In D2D, drawn images basically ignores anti-aliasing altogether and relies on a defined interpolation. Instead of using the nearest neighbor method, we chose the high quality cubic method which basically pre-downscales the image (if needed) then applies a cubic interpolation. This produces much better image quality. We planned on introducing an "interpolation" option for images at some point, but it has not come to fruition.

For the Shape meter, aliasing on vector graphics just looks terrible, especially when using transforms, so we chose to ignore the AntiAlias option altogether. I guess we could just default AntiAlias to 1 in this case, but I am not sure if that is very consistent with other AntiAlias options.

-Brian
Thanks for the info, Brian. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth