|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /usr/local/share/doc/tiff-4.6.0/manual/functions/ |
Upload File : |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>TIFFReadRGBAStrip — LibTIFF 4.6.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinxdoc.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="TIFFReadRGBATile" href="TIFFReadRGBATile.html" />
<link rel="prev" title="TIFFReadRGBAImage" href="TIFFReadRGBAImage.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="TIFFReadRGBATile.html" title="TIFFReadRGBATile"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="TIFFReadRGBAImage.html" title="TIFFReadRGBAImage"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">LibTIFF 4.6.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../functions.html" accesskey="U">TIFF Functions Overview</a> »</li>
<li class="nav-item nav-item-this"><a href="">TIFFReadRGBAStrip</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="tiffreadrgbastrip">
<h1>TIFFReadRGBAStrip<a class="headerlink" href="#tiffreadrgbastrip" title="Permalink to this heading">¶</a></h1>
<section id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading">¶</a></h2>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf"><tiffio.h></span>
</pre></div>
</div>
<dl class="c function">
<dt class="sig sig-object c" id="c.TIFFReadRGBAStrip">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">TIFFReadRGBAStrip</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">TIFF</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">tif</span></span>, <span class="n"><span class="pre">uint32_t</span></span><span class="w"> </span><span class="n"><span class="pre">row</span></span>, <span class="n"><span class="pre">uint32_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">raster</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.TIFFReadRGBAStrip" title="Permalink to this definition">¶</a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.TIFFReadRGBAStripExt">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">TIFFReadRGBAStripExt</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">TIFF</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">tif</span></span>, <span class="n"><span class="pre">uint32_t</span></span><span class="w"> </span><span class="n"><span class="pre">row</span></span>, <span class="n"><span class="pre">uint32_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">raster</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">stop_on_error</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.TIFFReadRGBAStripExt" title="Permalink to this definition">¶</a><br /></dt>
<dd></dd></dl>
</section>
<section id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this heading">¶</a></h2>
<p><a class="reference internal" href="#c.TIFFReadRGBAStrip" title="TIFFReadRGBAStrip"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBAStrip()</span></code></a> reads a single strip of a strip-based image
into memory, storing the result in the user supplied RGBA <em>raster</em>.
The raster is assumed to be an array of <code class="docutils literal notranslate"><span class="pre">ImageWidth</span></code> × <code class="docutils literal notranslate"><span class="pre">RowsPerStrip</span></code>
32-bit entries, where <code class="docutils literal notranslate"><span class="pre">ImageWidth</span></code> is the width of the image
(<code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFTAG_IMAGEWIDTH</span></code>) and <code class="docutils literal notranslate"><span class="pre">RowsPerStrip</span></code> is the maximum lines
in a strip (<code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFTAG_ROWSPERSTRIP</span></code>).</p>
<p><a class="reference internal" href="#c.TIFFReadRGBAStripExt" title="TIFFReadRGBAStripExt"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBAStripExt()</span></code></a> provides the paramater <cite>stop_on_error</cite>.
Its behaviour is described at <a class="reference internal" href="TIFFReadRGBAImage.html"><span class="doc">TIFFReadRGBAImage</span></a>.</p>
<p>The <em>row</em> value should be the row of the first row in the strip
(<em>strip</em> × <code class="docutils literal notranslate"><span class="pre">RowsPerStrip</span></code>, zero based).</p>
<p>Note that the raster is assume to be organized such that the pixel at location
(<em>x</em>, <em>y</em>) is <em>raster</em> [ <em>y</em> × <em>width</em> + <em>x</em> ]; with the raster origin in the
<em>lower-left hand corner</em> of the strip. That is bottom to top organization.
When reading a partial last strip in the file the last line of the image will
begin at the beginning of the buffer.</p>
<p>Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros
<a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFGetR" title="TIFFGetR"><code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFGetR</span></code></a>, <a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFGetG" title="TIFFGetG"><code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFGetG</span></code></a>, <a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFGetB" title="TIFFGetB"><code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFGetB</span></code></a>, and
<a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFGetA" title="TIFFGetA"><code class="xref c c-macro docutils literal notranslate"><span class="pre">TIFFGetA</span></code></a> should be used to access individual samples. Images
without Associated Alpha matting information have a constant Alpha of 1.0
(255).</p>
<p>See the <a class="reference internal" href="TIFFRGBAImage.html"><span class="doc">TIFFRGBAImage</span></a> page for more details on how various image types
are converted to RGBA values.</p>
</section>
<section id="notes">
<h2>Notes<a class="headerlink" href="#notes" title="Permalink to this heading">¶</a></h2>
<p>Samples must be either 1, 2, 4, 8, or 16 bits.
Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. <code class="docutils literal notranslate"><span class="pre">SamplesPerPixel</span></code>
- <code class="docutils literal notranslate"><span class="pre">ExtraSamples</span></code>).</p>
<p>Palette image colormaps that appear to be incorrectly written as 8-bit values
are automatically scaled to 16-bits.</p>
<p><a class="reference internal" href="#c.TIFFReadRGBAStrip" title="TIFFReadRGBAStrip"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBAStrip()</span></code></a> is just a wrapper around the more general
<a class="reference internal" href="TIFFRGBAImage.html"><span class="doc">TIFFRGBAImage</span></a> facilities. It’s main advantage over the similar
<a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFReadRGBAImage" title="TIFFReadRGBAImage"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBAImage()</span></code></a> 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 strip. The <a class="reference internal" href="TIFFReadRGBATile.html#c.TIFFReadRGBATile" title="TIFFReadRGBATile"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBATile()</span></code></a> function
does a similar operation for tiled images.</p>
</section>
<section id="return-values">
<h2>Return values<a class="headerlink" href="#return-values" title="Permalink to this heading">¶</a></h2>
<p>1 is returned if the image was successfully read and converted.
Otherwise, 0 is returned if an error was encountered.</p>
</section>
<section id="diagnostics">
<h2>Diagnostics<a class="headerlink" href="#diagnostics" title="Permalink to this heading">¶</a></h2>
<p>All error messages are directed to the <a class="reference internal" href="TIFFError.html#c.TIFFErrorExtR" title="TIFFErrorExtR"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFErrorExtR()</span></code></a> routine.</p>
<p><code class="docutils literal notranslate"><span class="pre">"Sorry,</span> <span class="pre">can</span> <span class="pre">not</span> <span class="pre">handle</span> <span class="pre">%d-bit</span> <span class="pre">pictures"</span></code>:</p>
<blockquote>
<div><p>The image had <code class="docutils literal notranslate"><span class="pre">BitsPerSample</span></code> other than 1, 2, 4, 8, or 16.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"Sorry,</span> <span class="pre">can</span> <span class="pre">not</span> <span class="pre">handle</span> <span class="pre">%d-channel</span> <span class="pre">images"</span></code>:</p>
<blockquote>
<div><p>The image had <code class="docutils literal notranslate"><span class="pre">SamplesPerPixel</span></code> other than 1, 3, or 4.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">Missing</span> <span class="pre">needed</span> <span class="pre">"PhotometricInterpretation"</span> <span class="pre">tag</span></code>:</p>
<blockquote>
<div><p>The image did not have a tag that describes how to display the data.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">No</span> <span class="pre">"PhotometricInterpretation"</span> <span class="pre">tag,</span> <span class="pre">assuming</span> <span class="pre">RGB</span></code>:</p>
<blockquote>
<div><p>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 RGB.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">No</span> <span class="pre">"PhotometricInterpretation"</span> <span class="pre">tag,</span> <span class="pre">assuming</span> <span class="pre">min-is-black\fP</span></code>:</p>
<blockquote>
<div><p>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>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"No</span> <span class="pre">space</span> <span class="pre">for</span> <span class="pre">photometric</span> <span class="pre">conversion</span> <span class="pre">table"</span></code>:</p>
<blockquote>
<div><p>There was insufficient memory for a table used to convert image samples to
8-bit RGB.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">Missing</span> <span class="pre">required</span> <span class="pre">"Colormap"</span> <span class="pre">tag</span></code>:</p>
<blockquote>
<div><p>A Palette image did not have a required <code class="docutils literal notranslate"><span class="pre">Colormap</span></code> tag.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"No</span> <span class="pre">space</span> <span class="pre">for</span> <span class="pre">tile</span> <span class="pre">buffer"</span></code>:</p>
<blockquote>
<div><p>There was insufficient memory to allocate an i/o buffer.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"No</span> <span class="pre">space</span> <span class="pre">for</span> <span class="pre">strip</span> <span class="pre">buffer"</span></code>:</p>
<blockquote>
<div><p>There was insufficient memory to allocate an i/o buffer.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"Can</span> <span class="pre">not</span> <span class="pre">handle</span> <span class="pre">format"</span></code>:</p>
<blockquote>
<div><p>The image has a format (combination of <code class="docutils literal notranslate"><span class="pre">BitsPerSample</span></code>,
<code class="docutils literal notranslate"><span class="pre">SamplesPerPixel</span></code>, and <code class="docutils literal notranslate"><span class="pre">PhotometricInterpretation</span></code>)
that <a class="reference internal" href="TIFFReadRGBAImage.html#c.TIFFReadRGBAImage" title="TIFFReadRGBAImage"><code class="xref c c-func docutils literal notranslate"><span class="pre">TIFFReadRGBAImage()</span></code></a> can not handle.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"No</span> <span class="pre">space</span> <span class="pre">for</span> <span class="pre">B&W</span> <span class="pre">mapping</span> <span class="pre">table"</span></code>:</p>
<blockquote>
<div><p>There was insufficient memory to allocate a table used to map grayscale data
to RGB.</p>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">"No</span> <span class="pre">space</span> <span class="pre">for</span> <span class="pre">Palette</span> <span class="pre">mapping</span> <span class="pre">table"</span></code>:</p>
<blockquote>
<div><p>There was insufficient memory to allocate a table used to map data to 8-bit
RGB.</p>
</div></blockquote>
</section>
<section id="see-also">
<h2>See also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
<p><a class="reference internal" href="TIFFOpen.html"><span class="doc">TIFFOpen</span></a> (3tiff),
<a class="reference internal" href="TIFFRGBAImage.html"><span class="doc">TIFFRGBAImage</span></a> (3tiff),
<a class="reference internal" href="TIFFReadRGBAImage.html"><span class="doc">TIFFReadRGBAImage</span></a> (3tiff),
<a class="reference internal" href="TIFFReadRGBATile.html"><span class="doc">TIFFReadRGBATile</span></a> (3tiff),
<a class="reference internal" href="libtiff.html"><span class="doc">libtiff</span></a> (3tiff)</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">TIFFReadRGBAStrip</a><ul>
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li><a class="reference internal" href="#description">Description</a></li>
<li><a class="reference internal" href="#notes">Notes</a></li>
<li><a class="reference internal" href="#return-values">Return values</a></li>
<li><a class="reference internal" href="#diagnostics">Diagnostics</a></li>
<li><a class="reference internal" href="#see-also">See also</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="TIFFReadRGBAImage.html"
title="previous chapter">TIFFReadRGBAImage</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="TIFFReadRGBATile.html"
title="next chapter">TIFFReadRGBATile</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/functions/TIFFReadRGBAStrip.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="TIFFReadRGBATile.html" title="TIFFReadRGBATile"
>next</a> |</li>
<li class="right" >
<a href="TIFFReadRGBAImage.html" title="TIFFReadRGBAImage"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">LibTIFF 4.6.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../functions.html" >TIFF Functions Overview</a> »</li>
<li class="nav-item nav-item-this"><a href="">TIFFReadRGBAStrip</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 1988-2022, LibTIFF contributors.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.0.1.
</div>
</body>
</html>