unifont-6.3.20131215.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 .PP
27 .SH OPTIONS
28 .TP 12
29 -i
30 Specify the input file.
31 .TP
32 -o
33 Specify the output file.  If omitted, a file in the Unifont .hex format
34 is written to STDOUT.
35 .TP
36 -w width
37 Specify the minimum width of the output glyphs.  Valid values are 16, 24,
38  and 32.  The default is no minimum width.
39 .TP
40 -h 
41 Print a help message of options and exit.
42 .SH EXAMPLE
43 Sample usage:
44 .PP
45 .RS
46 unipng2hex -i my_input_file.png -o my_output_file.hex
47 .RE
48 .SH FILES
49 *.png graphics files
50 .SH SEE ALSO
51 .BR bdfimplode(1),
52 .BR hex2bdf(1),
53 .BR hex2sfd(1),
54 .BR hexbraille(1),
55 .BR hexdraw(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 unifontchojung(1),
64 .BR unifontksx(1),
65 .BR unifontpic(1),
66 .BR unigencircles(1),
67 .BR unigenwidth(1),
68 .BR unihex2bmp(1),
69 .BR unihex2png(1),
70 .BR unihexgen(1),
71 .BR unipagecount(1)
72 .SH AUTHOR
73 .B unipng2hex
74 was written by Andrew Miller, starting by converting Paul Hardy's
75 .B unibmp2hex
76 C program to Perl.
77 .SH LICENSE
78 .B unipng2hex
79 is Copyright \(co 2007, 2008 Paul Hardy, \(co 2013 Andrew Miller.
80 .PP
81 This program is free software; you can redistribute it and/or modify
82 it under the terms of the GNU General Public License as published by
83 the Free Software Foundation; either version 2 of the License, or
84 (at your option) any later version.
85 .SH BUGS
86 No known real bugs exist, but the optional pixel rows parameter is not
87 yet supported by all other Unifont utilities.  Use of glyphs taller than
88 the default of 16 pixels is considered experimental.  Currently
89 .B unihex2png, unipng2hex, hexdraw,
90 and
91 .B hex2bdf
92 tentatively support glyphs that are 16, 24, and 32 pixels tall.
93 .PP
94 Also, this software does not perform extensive error checking on its
95 input files.  If they're not in the format of the original PNG output from
96 .B unihex2png,
97 all bets are off.
98 .PP
99 If the output file is for a "page" containing space code points and the
100 PNG file squares for those code points are not empty,
101 .B unipng2hex
102 preserves the graphics as they are drawn.
103 .PP
104 .B unipng2hex
105 is designed to work with black and white pixels; do not use other
106 colors.