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