Mercurial > hg > dmlib
changeset 1868:4bb3d10328a9
Update gfxconv usage examples.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 24 Jun 2018 17:35:32 +0300 |
parents | 15cbf17a8ea6 |
children | 1067df067f28 |
files | README.txt |
diffstat | 1 files changed, 45 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/README.txt Sun Jun 24 17:35:02 2018 +0300 +++ b/README.txt Sun Jun 24 17:35:32 2018 +0300 @@ -211,16 +211,31 @@ gfxconv ------- -Convert ILBM IFF to PNG: +Convert IFF ILBM format image to RGBA/32bit PNG: $ gfxconv -f png -o output.png input.lbm +Convert IFF ILBM format image to indexed/paletted PNG: + +$ gfxconv -f png -o output.png input.lbm -P + + +Convert DrazPaint format C64 bitmap image to indexed/paletted PNG: + +$ gfxconv -f png -o output.png input.drp -P + + +Convert DrazPaint format C64 bitmap image to unpacked Koala Painter format: + +$ gfxconv -f kla -o output.png input.drp + + Image input to C64 char font conversion: $ gfxconv font16x16.pcx -f chr -o font16x16.chr - - Input file "font16x16.pcx" is a paletted PCX image (preferably 2-colors), + - Input file "font16x16.pcx" is a paletted PCX image (preferably 2 colors), containing a 16x16 pixel font. - "-f chr" specifies conversion to c64 char memory format, gfxconv splits the input image to 8x8 blocks, outputting them in sequence. @@ -229,7 +244,7 @@ Convert input image to IFFMaster ARAW + assembler include file, while remapping some palette entries: -$ gfxconv -R "#000000:0" -f araw -i image -B 3 input.png -o output.raw +$ gfxconv -R "#000000:0" -f araw -B 3 input.png -o output.raw - "-R #000000:0" remaps all input image palette colors matching RGB hex triplet #000000 to palette index 0. @@ -238,11 +253,12 @@ simply discarded. -C64 char font to PNG imge conversion: +Single color C64 char font to PNG imge conversion: -$ gfxconv chars1.fnt -i char -s 2 -S 10 -c 255:1 -f png -o chars1.png +$ gfxconv chars1.fnt -i chr:sc -s 2 -S 10 -c 255:1 -f png -o chars1.png - - Input file "chars1.fnt" is interpreted as character data (-i char) + - Input file is "chars1.fnt" + - "-i chr:mc" specifies that input is interpreted as single color chars. - "-s 2" skips first two bytes of the input file (loading address) - "-S 10" scales output image to be 10 times larger - "-c 255:1" defines background color (bit value 0) to be transparent @@ -252,26 +268,33 @@ Extract sprites from a C64 memory dump, convert to PNG: -$ gfxconv bub_dump.raw -i s -s 0x5800 -n 20 -f png -o bub \ - -q -S 3 -m -c 255:2:5:1 +$ gfxconv bub_dump.raw -i spr:mc -s 0x5800 -n 20 -f png -o bub \ + -q -S 3 -c 255:2:5:1 - - Input file "bub_dump.raw" is a raw memory dump of Bubble Bobble - extracted via VICE in game running mode. - - "-i s" sets input to be interpreted as sprite data - - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the - input is a straight memory dump file. - - "-n 20" sets max item count to 20, so 20 sprites will be dumped. - - "-o bub" sets filename prefix to "bub" - - "-q" selects sequential output (separate files) - - "-m" selects multicolor input - - "-c 255:2:5:1" sets the multicolor color mappings - (255 is the transparency color again) + - Input file "bub_dump.raw" is a raw memory dump of Bubble Bobble + extracted via VICE in game running mode. + - "-i spr:mc" sets input to be interpreted as multicolor sprite data + - "-s 0x5800" skips 0x5800 bytes, basically the memory address as the + input is a straight memory dump file. + - "-n 20" sets max item count to 20, so 20 sprites will be dumped. + - "-o bub" sets filename prefix to "bub" + - "-q" selects sequential output (separate files) + - "-c 255:2:5:1" sets the multicolor color mappings + (255 is the transparency color again) -$ gfxconv chars3.fnt -i c -s 2 -n 3 +Dump ANSI colour ASCII output of the same dump file as above: + +$ gfxconv bub_dump.raw -i spr:mc -s 0x5800 -n 5 -f ansi + + - "-f ansi" sets output format to ANSI - Dump as character data into stdout, skipping 2 bytes at start, and - limit output to 3 items (characters). + +Dump as character data into stdout, skipping 2 bytes at start, and +limit output to 3 items (characters). + +$ gfxconv chars3.fnt -i chr:sc -s 2 -n 3 + ---- : -------------- #0 0002 : ........