blob: 219dd0a2e750fb3ffc1aef9a7ebbea50436d1eec [file] [log] [blame]
<!-- Copyright 2008 Lubomir Bourdev and Hailin Jin
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<!--
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<TITLE>Generic Image Library: tiff_io.hpp File Reference</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/>
<LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" style='width: 100%; margin: 0; padding: 0'><tr>
<td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'>
<div class="qindex"><a class="qindex" href="index.html">Modules</a>
| <a class="qindex" href="classes.html">Alphabetical List</a>
| <a class="qindex" href="annotated.html">Class List</a>
| <a class="qindex" href="dirs.html">Directories</a>
| <a class="qindex" href="files.html">File List</a>
| <a class="qindex" href="../index.html">GIL Home Page</a>
</div>
<!-- End Header -->
<!-- Generated by Doxygen 1.5.6 -->
<div class="navpath"><a class="el" href="g_i_l_0076.html">boost</a>&nbsp;&raquo&nbsp;<a class="el" href="g_i_l_0079.html">gil</a>&nbsp;&raquo&nbsp;<a class="el" href="g_i_l_0078.html">extension</a>&nbsp;&raquo&nbsp;<a class="el" href="g_i_l_0077.html">io</a>
</div>
<div class="contents">
<h1>tiff_io.hpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Support for reading and writing TIFF files Requires libtiff!
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Hailin Jin and Lubomir Bourdev <br>
Adobe Systems Incorporated </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>2005-2007 <br>
Last updated September 24, 2006 </dd></dl>
<p>
<code>#include &lt;vector&gt;</code><br>
<code>#include &lt;string&gt;</code><br>
<code>#include &lt;algorithm&gt;</code><br>
<code>#include &lt;boost/static_assert.hpp&gt;</code><br>
<code>#include &lt;tiffio.h&gt;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0090.html">../../gil_all.hpp</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="g_i_l_0228.html">io_error.hpp</a>&quot;</code><br>
<p>
<a href="g_i_l_0640.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceboost.html">boost</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>boost::gil::detail</b></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0623.html">tiff_read_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines whether the given view type is supported for reading. <a href="g_i_l_0623.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0625.html">tiff_write_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines whether the given view type is supported for writing. <a href="g_i_l_0625.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g2ba83bb2df815c50bab5526c5b411112"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_dimensions" ref="g2ba83bb2df815c50bab5526c5b411112" args="(const char *filename)" -->
point2&lt; std::ptrdiff_t &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g2ba83bb2df815c50bab5526c5b411112">tiff_read_dimensions</a> (const char *filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width and height of the TIFF file at the specified location. Throws std::ios_base::failure if the location does not correspond to a valid TIFF file. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g8b31d48262e61c900009ac6bd9e86bcd"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_dimensions" ref="g8b31d48262e61c900009ac6bd9e86bcd" args="(const std::string &amp;filename)" -->
point2&lt; std::ptrdiff_t &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g8b31d48262e61c900009ac6bd9e86bcd">tiff_read_dimensions</a> (const std::string &amp;filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width and height of the TIFF file at the specified location. Throws std::ios_base::failure if the location does not correspond to a valid TIFF file. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7fd10d03f899b14858eeb7b9c0c89f37"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_view" ref="g7fd10d03f899b14858eeb7b9c0c89f37" args="(const char *filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g7fd10d03f899b14858eeb7b9c0c89f37">tiff_read_view</a> (const char *filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. Triggers a compile assert if the view color space and channel depth are not supported by the TIFF library or by the I/O extension. Throws std::ios_base::failure if the file is not a valid TIFF file, or if its color space or channel depth are not compatible with the ones specified by View, or if its dimensions don't match the ones of the view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g4a2d3d9b5b0f3d963e5a8bec3c42cd91"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_view" ref="g4a2d3d9b5b0f3d963e5a8bec3c42cd91" args="(const std::string &amp;filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g4a2d3d9b5b0f3d963e5a8bec3c42cd91">tiff_read_view</a> (const std::string &amp;filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7de2814cc2089525400fe71ce00e78f9"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_image" ref="g7de2814cc2089525400fe71ce00e78f9" args="(const char *filename, Image &amp;im)" -->
template&lt;typename Image&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g7de2814cc2089525400fe71ce00e78f9">tiff_read_image</a> (const char *filename, Image &amp;im)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, and loads the pixels into it. Triggers a compile assert if the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> color space or channel depth are not supported by the TIFF library or by the I/O extension. Throws std::ios_base::failure if the file is not a valid TIFF file, or if its color space or channel depth are not compatible with the ones specified by Image. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g14ff6b4a743878cac2b32fdaedd5e705"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_image" ref="g14ff6b4a743878cac2b32fdaedd5e705" args="(const std::string &amp;filename, Image &amp;im)" -->
template&lt;typename Image&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g14ff6b4a743878cac2b32fdaedd5e705">tiff_read_image</a> (const std::string &amp;filename, Image &amp;im)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, and loads the pixels into it. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g6d0a5976a464ffecb65f576ea6fcbf0d"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_view" ref="g6d0a5976a464ffecb65f576ea6fcbf0d" args="(const char *filename, const View &amp;view, CC cc)" -->
template&lt;typename View, typename CC&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g6d0a5976a464ffecb65f576ea6fcbf0d">tiff_read_and_convert_view</a> (const char *filename, const View &amp;view, CC cc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads and color-converts the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. Throws std::ios_base::failure if the file is not a valid TIFF file, or if its dimensions don't match the ones of the view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gfbd25171c6709b26a918347c79123dec"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_view" ref="gfbd25171c6709b26a918347c79123dec" args="(const char *filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#gfbd25171c6709b26a918347c79123dec">tiff_read_and_convert_view</a> (const char *filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads and color-converts the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. Throws std::ios_base::failure if the file is not a valid TIFF file, or if its dimensions don't match the ones of the view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga6c1a60f6eb8fcf72e5d13017e7cb635"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_view" ref="ga6c1a60f6eb8fcf72e5d13017e7cb635" args="(const std::string &amp;filename, const View &amp;view, CC cc)" -->
template&lt;typename View, typename CC&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#ga6c1a60f6eb8fcf72e5d13017e7cb635">tiff_read_and_convert_view</a> (const std::string &amp;filename, const View &amp;view, CC cc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads and color-converts the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g70a389ee105e3e4d68c6b6b5960be3b5"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_view" ref="g70a389ee105e3e4d68c6b6b5960be3b5" args="(const std::string &amp;filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g70a389ee105e3e4d68c6b6b5960be3b5">tiff_read_and_convert_view</a> (const std::string &amp;filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads and color-converts the <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name into the given view. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7c4b48141392f077294832fc454a1305"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_image" ref="g7c4b48141392f077294832fc454a1305" args="(const char *filename, Image &amp;im, CC cc)" -->
template&lt;typename Image, typename CC&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g7c4b48141392f077294832fc454a1305">tiff_read_and_convert_image</a> (const char *filename, Image &amp;im, CC cc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, loads and color-converts the pixels into it. Throws std::ios_base::failure if the file is not a valid TIFF file. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0d7443b89bad3aea2c626b3c0bc14f36"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_image" ref="g0d7443b89bad3aea2c626b3c0bc14f36" args="(const char *filename, Image &amp;im)" -->
template&lt;typename Image&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g0d7443b89bad3aea2c626b3c0bc14f36">tiff_read_and_convert_image</a> (const char *filename, Image &amp;im)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, loads and color-converts the pixels into it. Throws std::ios_base::failure if the file is not a valid TIFF file. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7138a8a01225d3fec81ba55dda09b1ba"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_image" ref="g7138a8a01225d3fec81ba55dda09b1ba" args="(const std::string &amp;filename, Image &amp;im, CC cc)" -->
template&lt;typename Image, typename CC&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g7138a8a01225d3fec81ba55dda09b1ba">tiff_read_and_convert_image</a> (const std::string &amp;filename, Image &amp;im, CC cc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, loads and color-converts the pixels into it. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gde7bb58e80854798d895fef8406a6ad6"></a><!-- doxytag: member="tiff_io.hpp::tiff_read_and_convert_image" ref="gde7bb58e80854798d895fef8406a6ad6" args="(const std::string &amp;filename, Image &amp;im)" -->
template&lt;typename Image&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#gde7bb58e80854798d895fef8406a6ad6">tiff_read_and_convert_image</a> (const std::string &amp;filename, Image &amp;im)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates a new <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> whose dimensions are determined by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file, loads and color-converts the pixels into it. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1ef8f86c35347f6f0a5c3662fa1dca81"></a><!-- doxytag: member="tiff_io.hpp::tiff_write_view" ref="g1ef8f86c35347f6f0a5c3662fa1dca81" args="(const char *filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g1ef8f86c35347f6f0a5c3662fa1dca81">tiff_write_view</a> (const char *filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Saves the view to a tiff file specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name. Triggers a compile assert if the view color space and channel depth are not supported by the TIFF library or by the I/O extension. Throws std::ios_base::failure if it fails to create the file. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g99ce921bc92a5bbcf2145d3387e5e323"></a><!-- doxytag: member="tiff_io.hpp::tiff_write_view" ref="g99ce921bc92a5bbcf2145d3387e5e323" args="(const std::string &amp;filename, const View &amp;view)" -->
template&lt;typename View&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="g_i_l_0216.html#g99ce921bc92a5bbcf2145d3387e5e323">tiff_write_view</a> (const std::string &amp;filename, const View &amp;view)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Saves the view to a tiff file specified by the given tiff <a class="el" href="g_i_l_0038.html" title="container interface over image view. Models ImageConcept, PixelBasedConcept">image</a> file name. <br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 13:50:16 2009 for Generic Image Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>