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