]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/jpg
readtif: fix many bugs
[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 -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 .br
131 .B totif
132 [
133 .B -c
134 .I comment
135 ] [
136 .B -bBgGhHlLmprtT
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 -g
273 option makes
274 .I tojpg
275 output grayscale 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 output to be a bilevel image.
289 .TP
290 .B -b
291 Output a bilevel (GREY1) image.
292 .TP
293 .B -B
294 Output a grayscale (GREY2) image.
295 .TP
296 .B -g
297 Output a grayscale (GREY4) image.
298 .TP
299 .B -G
300 Output a grayscale (GREY8) image.
301 .TP
302 .B -h
303 Use Huffman compression.
304 .TP
305 .B -H
306 Use T4 one-dimensional compression.
307 .TP
308 .B -l
309 Use LZW compression.
310 .TP
311 .B -L
312 Use LZW compression with horizontal differencing.
313 Note that some TIFF decoders may not accept horizontal
314 differencing applied to images with depths less than eight.
315 .TP
316 .B -m
317 Output a color (CMAP8) image.
318 .TP
319 .B -p
320 Use Packbits compression.
321 .TP
322 .B -r
323 Output a color (BGR24) image.
324 .TP
325 .B -t
326 Use T4 two-dimensional compression.
327 .TP
328 .B -T
329 Use T6 compression.
330 .PP
331 If there is only one input picture,
332 .I togif
333 converts the image to GIF format.
334 If there are many
335 .IR files ,
336 though, it will assemble them into an animated GIF file.
337 The options control this process:
338 .TP
339 .BI -l loopcount
340 By default, the animation will loop forever;
341 .I loopcount
342 specifies how many times to loop.
343 A value of zero means loop forever and a negative value means
344 to stop after playing the sequence once.
345 .TP
346 .BI -d msec
347 By default, the images are displayed as fast as they can be rendered.
348 This option specifies the time, in milliseconds, to pause while
349 displaying the next named
350 .IR file .
351 .PP
352 .I Gif
353 translates files that contain a `transparency' index by attaching
354 an alpha channel to the converted image.
355 .PP
356 .I Ico
357 displays or converts a Windows icon (.ico) file.  If no file is
358 specified,
359 .I ico
360 reads from standard input.
361 Icon files
362 contain sets of icons represented by an image and a mask. The
363 .B -c
364 option causes
365 .I ico
366 to convert the first icon in the set and write it to standard
367 output in compressed Plan 9 image format. Otherwise, the whole
368 icon set is displayed.
369 Clicking the right button pops up a menu that lets you
370 write any icon's image as a Plan 9 image (\fIwidth\fBx\fIheight\fB.image\fR),
371 write any icon's mask as a Plan 9 image (\fIwidth\fBx\fIheight\fB.mask\fR),
372 or exit.  Selecting one of the write menu items yields a sight cursor.
373 Move the sight over the icon and right click again to write.
374 .PP
375 .I Toico
376 takes a list of Plan 9 image files (or standard input) and creates
377 a single icon file.  The masks in the icon file will be the white
378 space in the image.  The icon file is written to standard output.
379 .SH SOURCE
380 .B /sys/src/cmd/jpg
381 .br
382 .B /rc/bin/togeordi
383 .SH "SEE ALSO"
384 .IR page (1),
385 .IR image (6).
386 .br
387 .B http://www.w3.org/Graphics/JPEG/jfif3.pdf
388 .br
389 .B http://www.w3.org/Graphics/JPEG/itu-t81.pdf
390 .br
391 .B http://en.wikibooks.org/wiki/JPEG_-_Idea_and_Practice
392 .br
393 .B http://en.wikipedia.org/wiki/JPEG
394 .br
395 .B http://www.w3.org/Graphics/GIF/spec-gif89a.txt
396 .br
397 .B http://www.w3.org/TR/2003/REC-PNG-20031110
398 .br
399 .B http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
400 .br
401 .B http://netpbm.sourceforge.net/doc/ppm.html
402 .br
403 .B http://en.wikipedia.org/wiki/Windows_bitmap
404 .br
405 .B http://en.wikipedia.org/wiki/Yuv
406 .SH BUGS
407 Writing an animated GIF using
408 .I togif
409 is a clumsy undertaking.