Re-size image without quality loss?

Hello,

I’m making artwork for a friend’s game being made in Game Maker Studio 2, and my drawing/canvas is 3000 x 3000 px in Krita (5.1.1). The artwork is being used for character profile cards at the bottom of the screen, with a health bar and stats beside it. Problem is, I need to shrink my image size by 8x for the character portrait to fit into the game, otherwise my friend has to manually drag and resize the png image to fit - but this creates very jagged outlines.

I’ve done some reading and the only way seems to be to scale the image to new size in Krita - I’ve tried scaling by pixels and percentage but both seem to have significant quality loss (understandable). Is there any method for scaling images down and retaining the quality? Just not sure if there’s anything I can do on the Krita-side of things, don’t know if anybody knows anything about Game Maker Studio 2 if there’s something that can be done there - I imagine when they initially program the game it would be ideal to set their canvas size to a higher definition to be able to import higher quality art.

Anyway, any thoughts or tips are greatly appreciated, thank you.

Maybe you give RIOT a try. That is a software mainly used to reduce file-sizes, but for pictures in 3k pixel by 3k pixel it offers to reduce the dimensions of the files too. Its batch-processor offers this for any picture, regardless of the initial dimensions. What I like with RIOT is the preview in single picture-mode. This allows to optimize the settings and to see what you’ll get. It has a lot of algorithms for GIF, JPG and PNG-Pictures.

Otherwise, I can recommend IrfanView. If you reduce picture for picture or use the batch-processor is up to you.

In my eyes, the results are very good with both.

The links to both can be found here:

You can reduce the dimension of a picture also in Krita. Krita offers most of the algorithms you can find in RIOT and IrfanView, perhaps more, the results are also very good and on the same level as with the two above, but Krita has no batch processing facility as far as I know.
It can be that a plugin for Krita has a batch-processor, I think “Imagine Board” by @EyeOdin is a good candidate and could have such, but that is only a guess, and if it has, I can’t say if it uses Krita and its algorithms or has an own implementation for the task.

By the way, regardless of what you will use in the end, I would at first try to reduce the size using the Lanczos3-Algorithm, in most cases it gives superb results.
And you’ll have of course a loss of quality by this resizing-factor, but that does not mean it has to look bad.
In Krita do “Image” → “Scale Image To New Size”

Michelist

I downscale images a lot. Three things can happen:

  1. Blurry
  2. Pixelated
  3. Sharp

What you don’t want is blurry or pixelated but smooth / sharp when downscaling, I usually go with “Lanczos 3.” You’ll have to experiment and find out what works for your particular case. Here’s one interesting case study for Hanning resampling: Hanning filter - XnView Software . XnConvert has Hanning.

1 Like

Regardless of what you try downsizing an image from 3000 px² to 375 px² without quality loss is impossible or would at least require some sort of dark magic because it’s a los of almost 90% of informations that are simply gone. Exceptions are only certain types of pixel art maybe or when the original image was already that small at one point.

The only way you can scale seamlessly is by doing vector art instead but the game engine probably still make it look pixelated, depending how it renders it. But vector is basically your only option if you’re looking for a perfectly scalable solution.

1 Like

Hello, are you sure the reduction by 8 is correct? That’s 3000/8 = 375 px, which is very small. I would expect a resolution this small to only make sense with pixel art maybe? Even phones these days have much bigger resolutions, right?

I would recommend your friend to prepare for you a placeholder art at correct resolution, something like a silhouette of the hero that is sized just right, so that you can prepare your artwork matching that ref. For best results, it’s ideal if the game engine doesn’t do any scaling, just display the artwork directly.

For best scaling result, I would follow this method:

  1. Keep your original full res image as a master copy for any further edits.
  2. Export to png (this will flatten all layers)
  3. Open that png and use “Scale Image To New Size”. Whether you use % of direct pixel size does not matter, it’s only a way of specifying the desired size. If you have a placeholder art, you can just specify the target resolution directly (e.g. width).
  4. Experiment with filtering options, but the default Auto (Bicubic) should be fine probably. You can also try adding a post-resize filtering, e.g. a subtle sharpening.

If your target portrait ref is not square, then naturally you should first crop your high-res image to the correct aspect ratio.

The problem with a such a big reduction is that what looked okay at full res may no longer work at 300’ish pixels. If such an extreme size differences are needed, it may be better to redraw your artwork at a closer resolution, say, double of the target resolution (in width/height), so that you only need to resize to 50% for a clean final result.

1 Like

I had thought about it but I never ended up making something like that because natron does those things pretty good already and you also have BIMP so I never thought it would even have space to be a thing.

The alternative to BIMP on Krita should be Actuator that I wanted to create but then I kinda lost interest into the topic.

But Imagine boards Batch operator is so nice honestly compared to all of them, just dropping things in to work. so less fuss. maybe a thing where you write your python script and the batch operator simply runs it on every single image.


As for the quality loss while reducing I don’t think there is much that can be done with it. It is reducing pixel size so detail will disappear.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.