blob: 1be180afca8f10494d6c7443ed0e6524132e1635 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
PNG8
====
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License (Version 3) for more details.
Usage:
------
png8 <options> <file> -- convert a file
Options
-------
General switches:
-h - Help text.
One of these switches must be provided:
-1 - Produce a monochrome sprite data set (e.g. Spectrum).
-4 - Produce a 4-colour sprite data set (e.g. Commodore 64).
Optional switches:
-b - Don't treat black the same as a transparent pixel.
-p <text> - Use <text> in place of 'byte' for output.
-s - For monochrome data, produce pre-shifted values.
-w <width> - Set the sprite width to <width>. This must be a multiple of 8.
-d - Don't use double-width pixels in 4 colour mode.
-c0 - Set colour 0 to RGB value RRGGBB, expressed as a hex number.
-c1 - Set colour 1 to RGB value RRGGBB, expressed as a hex number.
-c2 - Set colour 2 to RGB value RRGGBB, expressed as a hex number.
-c3 - Set colour 3 to RGB value RRGGBB, expressed as a hex number.
Instructions
------------
PNG8 processes a sprite image strip and produces output that should be
compatible with most 8-bit assemblers.
For monochrome images it produces 1-bit per pixel output, where any pixel that
is transparent or black (by default; this can be disabled with the -b switch)
is treated as a clear bit in the generated output. Other pixels are treated as
a set bit.
For 4-colour images it generates bit patterns "00" for colour 0 (default black),
"01" for colour 1 (default red), "10" for colour 2 (default green) and "11" for
colour 3 (default blue).
The colours used can be controlled by the switches -c0 to -c3. Note that in
reality anything that is not colour 1, 2 or 3 is treated as colour 0.
4-colour mode assumes that pixels are double width as well (like on the C64).
To disable that use the -d switch.
# vim: spell
|