comparison README.txt @ 1913:cdf95a4d5282

Update gfxconv documentation, and fix the various mistakes and obsolete information that has crept in.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 27 Jun 2018 13:30:47 +0300
parents 4bb3d10328a9
children 73c513f536d0
comparison
equal deleted inserted replaced
1912:8d006508e6c1 1913:cdf95a4d5282
164 164
165 gfxconv 165 gfxconv
166 ------- 166 -------
167 Utility for "dumping" and converting various graphics in plain 167 Utility for "dumping" and converting various graphics in plain
168 ASCII, or ANSI colored output, or into various image formats 168 ASCII, or ANSI colored output, or into various image formats
169 (including PNG, PCX, PPM, IFF ILBM and ARAW files). 169 (including PNG, PCX, PPM, IFF ILBM and RAW/ARAW files).
170 170
171 Input can also be interpreted as bitmap, sprite or character data, 171 Input can also be interpreted as bitmap, sprite or character data,
172 in multicolor or single color. Colors can be mapped as desired. 172 in multicolor or single color. Colors can be mapped as desired.
173 Image file output can be either single image (with chars/sprites 173 Image file output can be either single image (with chars/sprites
174 placed vertically if input is char/sprite data), or in separate 174 placed vertically if input is char/sprite data), or in separate
211 gfxconv 211 gfxconv
212 ------- 212 -------
213 213
214 Convert IFF ILBM format image to RGBA/32bit PNG: 214 Convert IFF ILBM format image to RGBA/32bit PNG:
215 215
216 $ gfxconv -f png -o output.png input.lbm 216 $ gfxconv -o output.png input.lbm
217 217
218 218
219 Convert IFF ILBM format image to indexed/paletted PNG: 219 Convert IFF ILBM format image to indexed/paletted PNG:
220 220
221 $ gfxconv -f png -o output.png input.lbm -P 221 $ gfxconv -o output.png input.lbm -P
222 222
223 223
224 Convert DrazPaint format C64 bitmap image to indexed/paletted PNG: 224 Convert DrazPaint format C64 bitmap image to indexed/paletted PNG:
225 225
226 $ gfxconv -f png -o output.png input.drp -P 226 $ gfxconv -o output.png input.drp -P
227 227
228 228
229 Convert DrazPaint format C64 bitmap image to unpacked Koala Painter format: 229 Convert DrazPaint format C64 bitmap image to unpacked Koala Painter format:
230 230
231 $ gfxconv -f kla -o output.png input.drp 231 $ gfxconv -o output.kla input.drp
232
233 NOTE: Desired output format is detected from the filename extension,
234 but if you wish to use "non-standard" filename(s), you can specify the
235 output format via option "-f", e.g. "-f kla", "-f png" etc.
232 236
233 237
234 Image input to C64 char font conversion: 238 Image input to C64 char font conversion:
235 239
236 $ gfxconv font16x16.pcx -f chr -o font16x16.chr 240 $ gfxconv font16x16.pcx -o font16x16.chr
237 241
238 - Input file "font16x16.pcx" is a paletted PCX image (preferably 2 colors), 242 - Input file "font16x16.pcx" is a 2-color indexed/paletted PCX image,
239 containing a 16x16 pixel font. 243 containing a 16x16 pixel font.
240 - "-f chr" specifies conversion to c64 char memory format, gfxconv 244
241 splits the input image to 8x8 blocks, outputting them in sequence. 245 "Chr" (.chr or "-f chr") specifies conversion to c64 char memory format,
246 gfxconv splits the input image to 8x8 blocks, outputting them in sequence
247 to the output file.
242 248
243 249
244 Convert input image to IFFMaster ARAW + assembler include file, 250 Convert input image to IFFMaster ARAW + assembler include file,
245 while remapping some palette entries: 251 while remapping some palette entries:
246 252
249 - "-R #000000:0" remaps all input image palette colors matching RGB 255 - "-R #000000:0" remaps all input image palette colors matching RGB
250 hex triplet #000000 to palette index 0. 256 hex triplet #000000 to palette index 0.
251 - "-f araw" specifies output format to be IFFMaster ARAW. 257 - "-f araw" specifies output format to be IFFMaster ARAW.
252 - "-B 3" _clamps_ output to be 3 bitplanes. Any bits above those are 258 - "-B 3" _clamps_ output to be 3 bitplanes. Any bits above those are
253 simply discarded. 259 simply discarded.
254 260 - The assembler include file will be "output.inc" in this case.
255 261
256 Single color C64 char font to PNG imge conversion: 262
257 263 Single color C64 char font to PNG image conversion:
258 $ gfxconv chars1.fnt -i chr:sc -s 2 -S 10 -c 255:1 -f png -o chars1.png 264
265 $ gfxconv chars1.fnt -i chr:sc -s 2 -S 4 -c 255,1 -n 256 -o chars1.png
259 266
260 - Input file is "chars1.fnt" 267 - Input file is "chars1.fnt"
261 - "-i chr:mc" specifies that input is interpreted as single color chars. 268 - "-i chr:sc" specifies that input is interpreted as single color chars.
262 - "-s 2" skips first two bytes of the input file (loading address) 269 - "-s 2" skips first two bytes of the input file (loading address)
263 - "-S 10" scales output image to be 10 times larger 270 - "-S 4" scales output image to be 5 times larger
264 - "-c 255:1" defines background color (bit value 0) to be transparent 271 - "-c 255,1" defines background color (bit value 0) to be transparent
265 (255, only works for PNG) and foreground to be C64 color 1 (white) 272 (255, only works for PNG) and foreground to be C64 color 1 (white)
266 - "-f png" sets output format to PNG 273 - "-n 256" specifies that up to 256 items (characters) worth of data
274 from input will be processed.
275
276 By default the output image will be "vertical", e.g. each character will
277 be subsequently below previous. If you specify a width via "-w <n>" option,
278 the output will be <n> items (characters) wide, extending down as many rows
279 as it will take to fill "-n 256" items.
267 280
268 281
269 Extract sprites from a C64 memory dump, convert to PNG: 282 Extract sprites from a C64 memory dump, convert to PNG:
270 283
271 $ gfxconv bub_dump.raw -i spr:mc -s 0x5800 -n 20 -f png -o bub \ 284 $ gfxconv bub_dump.raw -i spr:mc -s 0x5800 -n 20 -f png -o bub \
275 extracted via VICE in game running mode. 288 extracted via VICE in game running mode.
276 - "-i spr:mc" sets input to be interpreted as multicolor sprite data 289 - "-i spr:mc" sets input to be interpreted as multicolor sprite data
277 - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the 290 - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the
278 input is a straight memory dump file. 291 input is a straight memory dump file.
279 - "-n 20" sets max item count to 20, so 20 sprites will be dumped. 292 - "-n 20" sets max item count to 20, so 20 sprites will be dumped.
293 - "-f png" sets output format to PNG, required because next option
294 does not specify a filename extension.
280 - "-o bub" sets filename prefix to "bub" 295 - "-o bub" sets filename prefix to "bub"
281 - "-q" selects sequential output (separate files) 296 - "-q" selects sequential output (separate files)
282 - "-c 255:2:5:1" sets the multicolor color mappings 297 - "-c 255:2:5:1" sets the multicolor color mappings
283 (255 is the transparency color again) 298 (255 is the transparency color again)
284 299