1img-raw(n)                            Img                           img-raw(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       img-raw - Img, Raw Data Format (raw)
9

SYNOPSIS

11       package require Tk
12
13       package require img::raw  ?1.4?
14
15       image create photo ?name? ?options?
16
17______________________________________________________________________________
18

DESCRIPTION

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

NOTE

46       This format handler must be  loaded  explicitly  with  package  require
47       img::raw.
48

SUPPORTED RAW TYPES

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

RAW OPTIONS

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

SEE ALSO

174       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
175       pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi,  img-sun,  img-tga,
176       img-tiff, img-window, img-xbm, img-xpm
177

KEYWORDS

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