jpg 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. .I Jpg
  149. has two extra options used to process the output of the LML
  150. video card (see
  151. .IR lml (1)):
  152. .TP
  153. .B -f
  154. Merge two adjacent images, which represent the two fields of a video picture,
  155. into a single image.
  156. .TP
  157. .B -F
  158. The input is a motion JPEG file, with multiple images representing frames of the movie. Sets
  159. .BR -f .
  160. .PD
  161. .PP
  162. The
  163. .IR togif
  164. and
  165. .IR toppm
  166. programs go the other way: they convert from Plan 9 images to GIF and PPM,
  167. and have no display capability.
  168. Both accept an option
  169. .B -c
  170. to set the comment field of the resulting file.
  171. If there is only one input picture,
  172. .I togif
  173. converts the image to GIF format.
  174. If there are many
  175. .IR files ,
  176. though, it will assemble them into an animated GIF file.
  177. The options control this process:
  178. .TP
  179. .BI -l loopcount
  180. By default, the animation will loop forever;
  181. .I loopcount
  182. specifies how many times to loop.
  183. A value of zero means loop forever and a negative value means
  184. to stop after playing the sequence once.
  185. .TP
  186. .BI -d msec
  187. By default, the images are displayed as fast as they can be rendered.
  188. This option specifies the time, in milliseconds, to pause while
  189. displaying the next named
  190. .IR file .
  191. .PP
  192. .I Gif
  193. translates files that contain a `transparency' index by attaching
  194. an alpha channel to the converted image.
  195. .SH SOURCE
  196. .B /sys/src/cmd/jpg
  197. .SH "SEE ALSO"
  198. .IR lml (1),
  199. .IR page (1),
  200. .IR image (6).
  201. .SH BUGS
  202. Writing an animated GIF using
  203. .I togif
  204. is a clumsy undertaking.