1img-ppm(n)                            Img                           img-ppm(n)
2
3
4

NAME

6       img-ppm - Img, Portable Pixmap format (ppm)
7

SYNOPSIS

9       package require Tk
10
11       package require img::ppm  ?1.4?
12
13       image create photo ?name? ?options?
14
15

DESCRIPTION

17       The  package  img::ppm  is  a sub-package of Img. It can be loaded as a
18       part of the complete Img support, via package require Img,  or  on  its
19       own, via package require img::ppm.
20
21       Like  all packages of Img it does not provide new commands, but extends
22       the existing Tk command image so  that  it  supports  files  containing
23       raster  images  in  the Portable Pixmap format (ppm). More specifically
24       img::ppm extends Tk's photo image type.
25
26       The name of the new format handler is ppm.  This handler provides addi‐
27       tional configuration options. See section PPM OPTIONS for more detailed
28       explanations.
29
30       All of the above means that in a call like
31
32       image create photo ?name? ?options?
33
34       [1]    Image data in ppm format (options -data and -file)  is  detected
35              automatically.
36
37       [2]    The  format  name  ppm  is recognized by the option -format.  In
38              addition the value for the option is treated  as  list  and  may
39              contain  any  of  the  special  options  listed  in  section PPM
40              OPTIONS.
41

SUPPORTED PPM TYPES

43       This handler supports the PPM (Truecolor)  and  PGM  (Greyscale)  image
44       formats.  There are two types of PPM/PGM files: RAW (binary) and ASCII.
45       The values stored in PPM/PGM files can be unsigned  8-bit  or  unsigned
46       16-bit values.
47
48
49        Grayscale (PGM): 8-bit and 16-bit, 1 channel per pixel.
50        Truecolor (PPM): 8-bit and 16-bit, 3 channels per pixel.
51
52        List of currently supported features:
53
54        Type              |     Read      |     Write     |
55                          | -file | -data | -file | -data |
56        ---------------------------------------------------
57        PGM  8-bit ASCII  | Yes   | Yes   | No    | No    |
58        PGM  8-bit BINARY | Yes   | Yes   | No    | No    |
59        PGM 16-bit ASCII  | Yes   | Yes   | No    | No    |
60        PGM 16-bit BINARY | Yes   | Yes   | No    | No    |
61        PPM  8-bit ASCII  | Yes   | Yes   | Yes   | Yes   |
62        PPM  8-bit BINARY | Yes   | Yes   | Yes   | Yes   |
63        PPM 16-bit ASCII  | Yes   | Yes   | No    | No    |
64        PPM 16-bit BINARY | Yes   | Yes   | No    | No    |
65
66
67

PPM OPTIONS

69       The handler provides the following options:
70
71       -verbose bool
72              This option is supported for reading and writing.
73
74              If  set  to true, additional information about the loaded/stored
75              image is printed to stdout. Default is false.
76
77       -scanorder string
78              This option is supported for reading only.
79
80              Specify the scanline order of the input image.  Possible values:
81              TopDown or BottomUp. Default is TopDown.
82
83       -gamma float
84              This option is supported for reading only.
85
86              Specify  a  gamma  correction  to be applied when mapping 16-bit
87              input data to 8-bit image values.  Default is 1.0.
88
89       -min float
90              This option is supported for reading only.
91
92              Specify the minimum pixel value to be used  for  mapping  16-bit
93              input  data to 8-bit image values.  Default is the minimum value
94              found in the image data.
95
96       -max float
97              This option is supported for reading only.
98
99              Specify the maximum pixel value to be used  for  mapping  16-bit
100              input  data to 8-bit image values.  Default is the maximum value
101              found in the image data.
102
103       -ascii bool
104              This option is supported for writing only.  If set to true,  the
105              file  is  written  in  PPM  8-bit ASCII format (P3).  Default is
106              false, i.e. write in PPM 8-bit binary format (P6).
107

SEE ALSO

109       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
110       pixmap,  img-png,  img-ppm, img-ps, img-raw, img-sgi, img-sun, img-tga,
111       img-tiff, img-window, img-xbm, img-xpm
112

KEYWORDS

114       image handling, ppm, tk
115
117       Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
118
119
120
121
122img-ppm                               1.4                           img-ppm(n)
Impressum