1RGBGFX(1) BSD General Commands Manual RGBGFX(1)
2
4 rgbgfx — Game Boy graphics converter
5
7 rgbgfx [-DfFhPTv] [-o outfile] [-d depth] [-p palfile] [-t mapfile]
8 [-x tiles] file
9
11 The rgbgfx program converts PNG images into the Nintendo Game Boy's pla‐
12 nar tile format. The arguments are as follows:
13
14 -D Debug features are enabled.
15
16 -f Fix the input PNG file to be a correctly indexed image.
17
18 -F Same as -f, but additionally, the input PNG file is fixed to have
19 its parameters match the command line's parameters.
20
21 -d depth
22 The bitdepth of the output image (either 1 or 2). By default,
23 the bitdepth is 2 (two bits per pixel).
24
25 -h Lay out tiles horizontally rather than vertically.
26
27 -o outfile
28 The name of the output file.
29
30 -p palfile
31 Raw bytes (8 bytes for two bits per pixel, 4 bytes for one bit
32 per pixel) containing the RGB15 values in the little-endian byte
33 order and then ordered from lightest to darkest.
34
35 -P Same as -p, but the pallete file output name is made by taking
36 the input filename, removing the file extension, and appending
37 .pal.
38
39 -t mapfile
40 If any tiles are the same, don't place the repeat tiles in the
41 output file, and make a tilemap file.
42
43 -T Same as -t, but the tilemap file output name is made by taking
44 the input filename, removing the file extension, and appending
45 .tilemap.
46
47 -u Truncate repeated tiles. Useful with tilemaps.
48
49 -v Verbose. Print errors when the command line parameters and the
50 parameters in the PNG file don't match.
51
52 -x tiles
53 Trim the end of the output file by this many tiles.
54
56 The following will take a PNG file with a bitdepth of 1, 2, or 8, and
57 output planar 2bpp data:
58
59 $ rgbgfx -o out.2bpp in.png
60
61 The following creates a planar 2bpp file with only unique tiles, and its
62 tilemap out.tilemap:
63
64 $ rgbgfx -T -u -o out.2bpp in.png
65
66 The following will do nothing:
67
68 $ rgbgfx in.png
69
71 rgbds(7), rgbasm(1), rgblink(1), rgbfix(1), gbz80(7)
72
74 rgbgfx was created by stag019 to be included in RGBDS. It is now main‐
75 tained by a number of contributors at .:
76 https://github.com/rednex/rgbds
77
78RGBDS Manual April 17, 2017 RGBDS Manual