jpg 5.0 KB

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