]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/jpg
ssh: document thumbfile options
[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, totif, toico \- view and convert pictures
4 .SH SYNOPSIS
5 .B jpg
6 [
7 .B -39cdefFkJrtvy
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 -ks
74 ] [
75 .I file
76 ]
77 .br
78 .B togeordi
79 [
80 .B -c
81 .I comment
82 ] [
83 .B -k
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 .B -E
110 ]
111 .br
112 .B toppm
113 [
114 .B -c
115 .I comment
116 ] [
117 .B -r
118 ] [
119 .I file
120 ]
121 .br
122 .B topng
123 [
124 .B -c
125 .I comment
126 ] [
127 .B -g
128 .I gamma
129 ] [
130 .I file
131 ]
132 .br
133 .B totif
134 [
135 .B -c
136 .I comment
137 ] [
138 .B -3bgGhklLptvyY
139 ] [
140 .I file
141 ]
142 .PP
143 .B ico
144 [
145 .B -c
146 ] [
147 .I file
148 ]
149 .br
150 .B toico
151 [
152 .I file ...
153 ]
154 .SH DESCRIPTION
155 These programs read, display, and write image files in public formats.
156 .IR Jpg ,
157 .IR gif ,
158 .IR png ,
159 .IR tif ,
160 .IR ppm ,
161 .IR bmp ,
162 .IR tga ,
163 .IR v210 ,
164 and
165 .IR yuv
166 read files in the corresponding formats and, by default, display
167 them in the current window; options cause them instead to convert the images
168 to Plan 9 image format and write them to standard output.
169 .IR Tojpg ,
170 .IR togif ,
171 .IR toppm ,
172 .IR topng ,
173 and
174 .I totif
175 read Plan 9 images files, convert them to JPEG, GIF, PPM,
176 PNG, or TIFF and write them to standard output.
177 .PP
178 The default behavior of
179 .IR jpg ,
180 .IR gif ,
181 .IR png ,
182 .IR tif ,
183 .IR ppm ,
184 .IR bmp ,
185 .IR tga ,
186 .IR v210 ,
187 and
188 .IR yuv
189 is to display the
190 .IR file ,
191 or standard input if no file is named.
192 Once a file is displayed, typing a character causes the program to display the next image.
193 Typing a
194 .BR q ,
195 DEL, or control-D exits the program.
196 For a more user-friendly interface, use
197 .IR page (1),
198 which invokes these programs to convert the images to standard format,
199 displays them, and offers scrolling, panning, and menu-driven navigation among the files.
200 .PP
201 These programs share many options:
202 .TP
203 .B -e
204 Disable Floyd-Steinberg error diffusion, which is used to improve the appearance
205 of images on color-mapped displays, typically with 8 bits per pixel.
206 Primarily useful for debugging; if the display has true RGB color, the image
207 will be displayed in full glory.
208 .TP
209 .B -k
210 Convert and display the image as a black and white (really grey-scale) image.
211 .TP
212 .B -v
213 Convert the image to an RGBV color-mapped image, even if the
214 display has true RGB color.
215 .TP
216 .B -d
217 Suppress display of the image; this is set automatically by
218 any of the following options:
219 .TP
220 .B -c
221 Convert the image to a Plan 9 representation, as defined by
222 .IR image (6),
223 and write it to standard output.
224 .TP
225 .B -9
226 Like
227 .BR -c ,
228 but produce an uncompressed image.
229 This saves processing time, particularly when the output is
230 being piped to another program such as
231 .IR page (1),
232 since it avoids compression and decompression.
233 .TP
234 .B -t
235 Convert the image, if it is in color, to a true color RGB image.
236 .TP
237 .B -3
238 Like
239 .BR -t ,
240 but force the image to RGB even if it is originally grey-scale.
241 .PD
242 .PP
243 .I Jpg
244 has two extra options used to process the output of the LML
245 video card:
246 .TP
247 .B -f
248 Merge two adjacent images, which represent the two fields of a video picture,
249 into a single image.
250 .TP
251 .B -F
252 The input is a motion JPEG file, with multiple images representing frames of the movie.  Sets
253 .BR -f .
254 .PD
255 .PP
256 The
257 .IR tojpg ,
258 .IR togif ,
259 .IR toppm
260 and
261 .IR topng
262 programs go the other way: they convert from Plan 9 images to JPEG, GIF,
263 PPM, PNG, and TIFF and have no display capability.
264 They all accept an option
265 .B -c
266 to set the comment field of the resulting file.
267 The
268 .B -r
269 option makes
270 .I toppm
271 output raw PPM.
272 The default is to output plain PPM.
273 The
274 .B -k
275 option makes
276 .I tojpg
277 output grey-scale images,
278 and the
279 .B -s
280 option makes it output scratched JPEG images.
281 .I Togeordi
282 is an
283 .IR rc (1)
284 script that invokes
285 .B tojpg
286 .BR -s .
287 .I Totif
288 accepts many options.
289 Choosing Huffman, T4, or T6 compression
290 forces the image to GREY1.
291 .TP
292 .B -3
293 Convert the image to a true color RGB image.
294 .TP
295 .B -b
296 Convert the image to a GREY1 black and white image.
297 .TP
298 .B -g
299 Use T4 one-dimensional compression.
300 .TP
301 .B -G
302 Use T4 two-dimensional compression.
303 .TP
304 .B -h
305 Use Huffman compression.
306 .TP
307 .B -k
308 Convert the image to a GREY8 grey-scale image.
309 .TP
310 .B -l
311 Use LZW compression.
312 .TP
313 .B -L
314 Use LZW compression with horizontal differencing.
315 Some TIFF decoders may not support horizontal
316 differencing applied to images of depths less than eight.
317 .TP
318 .B -p
319 Use Packbits compression.
320 .TP
321 .B -t
322 Use T6 compression.
323 .TP
324 .B -v
325 Convert the image to an RGBV color-mapped image.
326 .TP
327 .B -y
328 Convert the image to a GREY2 grey-scale image.
329 .I Totif
330 will then convert it to GREY4 before encoding
331 because TIFF does not support depths of two.
332 .TP
333 .B -Y
334 Convert the image to a GREY4 grey-scale image.
335 .PP
336 If there is only one input picture,
337 .I togif
338 converts the image to GIF format.
339 If there are many
340 .IR files ,
341 though, it will assemble them into an animated GIF file.
342 The options control this process:
343 .TP
344 .BI -l loopcount
345 By default, the animation will loop forever;
346 .I loopcount
347 specifies how many times to loop.
348 A value of zero means loop forever and a negative value means
349 to stop after playing the sequence once.
350 .TP
351 .BI -d msec
352 By default, the images are displayed as fast as they can be rendered.
353 This option specifies the time, in milliseconds, to pause while
354 displaying the next named
355 .IR file .
356 .TP
357 .B -E
358 Specifying this option instead of a list of files will read the frames from a pipe on fd 0.
359 Each frame is terminated with EOF.
360 End of the animation is specified by an extra EOF.
361 .PP
362 .I Gif
363 translates files that contain a `transparency' index by attaching
364 an alpha channel to the converted image.
365 .PP
366 .I Ico
367 displays or converts a Windows icon (.ico) file.  If no file is
368 specified,
369 .I ico
370 reads from standard input.
371 Icon files
372 contain sets of icons represented by an image and a mask. The
373 .B -c
374 option causes
375 .I ico
376 to convert the first icon in the set and write it to standard
377 output in compressed Plan 9 image format. Otherwise, the whole
378 icon set is displayed.
379 Clicking the right button pops up a menu that lets you
380 write any icon's image as a Plan 9 image (\fIwidth\fBx\fIheight\fB.image\fR),
381 write any icon's mask as a Plan 9 image (\fIwidth\fBx\fIheight\fB.mask\fR),
382 or exit.  Selecting one of the write menu items yields a sight cursor.
383 Move the sight over the icon and right click again to write.
384 .PP
385 .I Toico
386 takes a list of Plan 9 image files (or standard input) and creates
387 a single icon file.  The masks in the icon file will be the white
388 space in the image.  The icon file is written to standard output.
389 .SH SOURCE
390 .B /sys/src/cmd/jpg
391 .br
392 .B /rc/bin/togeordi
393 .SH "SEE ALSO"
394 .IR page (1),
395 .IR image (6).
396 .br
397 .B http://www.w3.org/Graphics/JPEG/jfif3.pdf
398 .br
399 .B http://www.w3.org/Graphics/JPEG/itu-t81.pdf
400 .br
401 .B http://en.wikibooks.org/wiki/JPEG_-_Idea_and_Practice
402 .br
403 .B http://en.wikipedia.org/wiki/JPEG
404 .br
405 .B http://www.w3.org/Graphics/GIF/spec-gif89a.txt
406 .br
407 .B http://www.w3.org/TR/2003/REC-PNG-20031110
408 .br
409 .B http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
410 .br
411 .B http://netpbm.sourceforge.net/doc/ppm.html
412 .br
413 .B http://en.wikipedia.org/wiki/Windows_bitmap
414 .br
415 .B http://en.wikipedia.org/wiki/Yuv
416 .SH BUGS
417 Writing an animated GIF using
418 .I togif
419 is a clumsy undertaking.
420 .SH HISTORY
421 .I Tojpg
422 first appeared in 9front (May, 2013).
423 .I Tif
424 and
425 .I totif
426 first appeared in 9front (July, 2013).