rekotoppm
Section: User Commands (1)
Updated: 10 Jun 2002
Index
Return to Main Contents
NAME
rekotoppm - convert a REKO/RKP cardset into a PPM image
rekotopng - convert a REKO/RKP cardset into a PNG image
rekotojpg - convert a REKO/RKP cardset into a JPG image
SYNOPSIS
rekotoXXX
[-image
<id>]
[-join]
[-text]
[-output
<filename>]
[-verbose]
[-quiet]
[-rgb]
[rekofile]
DESCRIPTION
Reads a REKO or RKP cardset.
Produces a Portable PixMap (rekotoppm), a Portable Network
Graphics (rekotopng) or a Joint Photographic Experts Group
image (rekotojpg) as output.
A REKO cardset is a proprietary (and undocumented?) multi
image file format which is used by the 'Klondike' solitaire program
to store the graphics of the cards used in the game. Klondike
derives from the Amiga platform but is also available for WinTel
systems today.
Since these two platforms differ in about everything, there are
also 2 major classes of cardsets, the REKO cardsets, which come
from the Amiga, and the RKP cardsets which come from the PC.
Typical file extensions for these cardsets are '.REKO' and '.RKP',
sometimes also lowercase.
There are different methods (and qualities) to store the cards
in a set, so we have 4 different graphics formats:
- Normal Amiga REKO cardsets
-
Up to 68 images, 1-8 bit color indexed, with a global 24bit RGB
palette.
- Amiga HAM REKO cardsets
-
Up to 68 images, using the Amiga's proprietary HAM technique
(Hold And Modify): The images are stored like either 6 or 8 bit color
indexed images (called HAM6 or HAM8) but only have a global palette
with 2 bits less (so only 16 or 64 24bit RGB color entries). The remaining
2 bits are used to switch between palette indexing and R, G, or B
"delta to former pixel" mode. This trick allows to store way more
colors in an image than bits are used, at the expense of some
graphics errors.
- PC RKP8 cardsets
-
57 images, 8 bit color indexed with a local palette for each image.
The palette consists of 256 16bit words which store a 3x5 bits RGB
color entry each.
- PC RKP16 cardsets
-
57 images, 16 bit per pixel (in fact 15bit) RGB encoded with no palette.
Each pixel consists of a 16bit word which stores a 3x5 bits RGB color value.
OPTIONS
- -image <id>
-
Choose which image(s) to create. There are 3 kinds of Amiga REKO cardsets,
TypeI (55 cards), TypeII (59 cards) and TypeIII (68 cards). The RKP cardsets
all have 57 cards. The images are reordered to simplify access for you.
Note that all cards are ordered clubs, diamonds, hearts, spades.
The image <id> can be one of these:
0
(the back of all cards)
1 ... 4
(A - aces)
5 ... 8
(2 - twos)
9 ...12
(3 - threes)
13...16
(4 - fours)
17...20
(5 - fives)
21...24
(6 - six's)
25...28
(7 - sevens)
29...32
(8 - eights)
33...36
(9 - nines)
37...40
(10 - tens)
41...44
(J - farmers)
45...48
(Q - queens)
49...52
(K - kings)
53...56
(Stack cards - TypeII+III, RKP8+16 only)
57
(REKO product. - TypeI+II+III only)
58
(Empty card - TypeI+II+III only)
59...67
(Preferences cards - TypeIII only)
all
(all of the above)
auto
(the ace of spades, this is the default)
You may pass multiple
-image
options, but read the
-output
description, if anything yields to the creation of multiple files.
- -join
-
Instead of creating multiple images as selected by the
-image
option create one single image and join all images in there. This is handy for
the creation of cardset overviews. The images are joined to a maximum of 8
cards per row and a maximum of 9 rows.
- -text
-
Additionally create a cardset description text file, containing all information
about the cardset structure. This is exactly what the
-verbose
option outputs to stderr. Read the
-output
description, since this option forces the creation of multiple files.
- -output <filename>
-
By default the image is sent to stdout. However, this does not make sense for multiple
image creation (sure, the ppm format supports this, but most applications which can read ppm
files do not open anything other than the first image). The <filename> will be used to create
the target filenames from. You may pass the target filename (i.e. 'foo.ppm') or the cardset
name ('foo.reko'), both will result in 'foo.ppm' for single image creation and 'foo.00.ppm'
to 'foo.67.ppm' for multi image creation. (replace .ppm with .png or .jpg in the last
sentence to describe the behaviour of the other executables). The text filename is also
derived from this option, it will be 'foo.txt'.
- -verbose
-
Same as
-text,
but output to stderr. Note that
-text
and
-verbose
don't exclude each others.
- -quiet
-
Surpress all output messages except fatal errors. This overrides
-verbose
but not
-text.
- -rgb
-
This option is only present to rekotopng. By default the images
will be created as lowest possible bit depth color indexed PNGs with original
palette. Using this option you can force the creation of 24 bit RGB images.
Note that HAM and RKP16 cardsets will always be converted to RGB images.
CGI USAGE
The programs can directly be used on webservers as cgi programs. You just need to copy
each program into your cgi-bin directory, and give it the file extension '.cgi'.
The idea is to transparently handle Amiga specific files for the WWW. Currently only
apache cgi usage is implemented and tested. The programs determine the cgi mode by
the presence of the both environment variables DOCUMENT_ROOT and REQUEST_URI, which
only are present .... TO BE CONTINUED :)
BUGS
hmmm...
SEE ALSO
ppm(5), ppmtoreko(1)
AUTHORS
Copyright (C) 2002 by Ralf Steines (metamonk@yahoo.com).
REKO format knowledge derived from 'sdiREKO-DT' (GPL).
Copyright (C) 1999 by Dirk Stoecker (stoecker@epost.de).
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- CGI USAGE
-
- BUGS
-
- SEE ALSO
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: GMT, April 07, 2003