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