]> git.draconx.ca Git - liblbx.git/blob - doc/man/lbximg.1
lbximg: Add support for Netpbm output.
[liblbx.git] / doc / man / lbximg.1
1 .Dd June 14, 2013
2 .Os liblbx
3 .Dt LBXIMG \&1 "2ooM Reference Manual"
4 .Sh NAME
5 .Nm lbximg
6 .Nd inspect and decode LBX images
7 .Sh SYNOPSIS
8 .Nm
9 .Op Fl i Ns | Ns Fl d
10 .Op Fl v
11 .Op Fl n
12 .Op Fl F Ar format
13 .Op Fl p Ar palette_file
14 .Op Fl O Ar override_file
15 .Op Fl f Ar path
16 .Op Ar frameno ...
17 .Sh DESCRIPTION
18 .Nm
19 identifies and decodes LBX image files, using
20 .Em liblbx .
21 LBX images are multi-frame, 256-colour paletted images with transparency.
22 .Nm
23 can be used to convert some or all of the frames of an LBX image to other image
24 formats.
25 .Sh OPTIONS
26 .Bl -tag -width indent
27 .It Fl i , -ident
28 Sets the operating mode to identify the image format.
29 .It Fl d , -decode
30 Sets the operating mode to decode frames to PNG.
31 .It Fl v , -verbose
32 Output additional information on standard output.
33 .It Fl F , -format Ar format
34 Select the desired output format.  Some formats may not be available depending
35 on the compile-time settings of
36 .Nm .
37 If this option is not specified, the default is the first in the following list
38 which is enabled at build time.
39 .Bl -column -offset indent ".Em Format"
40 .It Em Format Ta Em Description
41 .It png Ta
42 Output images in Portable Network Graphics (PNG) format.  This is is a
43 compressed format which is well-supported by other tools.  All features of
44 .Nm
45 are supported with this format.
46 .It pam Ta
47 Output images in Netpbm PAM format.  This is a simple uncompressed binary image
48 format supporting RGB and alpha channels.  All features of
49 .Nm
50 are supported with this format.
51 .It ppm Ta
52 Output image colour data in Netpbm "plain" PPM format.  This is a simple
53 7-bit clean uncompressed RGB format.  It does not support transparency, so
54 images will have transparent pixels replaced with black.  This format is
55 rather inefficient and provided mainly for testing.
56 .It pbm Ta
57 Output image mask data in Netpbm "plain" PBM format.  This is a simple 7-bit
58 clean uncompressed bitmap format.  It does not support colour data; instead,
59 bitmap values represent whether or not a pixel is transparent.  Black (1)
60 pixels are transparent, white (0) pixels are opaque.  This format is extremely
61 inefficient and provided mainly for testing.
62 .El
63 .It Fl f , -file Ar path
64 Read from the specified
65 .Ar path
66 instead of standard input.
67 .It Fl n , -no-palette
68 Instead of looking up colour indices in the palette, emit a grayscale image
69 where the intensity value of a pixel is equal to the palette index itself.
70 This is mainly useful for debugging the image decoder in
71 .Em liblbx .
72 .It Fl p , -palette Ar palette_file
73 Read the base palette from
74 .Ar palette_file .
75 In Moo2, these files are found in
76 .Pa fonts.lbx .
77 Without this option, the base palette is filled with a nice hot pink.  Colours
78 in the base palette are superseded by those in the embedded palette and the
79 override palette.
80 .It Fl O , -override Ar override_file
81 Use the embedded palette of an LBX image specified by
82 .Ar override_file
83 as the override palette.  One example of where this is used is for selecting
84 the player colour for ship images.  Colours in the override palette supersede
85 those in both the base palette and the embedded palette.
86 .It Fl V , -version
87 Print a version message and exit.
88 .It Fl -usage
89 Print a short usage message and exit.
90 .It Fl -help
91 Print a help message and exit
92 .It Ar frameno ...
93 Specifies the frames to decode as a sequence of intervals, with frames indexing
94 from zero.  By default, all frames are decoded.  Multiplicity is ignored, as is
95 the order in which frames are specified.  For example:
96 .Bl -tag -width
97 .It Nm Li -d 3 6
98 Decode frames 3 and 6.
99 .It Nm Li -d 4-9
100 Decode frames 4 through 9, inclusive
101 .It Nm Li -d 6-9 1-4
102 Decode frames 1 through 9, except for frame 5.
103 .It Nm Li -d 3-
104 Decode all frames except the first 3.
105 .El
106 .El
107 .Sh EXAMPLES
108 After extracting fonts.lbx, mainmenu.lbx, logo.lbx and ships.lbx with
109 .Xr lbxtool 1 :
110 .Bl -tag -width indent
111 .It Nm Li -ivf logo.lbx.000
112 Print some information about the Simtex logo image.
113 .It Nm Li -dvf mainmenu.lbx.000 -p fonts.lbx.006
114 Decodes all the frames of the main menu panel into a series of PNGs.
115 .It Nm Li -dvf logo.lbx.001
116 Decodes all the frames of the Microprose logo into a series of PNGs.
117 .It Nm Li -dvf ships.lbx.042 -p fonts.lbx.012 -O ships.lbx.049
118 Decodes an image of a red star fortress.
119 .El
120 .Sh AUTHORS
121 Nick Bowler <nbowler@draconx.ca>
122 .Sh COPYRIGHT
123 Copyright \(co 2008\(en2010, 2013 Nick Bowler
124 .Pp
125 Permission is granted to copy, distribute and/or modify this manual under the
126 terms of the Do What The Fuck You Want To Public License, version 2.
127 .Sh SEE ALSO
128 .Xr lbxtool 1 ,
129 .Xr lbxgui 1