Currently I use Scale2x cli tool and imagemagick to enlarge and enhance screenshots.
A simplest way to create a enlarged screenshot is to use Scale3x or Scale4x. You could also use Scale2x, but most of the emulators have Scale2x renderer already so you could just take the screenshot right there. ;)
I downloaded Scale2x (the project name also) sources from http://scale2x.sf.net/ .
I compiled the source (there are binaries too, if you don't want to install compilers) and used 'scalerx' executable.
Here are some examples how I did get best results:
First convert your shot to png (ImageMagic will provide 'convert' executable):
- Code: Select all
convert shot.bmp -quality 95 shot.png
Then use scalerx to enlarge your shot:
- Code: Select all
scalerx -r 3 -k 3 shot.png shot.png
Replace '-k 3' with '-k 4' to create Scale4x. '-r' is method switch and 3 seems to be the best, imo.
Then you can reduce the size (in disk) of the png by using few other tools, like pngcrush, optipng. Those tools will try to compress png even more. I, personally use pngnq (Linux only?) to reduce colors from png. Reducing colors will lower the size of png quite nicely. :) After reducing colors you can try to compress png with pngcrush or optipng, but what I have tested is that you can save only few tenths of a percent from the full size.
I brought this conversion a little bit farther by doing this (in Bash shell):
- Code: Select all
convert shot.bmp -quality 01 shot.png
for FOO in {1..4}; do scalerx -r 3 -k 2 shot.png shot.png; done
convert shot.png -colors 64 -filter Hermite -resize 10% -quality 01 shot_smooth.png
pngnq -f -s 1 shot_smooth.png
- 4x Scale2x (Seems to work better than 2x Scale4x. Don't know why...)
- resize to 1024x768 using Hermite -filter
- conversion to 8-bit colorspace to reduce the size in disk
And here's what I have done now:
The color reduction lowers the quality only a tiny bit. And I consider that worth when you can have the size of that png much smaller. I need to do more investigation on this. The Hermite filter doesn't add much colors to image but enough to reduce the quality when converting to 8-bit colorspace. This conversion might not be as good as this picture above when there's more colors in the shot already, when taking it. As I said: it need more testing. But at least I could create quite nice enlarged shots.
I'll be reporting more and I will post a short bash script that will handle the conversion automatically. Windows users must use Cygwin to have bash and some of the tools. But I belive it's fairly easy to create a DOS bat (or wbs script) to run 'scalerx' and 'convert' in series to convert the shots. :)