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 de‐
31       tailed 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 ad‐
41              dition the value for the option is treated as list and may  con‐
42              tain any of the special options listed in section RAW OPTIONS.
43

NOTE

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

SUPPORTED RAW TYPES

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

RAW OPTIONS

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

SEE ALSO

180       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
181       pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi,  img-sun,  img-tga,
182       img-tiff, img-window, img-xbm, img-xpm
183

KEYWORDS

185       image handling, raw, tk
186
188       Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
189
190
191
192
193img-raw                               1.4                           img-raw(n)
Impressum