EDIT: Downloads updated
I was thinking about the best way to scale pixel art. Obviously any non-integral scale factor will produce "bad" results, but I wanted to see if I could come up with something that was better than nearest sampling and linear interpolation. The idea I had was to essentially do anti-aliasing on the image: i.e. treat each pixel of the source image as a square polygon and then draw an output pixel by blending between the source image pixels in proportion to the area of the output pixel that they cover. Here's a result of that line of thought... I think it looks better than both linear and nearest sampling and I think I'm going to use it for my games.
You're going to need a 5.1 branch Allegro to compile this (5.1.6 snapshot works). The code and shaders are in public domain.
To run the example binary you're going to need the D3D runtime installed to use the D3D backend (if you play video games made in this century you'll have it installed most likely), otherwise use allegro.cfg to specify the OpenGL backend ([graphics] driver = opengl).
Left/Right - Switch the filtering method (nearest/linear/shader)
B - Toggle bitmap (Between a Sūpā Metoroido screenshot I lifted from Wikipedia and a pixel grid pattern)
Window border - You can resize the window!
EDIT: There was a bug in the shader code that made the output not be identical to nearest filtering for integral scale factors. It is now fixed, I think.
EDIT2: Sample from the center of the pixel, not from the corner. Hopefully fixing the variability in output across platforms.