jpg 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. .TH JPG 1
  2. .SH NAME
  3. jpg, gif, png, ppm, togif, toppm, topng \- 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. .SH DESCRIPTION
  74. These programs read, display, and write image files in public formats.
  75. .IR Jpg ,
  76. .IR gif ,
  77. .IR png ,
  78. and
  79. .I ppm
  80. read files in the corresponding formats and, by default, display
  81. them in the current window; options cause them instead to convert the images
  82. to Plan 9 image format and write them to standard output.
  83. .IR Togif ,
  84. .IR Toppm ,
  85. and
  86. .I topng
  87. read Plan 9 images files, convert them to GIF, PPM, or PNG, and write them to standard output.
  88. .PP
  89. The default behavior of
  90. .IR jpg ,
  91. .IR gif ,
  92. and
  93. .IR ppm
  94. is to display the
  95. .IR file ,
  96. or standard input if no file is named.
  97. Once a file is displayed, typing a character causes the program to display the next image.
  98. Typing a
  99. .BR q ,
  100. DEL, or control-D exits the program.
  101. For a more user-friendly interface, use
  102. .IR page (1),
  103. which invokes these programs to convert the images to standard format,
  104. displays them, and offers scrolling, panning, and menu-driven navigation among the files.
  105. .PP
  106. These programs share many options:
  107. .TP
  108. .B -e
  109. Disable Floyd-Steinberg error diffusion, which is used to improve the appearance
  110. of images on color-mapped displays, typically with 8 bits per pixel.
  111. Primarily useful for debugging; if the display has true RGB color, the image
  112. will be displayed in full glory.
  113. .TP
  114. .B -k
  115. Convert and display the image as a black and white (really grey-scale) image.
  116. .TP
  117. .B -v
  118. Convert the image to an RGBV color-mapped image, even if the
  119. display has true RGB color.
  120. .TP
  121. .B -d
  122. Suppress display of the image; this is set automatically by
  123. any of the following options:
  124. .TP
  125. .B -c
  126. Convert the image to a Plan 9 representation, as defined by
  127. .IR image (6),
  128. and write it to standard output.
  129. .TP
  130. .B -9
  131. Like
  132. .BR -c ,
  133. but produce an uncompressed image.
  134. This saves processing time, particularly when the output is
  135. being piped to another program such as
  136. .IR page (1),
  137. since it avoids compression and decompression.
  138. .TP
  139. .B -t
  140. Convert the image, if it is in color, to a true color RGB image.
  141. .TP
  142. .B -3
  143. Like
  144. .BR -t ,
  145. but force the image to RGB even if it is originally grey-scale.
  146. .PD
  147. .PP
  148. .PP
  149. The
  150. .IR togif
  151. and
  152. .IR toppm
  153. programs go the other way: they convert from Plan 9 images to GIF and PPM,
  154. and have no display capability.
  155. Both accept an option
  156. .B -c
  157. to set the comment field of the resulting file.
  158. If there is only one input picture,
  159. .I togif
  160. converts the image to GIF format.
  161. If there are many
  162. .IR files ,
  163. though, it will assemble them into an animated GIF file.
  164. The options control this process:
  165. .TP
  166. .BI -l loopcount
  167. By default, the animation will loop forever;
  168. .I loopcount
  169. specifies how many times to loop.
  170. A value of zero means loop forever and a negative value means
  171. to stop after playing the sequence once.
  172. .TP
  173. .BI -d msec
  174. By default, the images are displayed as fast as they can be rendered.
  175. This option specifies the time, in milliseconds, to pause while
  176. displaying the next named
  177. .IR file .
  178. .PD
  179. .PP
  180. .I Gif
  181. translates files that contain a `transparency' index by attaching
  182. an alpha channel to the converted image.
  183. .SH SOURCE
  184. .B /sys/src/cmd/jpg
  185. .SH "SEE ALSO"
  186. .IR page (1),
  187. .IR image (6).
  188. .SH BUGS
  189. Writing an animated GIF using
  190. .I togif
  191. is a clumsy undertaking.