Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/libtiff_2007@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
Executable
+251
@@ -0,0 +1,251 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML><HEAD><TITLE>Manpage of TIFFReadRGBATile</TITLE>
|
||||
</HEAD><BODY BGCOLOR=WHITE><FONT FACE="helvetica, sans, arial">
|
||||
<H1>TIFFReadRGBATile</H1>
|
||||
Section: Misc. Reference Manual Pages (3T)<BR>Updated: December 10, 1998<BR><A HREF="#index">Index</A>
|
||||
<BR><A HREF="index.html">Return to Main Contents</A>
|
||||
<HR>
|
||||
|
||||
<A NAME="lbAB"> </A>
|
||||
<H2>NAME</H2>
|
||||
|
||||
TIFFReadRGBATile - read and decode an image tile into a fixed-format raster
|
||||
<A NAME="lbAC"> </A>
|
||||
<H2>SYNOPSIS</H2>
|
||||
|
||||
<PRE>
|
||||
<B>#include <<A HREF="file:/usr/include/tiffio.h">tiffio.h</A>></B>
|
||||
|
||||
<B>#define TIFFGetR(abgr) ((abgr) & 0xff)</B>
|
||||
<B>#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)</B>
|
||||
<B>#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)</B>
|
||||
<B>#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)</B>
|
||||
|
||||
<B>int TIFFReadRGBATile(TIFF* tif, uint32 x, uint32 y, uint32 * raster )</B>
|
||||
</PRE><A NAME="lbAD"> </A>
|
||||
<H2>DESCRIPTION</H2>
|
||||
|
||||
<I>TIFFReadRGBATile</I>
|
||||
|
||||
reads a single tile of a tile-based image into memory, <BR>
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
Note that the raster is assume to be organized such that the pixel
|
||||
at location (<I>x</I>,<I>y</I>) is <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>
|
||||
<P>
|
||||
|
||||
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>
|
||||
|
||||
See the
|
||||
<I><A HREF="TIFFRGBAImage.3t.html">TIFFRGBAImage</A></I>(3T)
|
||||
|
||||
page for more details on how various image types are converted to RGBA
|
||||
values.
|
||||
<A NAME="lbAE"> </A>
|
||||
<H2>NOTES</H2>
|
||||
|
||||
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>
|
||||
|
||||
Palette image colormaps that appear to be incorrectly written
|
||||
as 8-bit values are automatically scaled to 16-bits.
|
||||
<P>
|
||||
|
||||
<I>TIFFReadRGBATile</I>
|
||||
|
||||
is just a wrapper around the more general
|
||||
<I><A HREF="TIFFRGBAImage.3t.html">TIFFRGBAImage</A></I>(3T)
|
||||
|
||||
facilities. It's main advantage over the similar
|
||||
<I>TIFFReadRGBAImage()</I>
|
||||
|
||||
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.
|
||||
<A NAME="lbAF"> </A>
|
||||
<H2>RETURN VALUES</H2>
|
||||
|
||||
1 is returned if the image was successfully read and converted.
|
||||
Otherwise, 0 is returned if an error was encountered.
|
||||
<A NAME="lbAG"> </A>
|
||||
<H2>DIAGNOSTICS</H2>
|
||||
|
||||
All error messages are directed to the
|
||||
<I><A HREF="TIFFError.3t.html">TIFFError</A></I>(3T)
|
||||
|
||||
routine.
|
||||
<P>
|
||||
|
||||
<B>Sorry, can not handle %d-bit pictures</B>.
|
||||
|
||||
The image had
|
||||
<I>BitsPerSample</I>
|
||||
|
||||
other than 1, 2, 4, 8, or 16.
|
||||
<P>
|
||||
|
||||
<B>Sorry, can not handle %d-channel images</B>.
|
||||
|
||||
The image had
|
||||
<I>SamplesPerPixel</I>
|
||||
|
||||
other than 1, 3, or 4.
|
||||
<P>
|
||||
|
||||
<B>Missing needed "PhotometricInterpretation" tag</B>.
|
||||
The image did not have a tag that describes how to display
|
||||
the data.
|
||||
<P>
|
||||
|
||||
<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
|
||||
<FONT SIZE="-1">RGB.</FONT>
|
||||
<P>
|
||||
|
||||
<B>No "PhotometricInterpretation" tag, assuming 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>
|
||||
|
||||
<B>No space for photometric conversion table</B>.
|
||||
|
||||
There was insufficient memory for a table used to convert
|
||||
image samples to 8-bit
|
||||
<FONT SIZE="-1">RGB.</FONT>
|
||||
<P>
|
||||
|
||||
<B>Missing required "Colormap" tag</B>.
|
||||
A Palette image did not have a required
|
||||
<I>Colormap</I>
|
||||
|
||||
tag.
|
||||
<P>
|
||||
|
||||
<B>No space for tile buffer</B>.
|
||||
|
||||
There was insufficient memory to allocate an i/o buffer.
|
||||
<P>
|
||||
|
||||
<B>No space for strip buffer</B>.
|
||||
|
||||
There was insufficient memory to allocate an i/o buffer.
|
||||
<P>
|
||||
|
||||
<B>Can not handle format</B>.
|
||||
|
||||
The image has a format (combination of
|
||||
<I>BitsPerSample</I>,
|
||||
|
||||
<I>SamplesPerPixel</I>,
|
||||
|
||||
and
|
||||
<I>PhotometricInterpretation</I>)
|
||||
|
||||
that
|
||||
<I>TIFFReadRGBAImage</I>
|
||||
|
||||
can not handle.
|
||||
<P>
|
||||
|
||||
<B>No space for B&W mapping table</B>.
|
||||
|
||||
There was insufficient memory to allocate a table used to map
|
||||
grayscale data to
|
||||
<FONT SIZE="-1">RGB.</FONT>
|
||||
<P>
|
||||
|
||||
<B>No space for Palette mapping table</B>.
|
||||
|
||||
There was insufficient memory to allocate a table used to map
|
||||
data to 8-bit
|
||||
<FONT SIZE="-1">RGB.</FONT>
|
||||
<A NAME="lbAH"> </A>
|
||||
<H2>BUGS</H2>
|
||||
|
||||
Orientations other than bottom-left, or top-left are
|
||||
not handled correctly.
|
||||
<A NAME="lbAI"> </A>
|
||||
<H2>SEE ALSO</H2>
|
||||
|
||||
<I><A HREF="libtiff.3t.html">libtiff</A></I>(3T),
|
||||
|
||||
<I><A HREF="TIFFOpen.3t.html">TIFFOpen</A></I>(3T),
|
||||
|
||||
<I><A HREF="TIFFRGBAImage.3t.html">TIFFRGBAImage</A></I>(3T),
|
||||
|
||||
<I><A HREF="TIFFReadRGBAImage.3t.html">TIFFReadRGBAImage</A></I>(3T),
|
||||
|
||||
<I><A HREF="TIFFReadRGBAStrip.3t.html">TIFFReadRGBAStrip</A></I>(3T)
|
||||
|
||||
|
||||
<HR>
|
||||
<A NAME="index"> </A><H2>Index</H2>
|
||||
<DL>
|
||||
<DT><A HREF="#lbAB">NAME</A><DD>
|
||||
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||||
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||||
<DT><A HREF="#lbAE">NOTES</A><DD>
|
||||
<DT><A HREF="#lbAF">RETURN VALUES</A><DD>
|
||||
<DT><A HREF="#lbAG">DIAGNOSTICS</A><DD>
|
||||
<DT><A HREF="#lbAH">BUGS</A><DD>
|
||||
<DT><A HREF="#lbAI">SEE ALSO</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by
|
||||
<A HREF="index.html">man2html</A>,
|
||||
using the manual pages.<BR>
|
||||
Time: 01:31:38 GMT, November 23, 1999
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user