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

NAME

6       img-raw - Img, Raw Data Format (raw)
7

SYNOPSIS

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

DESCRIPTION

17       The  package  img::raw  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::raw.
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 Raw Data Format (raw). More specifically img::raw
24       extends Tk's photo image type.
25
26       The name of the new format handler is raw.  This handler  provides  new
27       additional  configuration  options.  See  section  RAW OPTIONS for more
28       detailed 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 raw format (options -data and -file)  is  detected
35              automatically.
36
37       [2]    The  format  name  raw  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 RAW
40              OPTIONS.
41

NOTE

43       This format handler must be  loaded  explicitly  with  package  require
44       img::raw.
45

SUPPORTED RAW TYPES

47        Grayscale image:  1 channel  of 32-bit floating point   values.
48                          1 channel  of 16-bit unsigned integer values.
49                          1 channel  of  8-bit unsigned integer values.
50        True-color image: 3 channels of 32-bit floating point   values.
51                          3 channels of 16-bit unsigned integer values.
52                          3 channels of  8-bit unsigned integer values.
53
54        List of currently supported features:
55
56        Type   |     Read      |     Write     |
57               | -file | -data | -file | -data |
58        ----------------------------------------
59        Gray   | Yes   | Yes   | Yes   | Yes   |
60        RGB    | Yes   | Yes   | Yes   | Yes   |
61
62        There are 2 supported file formats:
63        One with the pure raw data only, the other with a 7 line ASCII header
64        of the following form:
65
66            Magic=RAW\n          File format identifier. Fixed value.
67            Width=128\n          Image width in pixels.
68            Height=128\n         Image height in pixels.
69            NumChan=1\n          Possible values: 1 or 3.
70            ByteOrder=Intel\n    Possible values: "Intel" or "Motorola".
71            ScanOrder=TopDown\n  Possible values: "TopDown" or "BottomUp".
72            PixelType=byte\n     Possible values: "float", "short" or "byte".
73
74
75

RAW OPTIONS

77       The handler provides the following options:
78
79       -verbose bool
80              This option is supported for reading and writing.
81
82              If  set  to true, additional information about the loaded/stored
83              image is printed to stdout. Default is false.
84
85       -useheader bool
86              This option is supported for reading and writing.
87
88              If set to true, use the file header information for reading  and
89              writing.  Default is true.
90
91       -nchan int
92              This  option  is  supported  for  reading and writing image data
93              without header.
94
95              Specify the number of channels of the input image.   Default  is
96              1.
97
98       -width int
99              This  option  is supported for reading image data without header
100              only.
101
102              Specify the width of the input image.  Default is 128.
103
104       -height int
105              This option is supported for reading image data  without  header
106              only.
107
108              Specify the height of the input image.  Default is 128.
109
110       -byteorder string
111              This  option  is supported for reading image data without header
112              only.
113
114              Specify the byteorder of the input image data.  Possible values:
115              Intel  or  Motorola.   Default is assuming the same byteorder as
116              that of the host computer.
117
118       -uuencode bool
119              This option is supported for reading image data  without  header
120              only.
121
122              If  set to false, do not assume, that the image data stored in a
123              Tcl variable is uuencoded. Default is true, i.e. the image  data
124              in a Tcl variable is assumed to be uuencoded.
125
126       -scanorder string
127              This  option  is  supported  for  reading and writing image data
128              without header.
129
130              Specify the scanline order of the input image.  Possible values:
131              TopDown  or BottomUp.  Default is assuming the same byteorder as
132              that of the host computer.
133
134       -pixeltype string
135              This option is supported for reading image data  without  header
136              only.
137
138              Specify the type of the pixel values.  Possible values: float or
139              short or byte.  Default is byte.
140
141              RAW files are always written in byte pixel format.
142
143       -gamma float
144              This option is supported for reading only.
145
146              Specify a gamma correction to be applied when mapping the  input
147              data to 8-bit image values.  Default is 1.0.
148
149       -nomap bool
150              This option is supported for reading only.
151
152              If  set  to  true, no mapping of input values is done.  Use this
153              option, if your image already contains RGB values in  the  range
154              of 0 .. 255.  Default is false.
155
156       -min float
157              This option is supported for reading only.
158
159              Specify the minimum pixel value to be used for mapping the input
160              data to 8-bit image values.  Default is the minimum value  found
161              in the image data.
162
163       -max float
164              This option is supported for reading only.
165
166              Specify the maximum pixel value to be used for mapping the input
167              data to 8-bit image values.  Default is the maximum value  found
168              in the image data.
169

SEE ALSO

171       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
172       pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi,  img-sun,  img-tga,
173       img-tiff, img-window, img-xbm, img-xpm
174

KEYWORDS

176       image handling, raw, tk
177
179       Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
180
181
182
183
184img-raw                               1.4                           img-raw(n)
Impressum