Back to Page
Revision 73 (current)
Edited by fsvgm777 on 8/4/2024 7:39 AM
__Screenshots__ are arguably second only to [EncoderGuidelines|encodes] in importance for a site publication - they are generally the first thing a viewer sees of a particular publication, well before watching it. As such, assigning quality screenshots to our publications is essential.
This page explains how to:
* Take screenshots from site-accepted emulators;
* Convert them to the PNG file format, normally used for our screenshots; and
* Make the resulting file as small as possible.
%%TOC%%
!! Snapshots from dumped AVI
It is the easiest method of doing so, especially in cases where you are preparing to, or have, encoded the video.
It is suggested that you dump the AVI to a lossless RGB based codec (Windows users can use the [http://camstudio.org/CamStudioCodec14.exe|CamStudio] or [http://lags.leetcode.net/codec.html|Lagarith] codecs, frequently used by our encoders; FFV1 can also be used if set to the BGR32 colorspace) and open the file in any player that can show the video in its original native resolution (for Windows users, VirtualDub is suggested). Find a frame that is publishable quality, screencap the screen (or the frame if the player supports it), crop the result properly and save it as a PNG in your favorite image editor.
----
!! Convert to PNG
BMP files should be converted into PNG format. You can use {{bmp2png}} downloadable at: [http://hp.vector.co.jp/authors/VA010446/b2p-home/index.html], or you can use an image manipulation program such as [http://www.gimp.org/|The GIMP].
If you are going to optimise your screenshot, however, leave it as a BMP; PNGOUT is perfectly capable of reading BMP files (see below).
----
!! Resolution
The screenshots should be of a certain resolution (depending on the system).
||System||Resolution||Alternative(s)||
|NES/FDS/SNES/SGB|256x224|256x240|
|N64|320x240|320x224|
|GC/Wii|320x240|384x216|
|VBoy|384x224|-|
|GB/GBC|160x144|-|
|GBA|240x160|-|
|DS|256x384|256x192|
|SMS|256x192|256x224|
|Genesis/SegaCD/32X|320x224 or 256x224|320x240 or 256x240||
|Saturn|320x240|-|
|GG|160x144|-|
|PSX|320x240|384x288 (PAL)|
|PCE/PCECD/PCFX|256x224|256x240|
|Lynx|160x102|-|
|NGP|160x152|-|
|WSWAN|224x144|144x224|
|Arcade|Variable (depends on game)|-|
|DOS/DOOM|320x200|320x240|
|MSX|320x240|-|
|Windows/Linux|Variable (respect game's aspect ratio)|-|
|Apple II|280x192|-|
|TI-83|96x64|-|
|A2600/A7800|320x224|320x262|
|INTV|176x208|-|
|Colecovision|256x192|-|
|Jaguar (CD)|326x240|260x240|
|CDi|384x288|-|
|TIC-80|240x136|-|
[TODO]: Update information with more platforms.
----
!! Resizing to account for proper aspect ratio correction (BizHawk using Saturnus and Nyma/Octoshock cores only)
The PSX and Sega Saturn output at a wide range of resolutions. As such, those screenshots need to be resized to the target resolution after accounting for aspect ratio correction specified above. The overscan ''must not be cropped out'' in the process. This can be done in any image manipulation program with the best resizer available. For image manipulation programs, we recommend paint.net (can use Fant or Supersampling) or GIMP (use Sinc (Lanczos3)).
!! Minimizing the file size
[TODO]: Update info. Shell script for PNG could be replaced with cross-platform [https://github.com/shssoichiro/oxipng|oxipng]. JPEG recompression via GIMP could be supplemented with [https://github.com/tjko/jpegoptim|jpegoptim] ([https://github.com/XhmikosR/jpegoptim-windows|Windows]).
Presently, there is a limit of 45k for screenshot files - this is primarily because there are some movie list pages which display large numbers of screenshots, and those can take a long time and a large amount of bandwidth to display as it is.
We generally prefer lossless screenshots, and the below techniques are usually sufficient to achieve file sizes well within the target range. For some systems (particularly 3D systems such as N64 and PSX) the images may be more complex than this; in those cases, we accept a certain degree of lossiness in screenshots. Historically, this has been in the form of JPEG screenshots saved with no subsampling and as high a quality setting as can be used while staying within that limit; more recently there has been an effort to use tools such as [http://bisqwit.iki.fi/source/animmerger.html|Animmerger] to reduce the colour palette of the image while still preserving the benefits of PNG as an image format. It is recommended that you contact a publisher before resorting to these means.
! General
We use [http://optipng.sourceforge.net/|OptiPNG] (to ensure the minimum amount of colours are stored in the PNG's palette) followed by [http://advsys.net/ken/utils.htm#pngout|PNGOUT] to compress our PNG files.
This algorithm outperforms programs such as [http://advancemame.sourceforge.net/comp-readme.html|AdvPNG] in almost all cases.
To get optimal compression, use several random trials (-r) and choose whichever result yields the smallest compression; the scripts and utilities below employ this approach. Alternatively, you can try using the first 15 powers of 2 in the block split threshold (-b) option for your trials; however in practice this has yielded worse results.
[https://web.archive.org/web/20131208161446/http://walbeehm.com/download/index.html|DeflOpt] ([http://www.jonof.id.au/forum/index.php?topic=1400|Linux/i386 version]) can be used optionally at the end to reduce the file just those few bytes more (it almost always does).
! Windows
Download the [https://github.com/TASEmulators/tastools/releases/download/1.0/ScreenshotCompress.zip|ScreenshotCompressor] from our [http://code.google.com/p/tastools/|TASTools project page], in addition to OptiPNG, PNGOUT and DeflOpt. Run your image through OptiPNG first, then follow the instructions packaged with the tool (it is as simple as drag and drop). This will use a configurable number of random trials in the spirit of the script in the Linux section below.
Optional reading:
There exists a [http://advsys.net/ken/util/pngout.htm|tutorial about PNGOUT]
for Windows users.
! Linux
Assuming you have {{optipng}}, {{pngout}}, and {{deflopt}} in your $PATH, you can run this shell script to compress pngs under Linux. Utilizes several random trials to get the best possible compression, more trials = more compression, works best on __uncompressed__ source bmps or png.):
Run as:
%%SRC_EMBED sh
./nameofscript.sh screenshot.png 100
%%END_EMBED
where:
* "screenshot.png" is the name of the screenshot you want to compress, and
* "100" is the number of random trials you want to test.
%%SRC_EMBED sh
#!/bin/bash
name=${1%.*}
cp $name.png $name-best.png
optipng $name-best.png
for (''''(i=1; i<=$2; i++)'''')
do
pngout -r -y $name.png $name-trial.png
DeflOpt $name-trial.png
du --bytes $name-best.png $name-trial.png | sort -n | awk 'BEGIN {ORS=" "} {print $2}' | xargs cp
done
%%END_EMBED
Note that PNGOUT can read BMP files directly. You don't need to convert them first. Also note that in some cases PNGOUT produces PNG files that don't work on all platforms (due to broken zlib implementations on those platforms); this is rare in practice.
! JPG
3D and other modern games usually have too complicated picture to fit into the 45kB limit allocated for a publication screenshot. This forces us to use JPG format instead of PNG, but still do some work to minimize the color loss.
Load up the image in GIMP, export it to JPEG. Then set preview to on, ''chroma'' to ''4:4:4'' and ''DCT'' to ''floating-point'' and adjust the quality (usually to the maximum that gives under 45kB).
* To make this process quick and portable, [user:feos] created [https://files.tasvideos.org/common/Wiki/Screenshots/ImageMagick-7.1.1-28-portable-Q16-x64.7z|an ImageMagick package] with a Windows Batch file, which you should drop the PNG file on, and it creates a JPG with minimal compression that's still under 45KB.