Quality of scaled down pictures

We know by default a sprite scales with linear filter.
But for some reason, it is not as smooth when scaled down as when scaled up.
For example, this clown picture when scaled down to 66% and 34%, looks as if it is using nearest filter(but in fact it is not).
The right side of the image shows the results using mipmap feature. The 34% one looks a bit blurry but it is better than its counterpart.

I saw someone talked about low quality of scaling a while back. Their artist created resources for 1080p but in the end they decide to use a smaller resolution. They used show picture command to scale down the portrait and got the pixilated result like the clown.

tl;dr
Do you scale down pictures in your game? What is your solution?


Image_3252202058762601.png
Scaling down is never recommended because it is inevitably won't have the same number of details on it, like imagine you put 1 pixel of green color on 1080x1080 picture then scaling it down by 50% you will get a stretched pixel of green dot with lower opacity because it can't have put the same amount of detail in the smaller scale.

However, scaling it down in a scale that can be divisible by 4 will yield okay result as long it's not scaled down too much imo.
In my experience with MZ and other games that I have created mods or addons for (e.g.WoW, Baldur's Gate 3), scaling an image/texture down has a sweet spot. You can get some good results, and sometimes even try to play against any sort of compression that the game is doing, but the image tends to get more aliased at greater scaling factors as shown in your bottom-left image.

I don't know much about the specific behavior, but I imagine that the scaling is just more simplistic versus something like a graphics editor or even DSR/supersampling something with your GPU, both of which would have more complex resampling methods.

That being said, for my MZ project, I generally just cache and use the actor bust images as-is. So long as I'm not scaling them down to something like the size of an icon, they look just fine. Even moreso if they're presented as a part of something that's visually-cohesive. In your example, the aliasing is pretty stark... But your image also has a lot of black and white detailing, a black outline on a white background, and so on.

In short, if you want granular control over the resampling/aliasing of an image, sizing it beforehand in an image editor would be the more conventional approach. But maybe the conventional approach isn't what you're looking for?

Edit: Bitmaps in MZ do have a Smoothing property that can be toggled and would be worth playing with. I’m not sure whether or not the Show Picture code uses it. But I think you will still get visible aliasing / graininess at large scaling factors.
@Kenen Actually smooth is default setting. Show picture also uses it because the sprite is created using a bitmap.
The left one is using default settings, the right one is what looks like when I turn smooth off.
I zoom in the screenshots so you can see the difference.

1737554401641.png

Smooth, but barely.
What you're showing looks consistent to me with how a lot of browsers resize images. I had assumed bitmap smoothing was on by default, but wasn't certain. By default, you're going to get more of the artifacting/graininess/etc. at larger scaling jumps.

Depending on how badly you want to tackle this from a plugin perspective, you can find quite a bit of info on Stack Overflow where people have discussed this specific issue within the scope of Canvas.

I'm not sure how performant a plugin-based approach would be versus just planning your source image sizes around your expected use, but it might be a fun(-ish?) thing to work on.

Canvas also has an imageSmoothingQualityproperty, but I've never tested modifying it within MZ so I don't know if it would actually do anything beneficial.

Edit: I haven't looked at my MZ projects in a long time, but I tried a couple of quick tests with imageSmoothingQualityon Bitmap's ._createCanvasand it made no visual difference.

I still feel like your reference image is particularly problematic. I'm getting pretty good results blt'ing full size actor bust images directly onto colored bitmaps to create little chat avatars, like so:

nw_mMcVoHcksk.png


At 500% zoom:

Photoshop_mASij3oWXV.png


Not quite as aliased as what you have.
Oh I did looked into imageSmoothingQuality when I was using MV. If I understand correctly it only works in canvas mode. The property only has effect when you are using Bitmap.blt method (like you showed in your pictures), which use canvas. 👍
If I'm in a hurry or have a lot to do that don't matter tremendously I use Image Resizer for Windows. It's a free app that gives "Resize" as an right-click drop down menu option. Otherwise, I use linear reduction, then nudge up the contrast and gamma to regain a little of the lost crispness.

Original thread: https://forums.rpgmakerweb.com/threads/quality-of-scaled-down-pictures.174873/