2006-01-02 18:50:44 -05:00
|
|
|
<!-- Creator : groff version 1.19.2 -->
|
|
|
|
<!-- CreationDate: Mon Jan 2 17:41:42 2006 -->
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
2005-03-06 06:11:43 -05:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
2006-01-02 18:50:44 -05:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
2005-03-06 06:11:43 -05:00
|
|
|
<meta name="Content-Style" content="text/css">
|
2006-01-02 18:50:44 -05:00
|
|
|
<style type="text/css">
|
|
|
|
p { margin-top: 0; margin-bottom: 0; }
|
|
|
|
pre { margin-top: 0; margin-bottom: 0; }
|
|
|
|
table { margin-top: 0; margin-bottom: 0; }
|
|
|
|
</style>
|
2005-03-06 06:11:43 -05:00
|
|
|
<title>TIFFReadRGBATile</title>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1 align=center>TIFFReadRGBATile</h1>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a href="#NAME">NAME</a><br>
|
|
|
|
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
|
|
|
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
|
|
|
<a href="#NOTES">NOTES</a><br>
|
|
|
|
<a href="#RETURN VALUES">RETURN VALUES</a><br>
|
|
|
|
<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
|
|
|
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
|
|
|
|
|
|
|
<hr>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="NAME"></a>
|
|
|
|
<h2>NAME</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">TIFFReadRGBATile
|
|
|
|
− read and decode an image tile into a fixed-format
|
|
|
|
raster</p>
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="SYNOPSIS"></a>
|
|
|
|
<h2>SYNOPSIS</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
|
|
|
<tiffio.h></b></p>
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2006-01-02 18:50:44 -05:00
|
|
|
cellspacing="0" cellpadding="0">
|
2005-03-06 06:11:43 -05:00
|
|
|
<tr valign="top" align="left">
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="11%"></td>
|
|
|
|
<td width="-3%">
|
|
|
|
|
|
|
|
|
|
|
|
<p valign="top"><b>#define TIFFGetR(abgr)</b></p></td>
|
|
|
|
<td width="30%"></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<td width="8%"></td>
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="54%">
|
2005-03-06 06:11:43 -05:00
|
|
|
|
|
|
|
|
2006-01-02 18:50:44 -05:00
|
|
|
<p valign="top"><b>((abgr) & 0xff)</b></p></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<tr valign="top" align="left">
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="11%"></td>
|
|
|
|
<td width="-3%">
|
|
|
|
|
|
|
|
|
|
|
|
<p valign="top"><b>#define TIFFGetG(abgr)</b></p></td>
|
|
|
|
<td width="30%"></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<td width="8%"></td>
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="54%">
|
2005-03-06 06:11:43 -05:00
|
|
|
|
|
|
|
|
2006-01-02 18:50:44 -05:00
|
|
|
<p valign="top"><b>(((abgr) >> 8) & 0xff)</b></p></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<tr valign="top" align="left">
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="11%"></td>
|
|
|
|
<td width="-3%">
|
|
|
|
|
|
|
|
|
|
|
|
<p valign="top"><b>#define TIFFGetB(abgr)</b></p></td>
|
|
|
|
<td width="30%"></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<td width="8%"></td>
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="54%">
|
2005-03-06 06:11:43 -05:00
|
|
|
|
|
|
|
|
2006-01-02 18:50:44 -05:00
|
|
|
<p valign="top"><b>(((abgr) >> 16) &
|
|
|
|
0xff)</b></p> </td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<tr valign="top" align="left">
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="11%"></td>
|
|
|
|
<td width="-3%">
|
|
|
|
|
|
|
|
|
|
|
|
<p valign="top"><b>#define TIFFGetA(abgr)</b></p></td>
|
|
|
|
<td width="30%"></td>
|
2005-03-06 06:11:43 -05:00
|
|
|
<td width="8%"></td>
|
2006-01-02 18:50:44 -05:00
|
|
|
<td width="54%">
|
2005-03-06 06:11:43 -05:00
|
|
|
|
|
|
|
|
2006-01-02 18:50:44 -05:00
|
|
|
<p valign="top"><b>(((abgr) >> 24) &
|
|
|
|
0xff)</b></p> </td>
|
2005-03-06 06:11:43 -05:00
|
|
|
</table>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>int
|
|
|
|
TIFFReadRGBATile(TIFF *</b><i>tif</i><b>, uint32</b>
|
|
|
|
<i>x</i><b>, uint32</b> <i>y</i><b>, uint32
|
2005-03-06 06:11:43 -05:00
|
|
|
*</b><i>raster</i><b>)</b></p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="DESCRIPTION"></a>
|
|
|
|
<h2>DESCRIPTION</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><i>TIFFReadRGBATile</i>
|
|
|
|
reads a single tile of a tile-based image into memory,
|
|
|
|
storing the result in the user supplied RGBA <i>raster</i>.
|
|
|
|
The raster is assumed to be an array of width times length
|
|
|
|
32-bit entries, where width is the width of a tile
|
|
|
|
(TIFFTAG_TILEWIDTH) and length is the height of a tile
|
|
|
|
(TIFFTAG_TILELENGTH).</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">The <i>x</i>
|
|
|
|
and <i>y</i> values are the offsets from the top left corner
|
|
|
|
to the top left corner of the tile to be read. They must be
|
|
|
|
an exact multiple of the tile width and length.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">Note that the
|
|
|
|
raster is assume to be organized such that the pixel at
|
|
|
|
location (<i>x</i>,<i>y</i>) is
|
2005-03-06 06:11:43 -05:00
|
|
|
<i>raster</i>[<i>y</i>*<i>width</i>+<i>x</i>]; with the
|
|
|
|
raster origin in the <i>lower-left hand corner</i> of the
|
|
|
|
tile. That is bottom to top organization. Edge tiles which
|
|
|
|
partly fall off the image will be filled out with
|
|
|
|
appropriate zeroed areas.</p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">Raster pixels
|
|
|
|
are 8-bit packed red, green, blue, alpha samples. The macros
|
|
|
|
<i>TIFFGetR</i>, <i>TIFFGetG</i>, <i>TIFFGetB</i>, and
|
|
|
|
<i>TIFFGetA</i> should be used to access individual samples.
|
|
|
|
Images without Associated Alpha matting information have a
|
|
|
|
constant Alpha of 1.0 (255).</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">See the
|
|
|
|
<i>TIFFRGBAImage</i>(3TIFF) page for more details on how
|
|
|
|
various image types are converted to RGBA values.</p>
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="NOTES"></a>
|
|
|
|
<h2>NOTES</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">Samples must be
|
|
|
|
either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel
|
|
|
|
must be either 1, 3, or 4 (i.e. <i>SamplesPerPixel</i> minus
|
|
|
|
<i>ExtraSamples</i>).</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">Palette image
|
|
|
|
colormaps that appear to be incorrectly written as 8-bit
|
|
|
|
values are automatically scaled to 16-bits.</p>
|
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><i>TIFFReadRGBATile</i>
|
|
|
|
is just a wrapper around the more general
|
|
|
|
<i>TIFFRGBAImage</i>(3TIFF) facilities. It’s main
|
|
|
|
advantage over the similar <i>TIFFReadRGBAImage()</i>
|
2005-03-06 06:11:43 -05:00
|
|
|
function is that for large images a single buffer capable of
|
|
|
|
holding the whole image doesn’t need to be allocated,
|
|
|
|
only enough for one tile. The <i>TIFFReadRGBAStrip()</i>
|
|
|
|
function does a similar operation for stripped images.</p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="RETURN VALUES"></a>
|
|
|
|
<h2>RETURN VALUES</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">1 is returned
|
|
|
|
if the image was successfully read and converted. Otherwise,
|
|
|
|
0 is returned if an error was encountered.</p>
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="DIAGNOSTICS"></a>
|
|
|
|
<h2>DIAGNOSTICS</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">All error
|
|
|
|
messages are directed to the <i>TIFFError</i>(3TIFF)
|
|
|
|
routine.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>Sorry, can
|
|
|
|
not handle %d-bit pictures</b>. The image had
|
|
|
|
<i>BitsPerSample</i> other than 1, 2, 4, 8, or 16.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>Sorry, can
|
|
|
|
not handle %d-channel images</b>. The image had
|
|
|
|
<i>SamplesPerPixel</i> other than 1, 3, or 4.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>Missing
|
|
|
|
needed "PhotometricInterpretation" tag</b>. The
|
|
|
|
image did not have a tag that describes how to display the
|
|
|
|
data.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No
|
|
|
|
"PhotometricInterpretation" tag, assuming RGB</b>.
|
|
|
|
The image was missing a tag that describes how to display
|
|
|
|
it, but because it has 3 or 4 samples/pixel, it is assumed
|
|
|
|
to be <small>RGB.</small></p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No
|
|
|
|
"PhotometricInterpretation" tag, assuming
|
2005-03-06 06:11:43 -05:00
|
|
|
min-is-black</b>. The image was missing a tag that describes
|
|
|
|
how to display it, but because it has 1 sample/pixel, it is
|
|
|
|
assumed to be a grayscale or bilevel image.</p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No space for
|
|
|
|
photometric conversion table</b>. There was insufficient
|
|
|
|
memory for a table used to convert image samples to 8-bit
|
|
|
|
<small>RGB.</small></p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>Missing
|
|
|
|
required "Colormap" tag</b>. A Palette image did
|
|
|
|
not have a required <i>Colormap</i> tag.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No space for
|
|
|
|
tile buffer</b>. There was insufficient memory to allocate
|
|
|
|
an i/o buffer.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No space for
|
|
|
|
strip buffer</b>. There was insufficient memory to allocate
|
|
|
|
an i/o buffer.</p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>Can not
|
|
|
|
handle format</b>. The image has a format (combination of
|
|
|
|
<i>BitsPerSample</i>, <i>SamplesPerPixel</i>, and
|
2005-03-06 06:11:43 -05:00
|
|
|
<i>PhotometricInterpretation</i>) that
|
|
|
|
<i>TIFFReadRGBAImage</i> can not handle.</p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No space for
|
|
|
|
B&W mapping table</b>. There was insufficient memory to
|
|
|
|
allocate a table used to map grayscale data to
|
|
|
|
<small>RGB.</small></p>
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>No space for
|
|
|
|
Palette mapping table</b>. There was insufficient memory to
|
|
|
|
allocate a table used to map data to 8-bit
|
|
|
|
<small>RGB.</small></p>
|
|
|
|
|
2005-03-06 06:11:43 -05:00
|
|
|
<a name="SEE ALSO"></a>
|
|
|
|
<h2>SEE ALSO</h2>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em"><b>TIFFOpen</b>(3TIFF),
|
|
|
|
<b>TIFFRGBAImage</b>(3TIFF),
|
2005-12-29 17:01:44 -05:00
|
|
|
<b>TIFFReadRGBAImage</b>(3TIFF),
|
|
|
|
<b>TIFFReadRGBAStrip</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
|
2006-01-02 18:50:44 -05:00
|
|
|
|
|
|
|
<p style="margin-left:11%; margin-top: 1em">Libtiff library
|
|
|
|
home page: <b>http://www.remotesensing.org/libtiff/</b></p>
|
2005-03-06 06:11:43 -05:00
|
|
|
<hr>
|
|
|
|
</body>
|
|
|
|
</html>
|