summaryrefslogtreecommitdiffstats
path: root/tkimg/doc/img-raw.man
blob: 85bfc980a2d13220322a07af265a4263b6da113a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[comment {-*- tcl -*- doctools}]
[vset FORMATNAME raw]
[vset FORMATFULLNAME {Raw Data Format}]

[include format-header.inc]

This handler provides new additional configuration options. See
section [sectref {RAW OPTIONS}] for more detailed explanations.


[include format-middle.inc]

In addition the value for the option is treated as list and may
contain any of the special options listed in section

[sectref {RAW OPTIONS}].

[list_end]


[section {NOTE}]

This format handler must be loaded explicitly with
[cmd "package require img::[vset FORMATNAME]"].


[section {SUPPORTED RAW TYPES}]

[example_begin]
 Grayscale image:  1 channel  of 32-bit floating point   values.
                   1 channel  of 16-bit unsigned integer values.
                   1 channel  of  8-bit unsigned integer values.
 True-color image: 3 channels of 32-bit floating point   values.
                   3 channels of 16-bit unsigned integer values.
                   3 channels of  8-bit unsigned integer values.

 List of currently supported features:

 Type   |     Read      |     Write     |
        | -file | -data | -file | -data |
 ----------------------------------------
 Gray   | Yes   | Yes   | Yes   | Yes   |
 RGB    | Yes   | Yes   | Yes   | Yes   |

 There are 2 supported file formats:
 One with the pure raw data only, the other with a 7 line ASCII header
 of the following form:

     Magic=RAW\n          File format identifier. Fixed value.
     Width=128\n          Image width in pixels.
     Height=128\n         Image height in pixels.
     NumChan=1\n          Possible values: 1 or 3.
     ByteOrder=Intel\n    Possible values: "Intel" or "Motorola".
     ScanOrder=TopDown\n  Possible values: "TopDown" or "BottomUp".
     PixelType=byte\n     Possible values: "float", "short" or "byte".

[example_end]


[section {RAW OPTIONS}]

The handler provides the following options:

[list_begin definitions]

[lst_item "[option -verbose] [arg bool]"]

This option is supported for reading and writing.
[nl]
If set to [const true], additional information about the loaded/stored image
is printed to stdout. Default is [const false].

[lst_item "[option -useheader] [arg bool]"]

This option is supported for reading and writing.
[nl]
If set to [const true], use the file header information for reading and writing.
Default is [const true].

[lst_item "[option -nchan] [arg int]"]

This option is supported for reading and writing image data without header.
[nl]
Specify the number of channels of the input image.
Default is [const 1].

[lst_item "[option -width] [arg int]"]

This option is supported for reading image data without header only.
[nl]
Specify the width of the input image.
Default is [const 128].

[lst_item "[option -height] [arg int]"]

This option is supported for reading image data without header only.
[nl]
Specify the height of the input image.
Default is [const 128].

[lst_item "[option -byteorder] [arg string]"]

This option is supported for reading image data without header only.
[nl]
Specify the byteorder of the input image data.
Possible values: [const Intel] or [const Motorola].
Default is assuming the same byteorder as that of the host computer.

[lst_item "[option -uuencode] [arg bool]"]
This option is supported for reading image data without header only.
[nl]
If set to [const false], do not assume, that the image data stored in a
Tcl variable is uuencoded. Default is [const true], i.e. the image data in
a Tcl variable is assumed to be uuencoded.

[lst_item "[option -scanorder] [arg string]"]

This option is supported for reading and writing image data without header.
[nl]
Specify the scanline order of the input image.
Possible values: [const TopDown] or [const BottomUp].
Default is assuming the same byteorder as that of the host computer.

[lst_item "[option -pixeltype] [arg string]"]

This option is supported for reading image data without header only.
[nl]
Specify the type of the pixel values.
Possible values: [const float] or [const short] or [const byte].
Default is [const byte].
[nl]
RAW files are always written in [const byte] pixel format.

[lst_item "[option -gamma] [arg float]"]

This option is supported for reading only.
[nl]
Specify a gamma correction to be applied when mapping
the input data to 8-bit image values.
Default is [const 1.0].

[lst_item "[option -nomap] [arg bool]"]

This option is supported for reading only.
[nl]
If set to [const true], no mapping of input values is done.
Use this option, if your image already contains RGB
values in the range of [const 0] .. [const 255].
When using the nomap mode, no information about the
minimum and maximum pixel values is gathered during
reading and therefore no verbose output is printed.
On the other hand reading the image is faster.

Default is [const false].

[lst_item "[option -min] [arg float]"]

This option is supported for reading only.
[nl]
Specify the minimum pixel value to be used for mapping
the input data to 8-bit image values.
Default is the minimum value found in the image data.

[lst_item "[option -max] [arg float]"]

This option is supported for reading only.
[nl]
Specify the maximum pixel value to be used for mapping
the input data to 8-bit image values.
Default is the maximum value found in the image data.

[list_end]

[list_begin definitions]
[include format-footer.inc]