jpg 5.1 KB

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