]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/jpg
add fstype(1) manpage
[plan9front.git] / sys / man / 1 / jpg
1 .TH JPG 1
2 .SH NAME
3 jpg, gif, png, ppm, bmp, v210, yuv, ico, tga, togif, toppm, topng, toico \- view and convert pictures
4 .SH SYNOPSIS
5 .B jpg
6 [
7 .B -39cdefFkJrtv
8 ] [
9 .I file ...
10 ]
11 .br
12 .B gif
13 [
14 .B -39cdektv
15 ] [
16 .I file ...
17 ]
18 .br
19 .B png
20 [
21 .B -39cdektv
22 ] [
23 .I file ...
24 ]
25 .br
26 .B ppm
27 [
28 .B -39cdektv
29 ] [
30 .I file ...
31 ]
32 .br
33 .B bmp
34 [
35 .I file
36 ]
37 .br
38 .B v210
39 [
40 .B -39cdektv
41 ] [
42 .I file ...
43 ]
44 .br
45 .B tga
46 [
47 .B -39cdektv
48 ] [
49 .I file ...
50 ]
51 .br
52 .B yuv
53 [
54 .I file
55 ]
56 .PP
57 .B togif
58 [
59 .B -c
60 .I comment
61 ] [
62 .B -l
63 .I loopcount
64 ] [
65 .B -d
66 .I msec
67 ] [
68 .B -t
69 .I transindex
70 ] [
71 .I file ...
72 [
73 .B -d
74 .I msec
75 ]
76 .I file ...
77 ]
78 .br
79 .B toppm
80 [
81 .B -c
82 .I comment
83 ] [
84 .I file
85 ]
86 .br
87 .B topng
88 [
89 .B -c
90 .I comment
91 ] [
92 [
93 .B -g
94 .I gamma
95 ] [
96 .I file
97 ]
98 .PP
99 .B ico
100 [
101 .I file
102 ]
103 .br
104 .B toico
105 [
106 .I file ...
107 ]
108 .SH DESCRIPTION
109 These programs read, display, and write image files in public formats.
110 .IR Jpg ,
111 .IR gif ,
112 .IR png ,
113 .IR ppm ,
114 .IR bmp ,
115 .IR tga ,
116 .IR v210 ,
117 and
118 .IR yuv
119 read files in the corresponding formats and, by default, display
120 them in the current window; options cause them instead to convert the images
121 to Plan 9 image format and write them to standard output.
122 .IR Togif ,
123 .IR Toppm ,
124 and
125 .I topng
126 read Plan 9 images files, convert them to GIF, PPM, or PNG, and write them to standard output.
127 .PP
128 The default behavior of
129 .IR jpg ,
130 .IR gif ,
131 and
132 .IR ppm
133 is to display the
134 .IR file ,
135 or standard input if no file is named.
136 Once a file is displayed, typing a character causes the program to display the next image.
137 Typing a
138 .BR q ,
139 DEL, or control-D exits the program.
140 For a more user-friendly interface, use
141 .IR page (1),
142 which invokes these programs to convert the images to standard format,
143 displays them, and offers scrolling, panning, and menu-driven navigation among the files.
144 .PP
145 These programs share many options:
146 .TP
147 .B -e
148 Disable Floyd-Steinberg error diffusion, which is used to improve the appearance
149 of images on color-mapped displays, typically with 8 bits per pixel.
150 Primarily useful for debugging; if the display has true RGB color, the image
151 will be displayed in full glory.
152 .TP
153 .B -k
154 Convert and display the image as a black and white (really grey-scale) image.
155 .TP
156 .B -v
157 Convert the image to an RGBV color-mapped image, even if the
158 display has true RGB color.
159 .TP
160 .B -d
161 Suppress display of the image; this is set automatically by
162 any of the following options:
163 .TP
164 .B -c
165 Convert the image to a Plan 9 representation, as defined by
166 .IR image (6),
167 and write it to standard output.
168 .TP
169 .B -9
170 Like
171 .BR -c ,
172 but produce an uncompressed image.
173 This saves processing time, particularly when the output is
174 being piped to another program such as
175 .IR page (1),
176 since it avoids compression and decompression.
177 .TP
178 .B -t
179 Convert the image, if it is in color, to a true color RGB image.
180 .TP
181 .B -3
182 Like
183 .BR -t ,
184 but force the image to RGB even if it is originally grey-scale.
185 .PD
186 .PP
187 .I Jpg
188 has two extra options used to process the output of the LML
189 video card:
190 .TP
191 .B -f
192 Merge two adjacent images, which represent the two fields of a video picture,
193 into a single image.
194 .TP
195 .B -F
196 The input is a motion JPEG file, with multiple images representing frames of the movie.  Sets
197 .BR -f .
198 .PD
199 .PP
200 The
201 .IR togif
202 and
203 .IR toppm
204 programs go the other way: they convert from Plan 9 images to GIF and PPM,
205 and have no display capability.
206 Both accept an option
207 .B -c
208 to set the comment field of the resulting file.
209 If there is only one input picture,
210 .I togif
211 converts the image to GIF format.
212 If there are many
213 .IR files ,
214 though, it will assemble them into an animated GIF file.
215 The options control this process:
216 .TP
217 .BI -l loopcount
218 By default, the animation will loop forever;
219 .I loopcount
220 specifies how many times to loop.
221 A value of zero means loop forever and a negative value means
222 to stop after playing the sequence once.
223 .TP
224 .BI -d msec
225 By default, the images are displayed as fast as they can be rendered.
226 This option specifies the time, in milliseconds, to pause while
227 displaying the next named
228 .IR file .
229 .PP
230 .I Gif
231 translates files that contain a `transparency' index by attaching
232 an alpha channel to the converted image.
233 .PP
234 .I Ico
235 displays a Windows icon (.ico) file.  If no file is
236 specified,
237 .I ico
238 reads from standard input.
239 Icon files
240 contain sets of icons represented by an image and a mask.
241 Clicking the right button pops up a menu that lets you
242 write any icon's image as a Plan 9 image (\fIwidth\fBx\fIheight\fB.image\fR),
243 write any icon's mask as a Plan 9 image (\fIwidth\fBx\fIheight\fB.mask\fR),
244 or exit.  Selecting one of the write menu items yields a sight cursor.
245 Move the sight over the icon and right click again to write.
246 .PP
247 .I Toico
248 takes a list of Plan 9 image files (or standard input) and creates
249 a single icon file.  The masks in the icon file will be the white
250 space in the image.  The icon file is written to standard output.
251 .SH SOURCE
252 .B /sys/src/cmd/jpg
253 .SH "SEE ALSO"
254 .IR page (1),
255 .IR image (6).
256 .br
257 .B http://www.w3.org/Graphics/JPEG/itu-t81.pdf
258 .br
259 .B http://www.w3.org/Graphics/GIF/spec-gif89a.txt
260 .br
261 .B http://www.w3.org/TR/2003/REC-PNG-20031110
262 .br
263 .B http://netpbm.sourceforge.net/doc/ppm.html
264 .br
265 .B http://en.wikipedia.org/wiki/Windows_bitmap
266 .br
267 .B http://en.wikipedia.org/wiki/Yuv
268 .SH BUGS
269 Writing an animated GIF using
270 .I togif
271 is a clumsy undertaking.