Search code examples
unity-game-enginepngchessimage-size

How to scale 386*389 png image to 20*20 in pixels


I am creating a chess game in unity and need my pieces to be 20*20.

I currently have a chess king (png file) that is 386 by 389 pixels and when I try to resize it it gets all blurry.

I have tried using Gimp scale image and IrfanView to no avail.

Can anyone help?

This is the image in case that's helpful. https://i.sstatic.net/lkUp9.png

Edit: I made the board bigger and my pieces bigger so I could avoid "pixel space"


Solution

  • I'm not saying it's impossible to algorithmically scale to that size without blurriness, but I've never seen a scaling algorithm that would do a good job. At 20x20 pixels, you are in the "pixel art" realm, where you'd need to manually set pixels to get good results.

    The reason I doubt a scaling algorithm will do well with this task, is that it requires judgment on what details are important to express. E.g. The tines on a queen's crown are meaningful as iconography, because humans have seen enough crowns to know that pointy bits on the top are what make its "crownliness".

    I would put on the "pixel artist" hat or hire one. Use the scaled down image as a guide. Create an extra layer on top of it. Fill in your black pixels first, and then in a second pass, add grey or mid-opacity pixels to the jagged edges to smooth. You've only got a dozen pieces to do. ;)