jpg 4.6 KB

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