Author Topic: Are there any graphics apps/plugins that can reduce an image to integer scale?  (Read 262 times)

0 Members and 1 Guest are viewing this topic.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3838
Since I got some help from the forums about a specific graphical editing need before, I have another one that I hope can be solved...

Let's say I have a screenshot like this:


Specifically, this is from Mega Man 9, in the PC version of Mega Man: Legacy Collection 2.  This collection has a problem of not scaling with an integer scale, so the graphics aren't cleanly 1:1.  I believe they should be 256 x 224 of 256 x 240 like NES games should be, not 874 x 768.  And then Mega Man 10 screenshots are 922 x 767.  So weird.  The "pixels" aren't consistent in height or width, obviously if they were all perfect squares I could resize them down to 1:1 with no issue.

Now I have tried to use some "ReShade" thing I downloaded that's supposed to fix this problem, with setting for specific games, but I can't seemingly get it to work quite right.  That's a moot point though, as I'd like a more general fix for any screenshot like this from any game.  (Mega Man 9 and 10 have already been mapped by Revned, anyway, but I just want certain screenshots, is all.)

I imagine there must be a way for a dedicated tool, or perhaps a plugin, to compare each column to adjacent ones, and each row to adjacent ones.  If columns or rows are identical, then it could reduce them to just one row or column.  It might take multiple takes, but I would think that by the end what should remain is a 1:1 screenshot.

Does that make sense?  Is there already some way to do that in GIMP or Paint Shop Pro, or a plugin for Paint.net, or if not, could one be made?

Thanks in advance!

Offline eishiya

  • Newbie
  • *
  • Posts: 37
I've generally found it sufficient to use nearest neighbour scaling down to the 1x size. As long as the unevenly scaled image hasn't been cropped or unevenly scaled again, and doesn't include layers that have been misaligned after being unevenly scaled up, the sampling tends to line up such that you get back the original pixels. If the image has been cropped slightly, extruding the edges by an appropriate amount prior to scaling can help.

I included a bunch of caveats there - nearest neighbour scaling should work for situations where the image is scaled after being composited, or where all the component parts are scaled up nearest neighbour in exactly the same way, which is the usual case with emulators of retro consoles like the NES. Some modern games (and some emulators of 3D-capable consoles like the DS) use this sort of uneven scaling independently for different assets or do "subpixel" (relative to the 1x artwork size) alignment between layers/assets that causes what amounts to a mixture of pixel grids, and scaling the entire image cannot get a clean result. In such cases, I've found nothing that works better than separating the elements, scaling them independently, and re-compositing them. When I encounter such games (sadly quite common with modern pixel art games using general-purpose engines such as Unity), I generally either find a way to make them render 1x to begin with, treat it as a high-res game and don't aim for pixel accuracy, or, most frequently, don't map the game at all.