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