A pixel art image originally has a consistent resolution with its grid size. However, in our case, this image may be upscaled using nearest neighbor upscaling to an arbitrary size (like 16x16 to 200x200), eg, a grid may contain 10 pixels. Our goal is to retain the original grid size of this image, ie, the exact number of grids.
Is there any way to do this? This seems to be a simple image processing problem, but I cannot figure out an effective solution. A fact of nearest neighbor upscaled pixel art is that the color distribution remains the same.
Thanks for your help.
Well, the way I see it, there are essentially two cases :