1GRFCodec(1)               BSD General Commands Manual              GRFCodec(1)
2

NAME

4     GRFCodec — A tool to convert a GRF file into graphics files and meta
5     data, and vice versa.
6

SYNOPSIS

8     grfcodec [-sv] [-d | -e] [options] GRF‐file [Directory]
9
10              <GRF‐File> denotes the .GRF file you want to work on, e.g.
11              TRG1.GRF
12
13              <Directory> is where the individual sprites should be saved. If
14              omitted, they will default to a subdirectory called sprites/.
15

OPTIONS

17     -?          Display the help message.
18
19     -e          Encode a GRF file. The GRF‐file to pass is the file where to
20                 encode to. The source of the GRF‐file, i.e. the .nfo, will be
21                 looked for in sprites/GRF‐file.nfo.  All graphics files will
22                 be searched for relative from the location of the GRF‐file.
23
24     -d          Decode a GRF file. The GRF‐file to pass is the file to
25                 decode. The result will be in sprites/GRF‐file.nfo and
26                 sprites/GRF‐file.png.
27
28     -s          Silences the progress output in interactive mode
29
30     -v          Display the version.
31
32     Options for decoding:
33
34     -w num      Write spritesheets files with the given width (default 800,
35                 minimum 16)
36
37     -h num      Split spritesheets when they reach this height (default no
38                 limit, minimum 16)
39
40     -b num      Organize sprites in boxes of this size (default 16)
41
42     -o ssf      Sets the format of generated spritesheets.  See -o ? for a
43                 list.
44
45     -p pal      Use this palette instead of the default.  See -p ? for a
46                 list.
47
48     -t          Disable decoding of plain text characters as strings.
49
50     -x          Disable production of unquoted escape sequences.
51
52     -xx         Disable production of both quoted and unquoted escape
53                 sequences.
54
55                 This has the side effect of producing a version 6 .nfo,
56                 instead of a version 7 .nfo.
57
58     -X          List sprite numbers in the image file in hex.
59
60     Options for encoding:
61
62     -c          Crop extraneous transparent blue from real sprites
63
64     -u          Save uncompressed data (probably not a good idea)
65
66     -q          Suppress warning messages
67
68     -g num      Create a GRF file with the given container version. Valid
69                 versions are 1 and 2, where the latter allows bigger sprites,
70                 larger sounds, and multiple zoom levels and bit depths for
71                 the sprites.
72
73     -n          Try both compression algorithms and use the most efficient.
74                 This might cause trouble when loading the NewGRF in TTDPatch.
75
76     Options for both encoding and decoding:
77
78     -m num      Apply colour translation to all sprites except character‐
79                 glyphs.
80
81     -M num      Apply colour translation to all sprites.
82
83                 If both of these are specified, only the last is obeyed.  -m
84                 ? or -M ? for a list of colour translations.
85

SEE ALSO

87     The documentation in /usr/share/doc/grfcodec/
88

AUTHOR

90     GRFCodec was written by Josef Drexler.
91
92     This manual page was written by Remko Bijker.
93
95     GRFCodec is Copyright (C) 2000‐2005 by Josef Drexler <josef@ttdpatch.net>
96
97                               February 24, 2012
Impressum