RP9 Preview Images (Thumbnails)
TOPIC
This document explains how to create RP9 content preview images (thumbnails).
DISCUSSION
RP9 files may contain one or more application preview images, for display by playback software and in other contexts (preview thumbnails, directory listings, etc.)
Preview image files must be in PNG format, with square pixels, i.e. with a ratio of 1:1. Raw PAL pixel grabs are acceptable, but NTSC grabs are not, due to their "tall" pixel ratio (10:11).
The name of the default preview image inside the RP9 container is "rp9-preview.png". For games and demoscene productions, this image should be a meaningful and memorable "in-game" shot (not a title screen or box shot).
It is also possible to include a title screen image, named "rp9-title.png". For games and demoscene productions, this image should show the title of the application as displayed on screen, or whatever comes closest to it. "rp9-title.png", if present, should be in the same size as "rp9-preview.png" (which must be present).
The color depth of the image should either reflect the original (e.g. palette-based 256 colors or less), or be true color. If the image is resized, it is highly recommended to convert it to true color before resizing it, and then save it as true color.
Supported bitmap sizes are:
- 640x480 (use only if this is the original "1X" format, not if upscaled)
- 320x240 (recommended, unless upscaled)
- 160x120
These sizes reflect the universal 4:3 standard-definition TV format (both PAL and NTSC) rendered with square pixels (as is common on computer screens). Implementations like RetroPlatform Player should and will automatically convert between 640x480, 320x240 and 160x120 as necessary.
When processing existing images, it may be necessary to take into account ratio distortions and bars at the top and bottom. For example, some popular C64 game screenshot archives use 320x200 images, which is usually based on NTSC data, but can't be rendered properly on 1:1 displays, so it often results in stretched images. Conversely, some popular Amiga archives use 320x256 images, expecting PAL content, and adding black bars at the top or bottom if the source was NTSC.
An automated import procedure that takes into account existing variations could be something like the following:
- If the source is a "double barrel" image (simple check for a frequent scenario: exactly 640x256; longer check: width/height >= 2.5 unless hires non-interlace): the right half is processed into "rp9-preview.png" (unless entirely black), and the left half is processed into "rp9-title.png" (unless entirely black or identical to the right half)
- If the source image is 640x480, 320x240 or 160x120 don't do anything, just keep it as is (unless it has obvious distortions or overscan areas)
- In all other cases, convert it to true color before resizing it (unless a perfect crop without resize can be achieved); there is always a loss of quality in resizing, so resize only if necessary, and be sure to pick a good resize algorithm (e.g. bicubic)
- If the source is exactly 320x200 (frequent scenario): resize it to 320x240 or 160x120, without preserving the original ratio (just stretch it to the target size)
- If the source is exactly 320x256 (frequent scenario): if there are same-color bars at the top and bottom (320x8 each), cut the central 320x240 part; after this optional step, resize (with stretch, as before) whatever is left (i.e. 320x256 or 320x240) to 320x240 or 160x120 as necessary
- If the image is still not 640x480, 320x240 or 160x120, crop external same-color (presumed overscan) areas, resize down (maintaining ratio) to 640x480, 320x240 or 160x120, and apply black bars to make it exactly 640x480, 320x240 or 160x120
- Exceptions: sources known to be NTSC ("tall pixels") and/or hires non-interlace modes ("double width") need to be resized to the square-pixel destination format taking into account their original ratio
The image import feature of RetroPlatform Player (as used in Amiga Forever and C64 Forever 2010.1 and higher) actually employs a similar algorithm when the image is not already in a supported format. The format conversion can also be invoked from the command line:
RPHost.exe -SetPreview <source.png|bmp|gif|jpg> <destination.png> In many occasions common sense has to be used, for example because the screenshot contains what should be a circle (which is a good indication of the target ratio), or because stretching can be avoided by just cutting a few scanlines.
Related Links
ARTICLE INFORMATION
| Article ID: | 19-108 |
|---|---|
| Platform: | All |
| Products: | RetroPlatform Player |
| Additional Keywords: | None |
| Last Update: | 2010-06-30 |
It is safe to link to this page.