2002-10-07 09:47:36 -04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
|
|
<meta name="Content-Style" content="text/css">
|
|
|
|
<title>TIFFReadRGBAStrip</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1 align=center>TIFFReadRGBAStrip</h1>
|
|
|
|
<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>
|
2003-11-27 10:07:01 -05:00
|
|
|
<!-- Creator : groff version 1.17.2 -->
|
2003-12-21 16:47:11 -05:00
|
|
|
<!-- CreationDate: Mon Dec 22 00:39:24 2003 -->
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="NAME"></a>
|
|
|
|
<h2>NAME</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
TIFFReadRGBAStrip - read and decode an image strip into a fixed-format raster</td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="SYNOPSIS"></a>
|
|
|
|
<h2>SYNOPSIS</h2>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2003-11-27 10:07:01 -05:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
2002-10-07 09:47:36 -04:00
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<pre><b>#include <tiffio.h>
|
2002-10-07 09:47:36 -04:00
|
|
|
|
2003-11-27 10:07:01 -05:00
|
|
|
#define TIFFGetR(abgr) ((abgr) & 0xff)
|
|
|
|
#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)
|
|
|
|
#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)
|
|
|
|
#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)
|
2002-10-07 09:47:36 -04:00
|
|
|
|
2003-11-27 10:07:01 -05:00
|
|
|
int TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
|
|
|
|
</b></pre></td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="DESCRIPTION"></a>
|
|
|
|
<h2>DESCRIPTION</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<i>TIFFReadRGBAStrip</i> reads a single strip of a
|
2002-10-07 09:47:36 -04:00
|
|
|
strip-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 rowsperstrip 32-bit entries,
|
|
|
|
where width is the width of the image (TIFFTAG_IMAGEWIDTH)
|
|
|
|
and rowsperstrip is the maximum lines in a strip
|
2003-11-27 10:07:01 -05:00
|
|
|
(TIFFTAG_ROWSPERSTRIP).</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
The <i>row</i> value should be the row of the first row in
|
|
|
|
the strip (strip * rowsperstrip, zero based).</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
Note that the raster is assume to be organized such that the
|
|
|
|
pixel at location (<i>x</i>,<i>y</i>) is
|
2002-10-07 09:47:36 -04: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
|
|
|
|
strip. That is bottom to top organization. When reading a
|
|
|
|
partial last strip in the file the last line of the image
|
2003-11-27 10:07:01 -05:00
|
|
|
will begin at the beginning of the buffer.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
Raster pixels are 8-bit packed red, green, blue, alpha
|
2002-10-07 09:47:36 -04:00
|
|
|
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
|
2003-11-27 10:07:01 -05:00
|
|
|
matting information have a constant Alpha of 1.0
|
|
|
|
(255).</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
See the <i>TIFFRGBAImage</i>(3T) page for more details on
|
|
|
|
how various image types are converted to RGBA
|
|
|
|
values.</td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="NOTES"></a>
|
|
|
|
<h2>NOTES</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
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>).</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
Palette image colormaps that appear to be incorrectly
|
2002-10-07 09:47:36 -04:00
|
|
|
written as 8-bit values are automatically scaled to
|
2003-11-27 10:07:01 -05:00
|
|
|
16-bits.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<i>TIFFReadRGBAStrip</i> is just a wrapper around the more
|
|
|
|
general <i>TIFFRGBAImage</i>(3T) facilities. It's main
|
|
|
|
advantage over the similar <i>TIFFReadRGBAImage()</i>
|
2002-10-07 09:47:36 -04:00
|
|
|
function is that for large images a single buffer capable of
|
2003-11-27 10:07:01 -05:00
|
|
|
holding the whole image doesn't need to be allocated, only
|
|
|
|
enough for one strip. The <i>TIFFReadRGBATile()</i> function
|
|
|
|
does a similar operation for tiled images.</td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="RETURN VALUES"></a>
|
|
|
|
<h2>RETURN VALUES</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
1 is returned if the image was successfully read and
|
2002-10-07 09:47:36 -04:00
|
|
|
converted. Otherwise, 0 is returned if an error was
|
2003-11-27 10:07:01 -05:00
|
|
|
encountered.</td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="DIAGNOSTICS"></a>
|
|
|
|
<h2>DIAGNOSTICS</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
All error messages are directed to the <i>TIFFError</i>(3T)
|
|
|
|
routine.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>Sorry, can not handle %d-bit pictures</b>. The image had
|
|
|
|
<i>BitsPerSample</i> other than 1, 2, 4, 8, or
|
|
|
|
16.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>Sorry, can not handle %d-channel images</b>. The image
|
|
|
|
had <i>SamplesPerPixel</i> other than 1, 3, or
|
|
|
|
4.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>Missing needed "PhotometricInterpretation"
|
2002-10-07 09:47:36 -04:00
|
|
|
tag</b>. The image did not have a tag that describes how to
|
2003-11-27 10:07:01 -05:00
|
|
|
display the data.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No "PhotometricInterpretation" tag, assuming
|
2002-10-07 09:47:36 -04:00
|
|
|
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
|
2003-11-27 10:07:01 -05:00
|
|
|
assumed to be <small>RGB.</small></td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No "PhotometricInterpretation" tag, assuming
|
2002-10-07 09:47:36 -04: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
|
2003-11-27 10:07:01 -05:00
|
|
|
assumed to be a grayscale or bilevel image.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<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></td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>Missing required "Colormap" tag</b>. A Palette
|
|
|
|
image did not have a required <i>Colormap</i>
|
|
|
|
tag.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No space for tile buffer</b>. There was insufficient
|
|
|
|
memory to allocate an i/o buffer.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No space for strip buffer</b>. There was insufficient
|
|
|
|
memory to allocate an i/o buffer.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>Can not handle format</b>. The image has a format
|
2002-10-07 09:47:36 -04:00
|
|
|
(combination of <i>BitsPerSample</i>,
|
|
|
|
<i>SamplesPerPixel</i>, and
|
|
|
|
<i>PhotometricInterpretation</i>) that
|
2003-11-27 10:07:01 -05:00
|
|
|
<i>TIFFReadRGBAImage</i> can not handle.</td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No space for B&W mapping table</b>. There was
|
2002-10-07 09:47:36 -04:00
|
|
|
insufficient memory to allocate a table used to map
|
2003-11-27 10:07:01 -05:00
|
|
|
grayscale data to <small>RGB.</small></td></table>
|
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<b>No space for Palette mapping table</b>. There was
|
2002-10-07 09:47:36 -04:00
|
|
|
insufficient memory to allocate a table used to map data to
|
2003-11-27 10:07:01 -05:00
|
|
|
8-bit <small>RGB.</small></td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<a name="SEE ALSO"></a>
|
|
|
|
<h2>SEE ALSO</h2>
|
2003-11-27 10:07:01 -05:00
|
|
|
|
|
|
|
<table width="100%" border=0 rules="none" frame="void"
|
2002-10-07 09:47:36 -04:00
|
|
|
cols="2" cellspacing="0" cellpadding="0">
|
|
|
|
<tr valign="top" align="left">
|
2003-11-27 10:07:01 -05:00
|
|
|
<td width="10%"></td><td width="90%">
|
|
|
|
<i>libtiff</i>(3T), <i>TIFFOpen</i>(3T),
|
2002-10-07 09:47:36 -04:00
|
|
|
<i>TIFFRGBAImage</i>(3T), <i>TIFFReadRGBAImage</i>(3T),
|
2003-11-27 10:07:01 -05:00
|
|
|
<i>TIFFReadRGBATile</i>(3T)</td></table>
|
2002-10-07 09:47:36 -04:00
|
|
|
<hr>
|
|
|
|
</body>
|
|
|
|
</html>
|