]>
Commit | Line | Data |
---|---|---|
8414a40c VZ |
1 | <!-- Creator : groff version 1.18.1 --> |
2 | <!-- CreationDate: Mon Mar 13 18:03:10 2006 --> | |
3 | <html> | |
4 | <head> | |
5 | <meta name="generator" content="groff -Thtml, see www.gnu.org"> | |
6 | <meta name="Content-Style" content="text/css"> | |
7 | <title>TIFFReadRGBAStrip</title> | |
8 | </head> | |
9 | <body> | |
10 | ||
11 | <h1 align=center>TIFFReadRGBAStrip</h1> | |
12 | <a href="#NAME">NAME</a><br> | |
13 | <a href="#SYNOPSIS">SYNOPSIS</a><br> | |
14 | <a href="#DESCRIPTION">DESCRIPTION</a><br> | |
15 | <a href="#NOTES">NOTES</a><br> | |
16 | <a href="#RETURN VALUES">RETURN VALUES</a><br> | |
17 | <a href="#DIAGNOSTICS">DIAGNOSTICS</a><br> | |
18 | <a href="#SEE ALSO">SEE ALSO</a><br> | |
19 | ||
20 | <hr> | |
21 | <a name="NAME"></a> | |
22 | <h2>NAME</h2> | |
23 | <!-- INDENTATION --> | |
24 | <table width="100%" border=0 rules="none" frame="void" | |
25 | cols="2" cellspacing="0" cellpadding="0"> | |
26 | <tr valign="top" align="left"> | |
27 | <td width="8%"></td> | |
28 | <td width="91%"> | |
29 | <p>TIFFReadRGBAStrip − read and decode an image strip | |
30 | into a fixed-format raster</p> | |
31 | </td> | |
32 | </table> | |
33 | <a name="SYNOPSIS"></a> | |
34 | <h2>SYNOPSIS</h2> | |
35 | <!-- INDENTATION --> | |
36 | <table width="100%" border=0 rules="none" frame="void" | |
37 | cols="2" cellspacing="0" cellpadding="0"> | |
38 | <tr valign="top" align="left"> | |
39 | <td width="8%"></td> | |
40 | <td width="91%"> | |
41 | <p><b>#include <tiffio.h></b></p> | |
42 | <!-- INDENTATION --> | |
43 | <p><b>#define TIFFGetR(abgr) ((abgr) & 0xff)<br> | |
44 | #define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)<br> | |
45 | #define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)<br> | |
46 | #define TIFFGetA(abgr) (((abgr) >> 24) & | |
47 | 0xff)</b></p> | |
48 | <!-- INDENTATION --> | |
49 | <p><b>int TIFFReadRGBAStrip(TIFF *</b><i>tif</i><b>, | |
50 | uint32</b> <i>row</i><b>, uint32 | |
51 | *</b><i>raster</i><b>)</b></p> | |
52 | </td> | |
53 | </table> | |
54 | <a name="DESCRIPTION"></a> | |
55 | <h2>DESCRIPTION</h2> | |
56 | <!-- INDENTATION --> | |
57 | <table width="100%" border=0 rules="none" frame="void" | |
58 | cols="2" cellspacing="0" cellpadding="0"> | |
59 | <tr valign="top" align="left"> | |
60 | <td width="8%"></td> | |
61 | <td width="91%"> | |
62 | <p><i>TIFFReadRGBAStrip</i> reads a single strip of a | |
63 | strip-based image into memory, storing the result in the | |
64 | user supplied RGBA <i>raster</i>. The raster is assumed to | |
65 | be an array of width times rowsperstrip 32-bit entries, | |
66 | where width is the width of the image (TIFFTAG_IMAGEWIDTH) | |
67 | and rowsperstrip is the maximum lines in a strip | |
68 | (TIFFTAG_ROWSPERSTRIP).</p> | |
69 | <!-- INDENTATION --> | |
70 | <p>The <i>row</i> value should be the row of the first row | |
71 | in the strip (strip * rowsperstrip, zero based).</p> | |
72 | <!-- INDENTATION --> | |
73 | <p>Note that the raster is assume to be organized such that | |
74 | the pixel at location (<i>x</i>,<i>y</i>) is | |
75 | <i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the | |
76 | raster origin in the <i>lower-left hand corner</i> of the | |
77 | strip. That is bottom to top organization. When reading a | |
78 | partial last strip in the file the last line of the image | |
79 | will begin at the beginning of the buffer.</p> | |
80 | <!-- INDENTATION --> | |
81 | <p>Raster pixels are 8-bit packed red, green, blue, alpha | |
82 | samples. The macros <i>TIFFGetR</i>, <i>TIFFGetG</i>, | |
83 | <i>TIFFGetB</i>, and <i>TIFFGetA</i> should be used to | |
84 | access individual samples. Images without Associated Alpha | |
85 | matting information have a constant Alpha of 1.0 (255).</p> | |
86 | <!-- INDENTATION --> | |
87 | <p>See the <i>TIFFRGBAImage</i>(3TIFF) page for more details | |
88 | on how various image types are converted to RGBA values.</p> | |
89 | </td> | |
90 | </table> | |
91 | <a name="NOTES"></a> | |
92 | <h2>NOTES</h2> | |
93 | <!-- INDENTATION --> | |
94 | <table width="100%" border=0 rules="none" frame="void" | |
95 | cols="2" cellspacing="0" cellpadding="0"> | |
96 | <tr valign="top" align="left"> | |
97 | <td width="8%"></td> | |
98 | <td width="91%"> | |
99 | <p>Samples must be either 1, 2, 4, 8, or 16 bits. | |
100 | Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. | |
101 | <i>SamplesPerPixel</i> minus <i>ExtraSamples</i>).</p> | |
102 | <!-- INDENTATION --> | |
103 | <p>Palette image colormaps that appear to be incorrectly | |
104 | written as 8-bit values are automatically scaled to | |
105 | 16-bits.</p> | |
106 | <!-- INDENTATION --> | |
107 | <p><i>TIFFReadRGBAStrip</i> is just a wrapper around the | |
108 | more general <i>TIFFRGBAImage</i>(3TIFF) facilities. | |
109 | It’s main advantage over the similar | |
110 | <i>TIFFReadRGBAImage()</i> function is that for large images | |
111 | a single buffer capable of holding the whole image | |
112 | doesn’t need to be allocated, only enough for one | |
113 | strip. The <i>TIFFReadRGBATile()</i> function does a similar | |
114 | operation for tiled images.</p> | |
115 | </td> | |
116 | </table> | |
117 | <a name="RETURN VALUES"></a> | |
118 | <h2>RETURN VALUES</h2> | |
119 | <!-- INDENTATION --> | |
120 | <table width="100%" border=0 rules="none" frame="void" | |
121 | cols="2" cellspacing="0" cellpadding="0"> | |
122 | <tr valign="top" align="left"> | |
123 | <td width="8%"></td> | |
124 | <td width="91%"> | |
125 | <p>1 is returned if the image was successfully read and | |
126 | converted. Otherwise, 0 is returned if an error was | |
127 | encountered.</p> | |
128 | </td> | |
129 | </table> | |
130 | <a name="DIAGNOSTICS"></a> | |
131 | <h2>DIAGNOSTICS</h2> | |
132 | <!-- INDENTATION --> | |
133 | <table width="100%" border=0 rules="none" frame="void" | |
134 | cols="2" cellspacing="0" cellpadding="0"> | |
135 | <tr valign="top" align="left"> | |
136 | <td width="8%"></td> | |
137 | <td width="91%"> | |
138 | <p>All error messages are directed to the | |
139 | <i>TIFFError</i>(3TIFF) routine.</p> | |
140 | <!-- INDENTATION --> | |
141 | <p><b>Sorry, can not handle %d-bit pictures</b>. The image | |
142 | had <i>BitsPerSample</i> other than 1, 2, 4, 8, or 16.</p> | |
143 | <!-- INDENTATION --> | |
144 | <p><b>Sorry, can not handle %d-channel images</b>. The image | |
145 | had <i>SamplesPerPixel</i> other than 1, 3, or 4.</p> | |
146 | <!-- INDENTATION --> | |
147 | <p><b>Missing needed "PhotometricInterpretation" | |
148 | tag</b>. The image did not have a tag that describes how to | |
149 | display the data.</p> | |
150 | <!-- INDENTATION --> | |
151 | <p><b>No "PhotometricInterpretation" tag, assuming | |
152 | RGB</b>. The image was missing a tag that describes how to | |
153 | display it, but because it has 3 or 4 samples/pixel, it is | |
154 | assumed to be <small>RGB.</small></p> | |
155 | <!-- INDENTATION --> | |
156 | <p><b>No "PhotometricInterpretation" tag, assuming | |
157 | min-is-black</b>. The image was missing a tag that describes | |
158 | how to display it, but because it has 1 sample/pixel, it is | |
159 | assumed to be a grayscale or bilevel image.</p> | |
160 | <!-- INDENTATION --> | |
161 | <p><b>No space for photometric conversion table</b>. There | |
162 | was insufficient memory for a table used to convert image | |
163 | samples to 8-bit <small>RGB.</small></p> | |
164 | <!-- INDENTATION --> | |
165 | <p><b>Missing required "Colormap" tag</b>. A | |
166 | Palette image did not have a required <i>Colormap</i> | |
167 | tag.</p> | |
168 | <!-- INDENTATION --> | |
169 | <p><b>No space for tile buffer</b>. There was insufficient | |
170 | memory to allocate an i/o buffer.</p> | |
171 | <!-- INDENTATION --> | |
172 | <p><b>No space for strip buffer</b>. There was insufficient | |
173 | memory to allocate an i/o buffer.</p> | |
174 | <!-- INDENTATION --> | |
175 | <p><b>Can not handle format</b>. The image has a format | |
176 | (combination of <i>BitsPerSample</i>, | |
177 | <i>SamplesPerPixel</i>, and | |
178 | <i>PhotometricInterpretation</i>) that | |
179 | <i>TIFFReadRGBAImage</i> can not handle.</p> | |
180 | <!-- INDENTATION --> | |
181 | <p><b>No space for B&W mapping table</b>. There was | |
182 | insufficient memory to allocate a table used to map | |
183 | grayscale data to <small>RGB.</small></p> | |
184 | <!-- INDENTATION --> | |
185 | <p><b>No space for Palette mapping table</b>. There was | |
186 | insufficient memory to allocate a table used to map data to | |
187 | 8-bit <small>RGB.</small></p> | |
188 | </td> | |
189 | </table> | |
190 | <a name="SEE ALSO"></a> | |
191 | <h2>SEE ALSO</h2> | |
192 | <!-- INDENTATION --> | |
193 | <table width="100%" border=0 rules="none" frame="void" | |
194 | cols="2" cellspacing="0" cellpadding="0"> | |
195 | <tr valign="top" align="left"> | |
196 | <td width="8%"></td> | |
197 | <td width="91%"> | |
198 | <p><b>TIFFOpen</b>(3TIFF), <b>TIFFRGBAImage</b>(3TIFF), | |
199 | <b>TIFFReadRGBAImage</b>(3TIFF), | |
200 | <b>TIFFReadRGBATile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p> | |
201 | <!-- INDENTATION --> | |
202 | <p>Libtiff library home page: | |
203 | <b>http://www.remotesensing.org/libtiff/</b></p> | |
204 | </td> | |
205 | </table> | |
206 | <hr> | |
207 | </body> | |
208 | </html> |