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