10139N/A<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
10139N/A<!--ArborText, Inc., 1988-1999, v.4002-->
13666N/A<!--ARC : LSARC 2003/085 libtiff, libjpeg, and libpng-->
10139N/A<!ENTITY exde-tt "EXTENDED DESCRIPTION">
10139N/A<!ENTITY synp-tt "SYNOPSIS">
10139N/A<!ENTITY cmd "TIFFReadRGBAStrip">
10139N/A<!ENTITY % commonents SYSTEM "smancommon.ent">
10139N/A%commonents;
10139N/A<!ENTITY % gnomecommonents SYSTEM "gnomecommon.ent">
10139N/A%gnomecommonents;
10139N/A<!ENTITY % booktitles SYSTEM "booktitles.ent">
10139N/A%booktitles;
10139N/A<!ENTITY suncopy "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.">
10139N/A]>
10139N/A<?Pub UDT _bookmark _target>
10139N/A<?Pub Inc>
10139N/A<?PubInc>
10139N/A<refentry id="TIFFReadRGBAStrip-3tiff">
10139N/A<!-- %Z%%M% %I% %E% SMI; -->
10139N/A<refmeta><refentrytitle>TIFFReadRGBAStrip</refentrytitle><manvolnum>3tiff
10139N/A</manvolnum>
10139N/A<refmiscinfo class="date">05 Apr 2004</refmiscinfo>
10139N/A<refmiscinfo class="sectdesc">&man3;</refmiscinfo>
10139N/A<refmiscinfo class="software">&release;</refmiscinfo>
10139N/A<refmiscinfo class="arch">generic</refmiscinfo>
10139N/A<refmiscinfo class="copyright">&suncopy;</refmiscinfo>
10139N/A</refmeta>
10139N/A<indexterm><primary>TIFFReadRGBAStrip</primary></indexterm><indexterm><primary>
10139N/Aread and decode an image strip into a fixed-format raster</primary></indexterm>
10139N/A<refnamediv id="TIFFReadRGBAStrip-3tiff-name"><refname>TIFFReadRGBAStrip</refname>
10139N/A<refpurpose>read and decode an image strip into a fixed-format raster</refpurpose>
10139N/A</refnamediv>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-synp"><title>&synp-tt;</title>
10139N/A<programlisting>#include &lt;tiffio.h>
10139N/A#define TIFFGetR(abgr) ((abgr) &amp; 0xff)
10139N/A#define TIFFGetG(abgr) (((abgr) >> 8) &amp; 0xff)
10139N/A#define TIFFGetB(abgr) (((abgr) >> 16) &amp; 0xff)
10139N/A#define TIFFGetA(abgr) (((abgr) >> 24) &amp; 0xff)
10139N/Aint TIFFReadRGBAStrip(TIFF* tif, tstrip_t strip, uint32 * raster )</programlisting>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-desc"><title>&desc-tt;</title>
10139N/A<para><literal>TIFFReadRGBAStrip</literal> reads a single strip of a strip-based
10139N/Aimage into memory, storing the result in the user-supplied RGBA raster. The
10139N/Araster is assumed to be an array of <replaceable>width</replaceable> times <replaceable>
10139N/Arowsperstrip</replaceable> 32-bit entries, where <replaceable>width</replaceable>
10139N/Ais the width of the image (<literal>TIFFTAG_IMAGEWIDTH</literal>), and <replaceable>
10139N/Arowsperstrip</replaceable> is the maximum number of lines in a strip (<literal>
10139N/ATIFFTAG_ROWSPERSTRIP</literal>).</para>
10139N/A<para>The <replaceable>strip</replaceable> value should be the strip number
10139N/A(the first strip is strip zero) as returned by the <literal>TIFFComputeStrip
10139N/A</literal> function, but always for sample 0.</para>
10139N/A<para>Note that the raster is assumed to be organized such that the pixel
10139N/Aat location (<replaceable>x,y</replaceable>) is <replaceable>raster[y*width+x]
10139N/A</replaceable>, with the raster origin in the bottom-left corner of the strip.
10139N/AThat is, bottom-to-top organization. When reading a partial last strip in
10139N/Athe file, the last line of the image begins at the beginning of the buffer.
10139N/A</para>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-exde"><title>&exde-tt;</title>
10139N/A<para>Raster pixels are 8-bit packed red, green, blue, alpha samples. The
10139N/Amacros <literal>TIFFGetR</literal>, <literal>TIFFGetG</literal>, <literal>
10139N/ATIFFGetB</literal>, and <literal>TIFFGetA</literal> should be used to access
10139N/Aindividual samples. Images without Associated Alpha matting information have
10139N/Aa constant Alpha of 1.0 (255).</para>
10139N/A<para>See <literal>TIFFRGBAImage(3tiff)</literal> for more information about how
10139N/Avarious image types are converted to RGBA values.</para>
10139N/A<refsect2 id="TIFFReadRGBAStrip-3tiff-exde-diags">
10139N/A<title>Diagnostics</title>
10139N/A<para>All error messages are directed to the <literal>TIFFError(3tiff)</literal>
10139N/Aroutine.</para>
10139N/A<variablelist termlength="wholeline">
10139N/A<varlistentry><term>Sorry, can not handle %d-bit pictures.</term><listitem>
10139N/A<para>The image has a <literal>BitsPerSample</literal> value other than 1,
10139N/A2, 4, 8, or 16.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>Sorry, can not handle %d-channel images.</term><listitem>
10139N/A<para>The image has a <literal>SamplesPerPixel</literal> value other than
10139N/A1, 3, or 4.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>Missing needed "PhotometricInterpretation" tag.</term>
10139N/A<listitem><para>The image does not have a tag that describes how to display
10139N/Athe data.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No "PhotometricInterpretation" tag, assuming RGB.</term>
10139N/A<listitem><para>The image does not have a tag that describes how to display
10139N/Athe data, but is assumed to be RGB because the image has 3 or 4 samples/pixel.
10139N/A</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No "PhotometricInterpretation" tag, assuming min-is-black.
10139N/A</term><listitem><para>The image does not have a tag that describes how to
10139N/Adisplay the data, but is assumed to be a grayscale or bilevel image because
10139N/Athe image has 1 sample/pixel.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No space for photometric conversion table.</term><listitem>
10139N/A<para>There is insufficient memory for a table needed to convert image samples
10139N/Ato 8-bit RGB.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>Missing required "Colormap" tag.</term><listitem><para>
10139N/AA Palette image does not have a required <literal>Colormap</literal> tag.
10139N/A</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No space for tile buffer.</term><listitem><para>There
10139N/Ais insufficient memory to allocate an i/o buffer.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No space for strip buffer.</term><listitem><para>There
10139N/Ais insufficient memory to allocate an i/o buffer.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>Can not handle format.</term><listitem><para>The image
10139N/Ahas a format (combination of <literal>BitsPerSample</literal>, <literal>SamplesPerPixel
10139N/A</literal>, and <literal>PhotometricInterpretation</literal>) that <literal>
10139N/ATIFFReadRGBAStrip</literal> cannot process.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No space for B&amp;W mapping table.</term><listitem><para>
10139N/AThere is insufficient memory to allocate a table needed to map grayscale data
10139N/Ato RGB.</para>
10139N/A</listitem></varlistentry>
10139N/A<varlistentry><term>No space for Palette mapping table.</term><listitem><para>
10139N/AThere is insufficient memory to allocate a table needed to map data to 8-bit
10139N/ARGB.</para>
10139N/A</listitem></varlistentry>
10139N/A</variablelist></refsect2>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-rtrn"><title>&rtrn-tt;</title>
10139N/A<para>1 is returned if the image was successfully read and converted. Otherwise,
10139N/A0 is returned if an error was encountered.</para>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-attr"><title>&attr-tt;</title>
10139N/A<para>See <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry>
10139N/A<refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>
10139N/Afor descriptions of the following attributes:</para>
10139N/A<informaltable frame="all">
10139N/A<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="COLSPEC0" colwidth="1*">
10139N/A<colspec colname="COLSPEC1" colwidth="1*">
10139N/A<thead>
10139N/A<row><entry align="center" valign="middle">ATTRIBUTE TYPE</entry><entry align="center"
10139N/Avalign="middle">ATTRIBUTE VALUE</entry></row>
10139N/A</thead>
10139N/A<tbody>
18745N/A<row><entry><para>Availability</para></entry><entry><para>image/library/libtiff</para></entry>
10139N/A</row>
10139N/A<row><entry colname="COLSPEC0"><para>Interface stability</para></entry><entry
13623N/Acolname="COLSPEC1"><para>Uncommitted</para></entry></row>
10139N/A</tbody>
10139N/A</tgroup>
10139N/A</informaltable>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-also"><title>&also-tt;</title>
10139N/A<!--Reference to another man page-->
10139N/A<!--Reference to a Help manual-->
10139N/A<!--Reference to a book.-->
10139N/A<para><citerefentry><refentrytitle>libtiff</refentrytitle><manvolnum>3</manvolnum>
10139N/A</citerefentry>, <citerefentry><refentrytitle>TIFFOpen</refentrytitle><manvolnum>
10139N/A3tiff</manvolnum></citerefentry>, <citerefentry><refentrytitle>TIFFRGBAImage
10139N/A</refentrytitle><manvolnum>3tiff</manvolnum></citerefentry>, <citerefentry>
10139N/A<refentrytitle>TIFFReadRGBAImage</refentrytitle><manvolnum>3tiff</manvolnum>
10139N/A</citerefentry>, <citerefentry><refentrytitle>TIFFReadRGBATile</refentrytitle>
10139N/A<manvolnum>3tiff</manvolnum></citerefentry></para>
10139N/A</refsect1>
10139N/A<refsect1 id="TIFFReadRGBAStrip-3tiff-note"><title>&note-tt;</title>
10139N/A<para>Orientations other than bottom-left or top-left are not processed correctly.
10139N/A</para>
10139N/A<para>Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel
10139N/Amust be either 1, 3, or 4 (that is, <literal>SamplesPerPixel</literal> minus <literal>
10139N/AExtraSamples</literal>).</para>
10139N/A<para>Palette image colormaps that appear to be incorrectly written as 8-bit
10139N/Avalues are automatically scaled to 16-bits.</para>
10139N/A<para><literal>TIFFReadRGBAStrip</literal> is just a wrapper around the more
10139N/Ageneral <literal>TIFFRGBAImage(3tiff)</literal> facilities. The main advantage
10139N/Aof <literal>TIFFReadRGBAStrip</literal> over the similar <literal>TIFFReadRGBAImage()
10139N/A</literal> function is that for large images, it is not necessary to allocate
10139N/Aa single buffer capable of holding the whole image. The buffer only needs
10139N/Ato <?Pub Caret>hold one strip. The <literal>TIFFReadRGBATile()</literal> function
10139N/Aperforms a similar operation for tiled images.</para>
10139N/A<para>This man page was originally written by Sam Leffler. Updated by Breda McColgan, Sun Microsystems Inc., 2004.</para>
10139N/A</refsect1>
10139N/A</refentry>
10139N/A<?Pub *0000009230>