Creating high-quality screenshots from 8-16-bit games

The place to chat round the fire, share a tale, and just about anything else you'd like to do

Creating high-quality screenshots from 8-16-bit games

Postby Zucca » Thu Mar 12, 2009 8:07 pm

So. As some of you already know I'm trying to find a way to create high-quality screenshots.
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
Done. :) This creates Scale3x'd shot.
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
Basically i did this:
- 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:
Image
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. :)
Last edited by Zucca on Sat Mar 14, 2009 2:16 pm, edited 2 times in total.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby BenoitRen » Thu Mar 12, 2009 10:30 pm

OptiPNG will reduce the colour depth by itself if it notices that a lower depth is possible without losing any colour. The Sega Mega Drive allowed a maximum of 64 colours on the screen, so it fits into 8-bit colour depth nicely.
Get Xenoblade Chronicles!
User avatar
BenoitRen
Moderator
Moderator
 
Posts: 3122
Joined: Fri Jul 27, 2007 5:19 pm
Location: Belgium

Postby Zucca » Fri Mar 13, 2009 4:56 am

Yes. I use OptiPNG. :) It's quite a great tool.
But for smoothed shots I use pngnq to reduce the number of colors. So far it's the best ... hmm... "colorspace reducer" for pngs I've seen.

But if you use only Scale2x, or similiar, the colorspace will stay the same (maxium of 64-colors) trough resizing. Then you don't need to use pngnq. ;)
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby BenoitRen » Fri Mar 13, 2009 11:25 pm

By the way, you say 4-16 bit games in the thread title. You do know that 4-bit processors never existed, right? ;)
Get Xenoblade Chronicles!
User avatar
BenoitRen
Moderator
Moderator
 
Posts: 3122
Joined: Fri Jul 27, 2007 5:19 pm
Location: Belgium

Oopsie.

Postby Zucca » Sat Mar 14, 2009 10:50 am

BenoitRen wrote:By the way, you say 4-16 bit games in the thread title. You do know that 4-bit processors never existed, right? ;)
Hm. I thought that Commodore was 4-bit. :D

EDIT: Topic fixed.
Last edited by Zucca on Mon Apr 13, 2009 9:27 pm, edited 1 time in total.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby Semix » Sat Mar 14, 2009 1:43 pm

this sounds so hi-tech i have no idea what anyone is talking about
Image
User avatar
Semix
King Rappy
King Rappy
 
Posts: 686
Joined: Mon Feb 23, 2009 6:19 pm
Location: UK-Kent

Postby Zucca » Sat Mar 14, 2009 4:08 pm

I could also create a dos bat or wbs script to process shots to different kinds of resized shots.
I need to work on that later after I have decided which methods I plan to include...

HQ2-4x filters could provide smoothed conversion all alone without ImageMagick depency. Sounds good to me. :)

I'm still looking for sources of SuperScale2x which could provide all the functionalities I need for this project.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby Zucca » Tue May 05, 2009 5:22 pm

I haven't found the sources of SuperScale2x so I'll stick with Scale2x and I will create bash script for Linux to process screenshots. Later I'll provide vbs script or bat for Windows. More likely it will be bat.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby Zucca » Wed May 06, 2009 8:37 pm

Image
This is quite close to what I want.
I might combine HQ2x filter with Scale2x to get better results.

Until next time... \o
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby NYKgjl10 » Wed May 06, 2009 9:49 pm

Semix wrote:this sounds so hi-tech i have no idea what anyone is talking about


I'm with you on this issue :?
User avatar
NYKgjl10
Blastoid
Blastoid
 
Posts: 80
Joined: Wed Apr 08, 2009 7:02 pm
Location: Pasadena,CA

Postby Zucca » Thu May 07, 2009 4:15 am

NYKgjl10 wrote:
Semix wrote:this sounds so hi-tech i have no idea what anyone is talking about


I'm with you on this issue :?
All will be much clearer when I have developed the script that does this all. ;)
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Postby Semix » Thu May 07, 2009 11:57 am

Zucca wrote:
NYKgjl10 wrote:
Semix wrote:this sounds so hi-tech i have no idea what anyone is talking about


I'm with you on this issue :?
All will be much clearer when I have developed the script that does this all. ;)


Nope im still confuzzled :oops:
User avatar
Semix
King Rappy
King Rappy
 
Posts: 686
Joined: Mon Feb 23, 2009 6:19 pm
Location: UK-Kent

Postby ThugsRook » Thu May 07, 2009 3:53 pm

im confused too.

why not just render the image/game in high quality to begin with?
User avatar
ThugsRook
Blastoid
Blastoid
 
Posts: 126
Joined: Tue Mar 17, 2009 5:14 pm

Re: Oopsie.

Postby Abominae » Thu May 07, 2009 4:39 pm

Zucca wrote:
BenoitRen wrote:By the way, you say 4-16 bit games in the thread title. You do know that 4-bit processors never existed, right? ;)
Hm. I thought that Commodore was 4-bit. :D

EDIT: Topic fixed.


I thought so too...

I know where to find out for sure tho.


Type - Home computer
Release date - August 1982
Discontinued - April 1994
Operating system - Commodore BASIC 2.0
CPU - MOS Technology 6510 @
1.02 MHz (NTSC version)
0.985 MHz (PAL version)
Memory - 64 KByte RAM
Graphics - VIC-II (320 x 200, 16 colors, sprites, raster interrupt)
Sound - SID 6581 (3x Osc, 4x Wave, Filter, ADSR, Ring)
Connectivity - 2x Joystick, Power, Cartridge, RF, A/V, IEEE-488 Floppy/Printer, Digital tape, GPIO/RS-232
Abominae
 

Postby Zucca » Thu May 07, 2009 4:57 pm

ThugsRook wrote:im confused too.

why not just render the image/game in high quality to begin with?
The point here is to have a simple utility to scale up normal screenshots. Preferably one that scales more than one image at the time and uses all the CPUs available.
Most desirable result would be an image that's scaled up but no additional colors added. Scale2x offers such feature, but doesn't look good when scaling images over 4x magnitude.
My new avatar is scaled up this way, but later resized almost to it's original size.
I am NaN!
User avatar
Zucca
Neifirst
Neifirst
 
Posts: 1916
Joined: Sun Sep 23, 2007 7:06 pm
Location: Rasi, Kouvola, Finland

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron