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