unifont-7.0.01.tar.gz
[unifont.git] / man / unipng2hex.1
1 .TH UNIPNG2HEX 1 "2013 Nov 09"
2 .SH NAME
3 unipng2hex \- Portable Network Graphics to GNU Unifont .hex file converter
4 .SH SYNOPSIS
5 .br
6 .B unipng2hex
7 -i
8 .I input_file.png
9 [-o
10 .I output_file.hex
11 ] [-w
12 .I width
13 ]
14 .SH DESCRIPTION
15 .B unipng2hex
16 reads a PNG file produced by
17 .B unihex2png
18 before or after editing, and converts it back into a Unifont .hex format
19 file.  The PNG file contains a block of 256 Unicode code points
20 arranged in a 16 by 16 grid.  Each code point appears in a 32 by 32 or a 40
21 by 40 pixel grid.  Characters are either 16, 24 or 32 pixel rows high,
22 depending on the "-r" parameter specified by
23 .B unihex2png.
24 They can be 8, 16, 24, or 32 pixel columns wide (widths of 32 are only
25 supported for 32 pixel row tall characters).
26 .SH OPTIONS
27 .TP 12
28 -i
29 Specify the input file.
30 .TP
31 -o
32 Specify the output file.  If omitted, a file in the Unifont .hex format
33 is written to STDOUT.
34 .TP
35 -w width
36 Specify the minimum width of the output glyphs.  Valid values are 16, 24,
37  and 32.  The default is no minimum width.
38 .TP
39 -h 
40 Print a help message of options and exit.
41 .SH EXAMPLE
42 Sample usage:
43 .PP
44 .RS
45 unipng2hex -i my_input_file.png -o my_output_file.hex
46 .RE
47 .SH FILES
48 *.png graphics files
49 .SH SEE ALSO
50 .BR bdfimplode(1),
51 .BR hex2bdf(1),
52 .BR hex2sfd(1),
53 .BR hexbraille(1),
54 .BR hexdraw(1),
55 .BR hexkinya(1),
56 .BR hexmerge(1),
57 .BR johab2ucs2(1),
58 .BR unibdf2hex(1),
59 .BR unibmp2hex(1),
60 .BR unicoverage(1),
61 .BR unidup(1),
62 .BR unifont(5),
63 .BR unifont-viewer(1),
64 .BR unifontchojung(1),
65 .BR unifontksx(1),
66 .BR unifontpic(1),
67 .BR unigencircles(1),
68 .BR unigenwidth(1),
69 .BR unihex2bmp(1),
70 .BR unihex2png(1),
71 .BR unihexgen(1),
72 .BR unipagecount(1)
73 .SH AUTHOR
74 .B unipng2hex
75 was written by Andrew Miller, starting by converting Paul Hardy's
76 .B unibmp2hex
77 C program to Perl.
78 .SH LICENSE
79 .B unipng2hex
80 is Copyright \(co 2007, 2008 Paul Hardy, \(co 2013 Andrew Miller.
81 .PP
82 This program is free software; you can redistribute it and/or modify
83 it under the terms of the GNU General Public License as published by
84 the Free Software Foundation; either version 2 of the License, or
85 (at your option) any later version.
86 .SH BUGS
87 No known real bugs exist, but the optional pixel rows parameter is not
88 yet supported by all other Unifont utilities.  Use of glyphs taller than
89 the default of 16 pixels is considered experimental.  Currently
90 .B unihex2png, unipng2hex, hexdraw,
91 and
92 .B hex2bdf
93 tentatively support glyphs that are 16, 24, and 32 pixels tall.
94 .PP
95 Also, this software does not perform extensive error checking on its
96 input files.  If they're not in the format of the original PNG output from
97 .B unihex2png,
98 all bets are off.
99 .PP
100 If the output file is for a "page" containing space code points and the
101 PNG file squares for those code points are not empty,
102 .B unipng2hex
103 preserves the graphics as they are drawn.
104 .PP
105 .B unipng2hex
106 is designed to work with black and white pixels; do not use other
107 colors.