Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83328 - in trunk/libs: . gil/example gil/io/doc gil/io/doc/html gil/io/doc/html/gil gil/io/doc/html/gil/io
From: chhenning_at_[hidden]
Date: 2013-03-05 20:43:47


Author: chhenning
Date: 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
New Revision: 83328
URL: http://svn.boost.org/trac/boost/changeset/83328

Log:
Added gil::io documentation and added it to libraries.htm.
Updated maintainer.txt to reflect new gil maintainer.
Added:
   trunk/libs/gil/io/doc/html/
   trunk/libs/gil/io/doc/html/gil/
   trunk/libs/gil/io/doc/html/gil/io/
   trunk/libs/gil/io/doc/html/gil/io/running_gil__io_tests.html (contents, props changed)
   trunk/libs/gil/io/doc/html/gil/io/tutorial.html (contents, props changed)
   trunk/libs/gil/io/doc/html/gil/io/using_io.html (contents, props changed)
   trunk/libs/gil/io/doc/html/index.html (contents, props changed)
Text files modified:
   trunk/libs/gil/example/interleaved_ptr.hpp | 2 +-
   trunk/libs/gil/example/mandelbrot.cpp | 2 +-
   trunk/libs/gil/io/doc/io.qbk | 2 +-
   trunk/libs/libraries.htm | 4 ++++
   trunk/libs/maintainers.txt | 2 +-
   5 files changed, 8 insertions(+), 4 deletions(-)

Modified: trunk/libs/gil/example/interleaved_ptr.hpp
==============================================================================
--- trunk/libs/gil/example/interleaved_ptr.hpp (original)
+++ trunk/libs/gil/example/interleaved_ptr.hpp 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -195,4 +195,4 @@
 };
 } } // namespace boost::gil
 
-#endif
\ No newline at end of file
+#endif

Modified: trunk/libs/gil/example/mandelbrot.cpp
==============================================================================
--- trunk/libs/gil/example/mandelbrot.cpp (original)
+++ trunk/libs/gil/example/mandelbrot.cpp 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -79,4 +79,4 @@
     jpeg_write_view("out-mandelbrot.jpg",mandel);
 
     return 0;
-}
\ No newline at end of file
+}

Added: trunk/libs/gil/io/doc/html/gil/io/running_gil__io_tests.html
==============================================================================
--- (empty file)
+++ trunk/libs/gil/io/doc/html/gil/io/running_gil__io_tests.html 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Running gil::io tests</title>
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="up" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="prev" href="using_io.html" title="Using IO">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="using_io.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a>
+</div>
+<div class="section gil_io_running_gil__io_tests">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="gil.io.running_gil__io_tests"></a><a class="link" href="running_gil__io_tests.html" title="Running gil::io tests">Running gil::io tests</a>
+</h2></div></div></div>
+<p>
+ gil::io comes with a large suite of test cases which reads and writes various
+ file formats. It uses some test image suites which can be found online or which
+ can be demanded from me by sending me an email ( <a href="../../chhenning" target="_top">**
+ @ ** gmail.com</a> ).
+ </p>
+<p>
+ There are some test images created by me in the test folder. To enable unit
+ tests which make use of them set the following compiler options BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
+ and BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES.
+ </p>
+<p>
+ The following list provides all links to the image suites the compiler symbol
+ to enable the tests:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ BMP: http://entropymine.com/jason/bmpsuite/
+ -- BOOST_GIL_IO_USE_BMP_TEST_SUITE_IMAGES
+ </li>
+<li class="listitem">
+ PNG: http://www.schaik.com/pngsuite/pngsuite.html
+ -- BOOST_GIL_IO_USE_PNG_TEST_SUITE_IMAGES
+ </li>
+<li class="listitem">
+ PNM: ** @ ** gmail.com -- BOOST_GIL_IO_USE_PNM_TEST_SUITE_IMAGES
+ </li>
+<li class="listitem">
+ TARGA: http://www.fileformat.info/format/tga/sample/index.htm
+ -- BOOST_GIL_IO_USE_TARGA_FILEFORMAT_TEST_SUITE_IMAGES
+ </li>
+<li class="listitem">
+ TIFF: http://www.remotesensing.org/libtiff/images.html
+ -- BOOST_GIL_IO_USE_TIFF_LIBTIFF_TEST_SUITE_IMAGES
+ </li>
+<li class="listitem">
+ TIFF ftp://ftp.graphicsmagick.org/pub/tiff-samples/tiff-sample-images-be.tar.gz
+ -- BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
+ </li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Christian Henning<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="using_io.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/gil/io/doc/html/gil/io/tutorial.html
==============================================================================
--- (empty file)
+++ trunk/libs/gil/io/doc/html/gil/io/tutorial.html 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -0,0 +1,191 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tutorial</title>
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="up" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="prev" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="next" href="using_io.html" title="Using IO">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../../index.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="using_io.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section gil_io_tutorial">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="gil.io.tutorial"></a><a class="link" href="tutorial.html" title="Tutorial">Tutorial</a>
+</h2></div></div></div>
+<p>
+ Thanks to modern C++ programming techniques the interface for this library
+ is rather small and easy to use. In this tutorial I'll give you a short walk-around
+ on how to use this boost::gil extension. For more details please refer to section
+ 3.
+ </p>
+<p>
+ Since this is an extension to boost::gil I expect the user to have some very
+ basic understanding of the gil ( generic image library ). Please see here for
+ the help.
+ </p>
+<h3>
+<a name="gil.io.tutorial.h0"></a>
+ <span class="phrase"><a name="gil.io.tutorial.header_files"></a></span><a class="link" href="tutorial.html#gil.io.tutorial.header_files">Header
+ Files</a>
+ </h3>
+<p>
+ The header files to be included all have the same format. For instance, tiff_all.hpp
+ will allow to read and write. Whereas, tiff_read.hpp only allows for reading.
+ If the user only wants to write jpeg's include jpeg_write.hpp. All formats
+ provide these three types of header files:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ xxx_all.hpp
+ </li>
+<li class="listitem">
+ xxx_read.hpp
+ </li>
+<li class="listitem">
+ xxx_write.hpp
+ </li>
+</ul></div>
+<p>
+ xxx stands for image format.
+ </p>
+<h3>
+<a name="gil.io.tutorial.h1"></a>
+ <span class="phrase"><a name="gil.io.tutorial.reading_an_image"></a></span><a class="link" href="tutorial.html#gil.io.tutorial.reading_an_image">Reading
+ An Image</a>
+ </h3>
+<p>
+ Probably the most common case to read a tiff image can be done as follows:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">filename</span><span class="special">(</span> <span class="string">"image.tif"</span> <span class="special">);</span>
+<span class="identifier">rgb8_image_t</span> <span class="identifier">img</span><span class="special">;</span>
+<span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">filename</span><span class="special">,</span> <span class="identifier">img</span><span class="special">,</span> <span class="identifier">tiff_tag</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ The code would be same for all other image formats. The only thing that needs
+ to change is the tag type ( tiff_tag ) in the read_image call. The read_image()
+ expects the supplied image type to be compatible with the image stored in the
+ file. If the user doesn't know what format an image has he/she can use read_and_convert_image().
+ Another important fact is that read_image() will allocate the appropriate memory
+ needed for the read operation. There are read_view or read_and_convert_view
+ counterparts, if the memory is already allocated.
+ </p>
+<p>
+ Sometimes the user only wants to read a sub-part of an image, then the above
+ call would look as follows:
+ </p>
+<pre class="programlisting"><span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">img</span>
+ <span class="special">,</span> <span class="identifier">image_read_settings</span><span class="special">&lt;</span> <span class="identifier">tiff_tag</span> <span class="special">&gt;(</span> <span class="identifier">point_t</span><span class="special">(</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span> <span class="special">),</span> <span class="identifier">point_t</span><span class="special">(</span> <span class="number">50</span><span class="special">,</span> <span class="number">50</span> <span class="special">)</span> <span class="special">)</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ The image_read_settings class will provide the user with image format independent
+ reading setting but can also serves as a pointer for format dependent settings.
+ Please see the specific image format sections <a class="link" href="using_io.html#gil.io.using_io.supported_image_formats">Supported
+ Image Formats</a> for more details.
+ </p>
+<h3>
+<a name="gil.io.tutorial.h2"></a>
+ <span class="phrase"><a name="gil.io.tutorial.writing_an_image"></a></span><a class="link" href="tutorial.html#gil.io.tutorial.writing_an_image">Writing
+ An Image</a>
+ </h3>
+<p>
+ Besides reading the information also writing is the second part of this boost::gil
+ extension. Writing is a lot simpler than reading since an existing image view
+ contains all the information. For instance writing an image can be done as
+ follows:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">filename</span><span class="special">(</span> <span class="string">"image.tif"</span> <span class="special">);</span>
+<span class="identifier">rgb8_image_t</span> <span class="identifier">img</span><span class="special">(</span> <span class="number">640</span><span class="special">,</span> <span class="number">480</span> <span class="special">);</span>
+
+<span class="comment">// write data into image</span>
+
+<span class="identifier">write_view</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">img</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">tiff_tag</span><span class="special">()</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ The interface is similar to reading an image. To add image format specific
+ parameter the user can use image_write_info class. For instance, a user can
+ specify the jpeg quality when writing like this:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">filename</span><span class="special">(</span> <span class="string">"image.jpg"</span> <span class="special">);</span>
+<span class="identifier">rgb8_image_t</span> <span class="identifier">img</span><span class="special">(</span> <span class="number">640</span><span class="special">,</span> <span class="number">480</span> <span class="special">);</span>
+
+<span class="comment">// write data into image</span>
+
+<span class="identifier">write_view</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">img</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">image_write_info</span><span class="special">&lt;</span> <span class="identifier">jpeg_tag</span> <span class="special">&gt;(</span> <span class="number">95</span> <span class="special">)</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ The above example will write an image where the jpeg quality is set to 95 percent.
+ </p>
+<h3>
+<a name="gil.io.tutorial.h3"></a>
+ <span class="phrase"><a name="gil.io.tutorial.reading_and_writing_in_memory_buffers"></a></span><a class="link" href="tutorial.html#gil.io.tutorial.reading_and_writing_in_memory_buffers">Reading
+ And Writing In-Memory Buffers</a>
+ </h3>
+<p>
+ Reading and writing in-memory buffers are supported as well. See as follows:
+ </p>
+<pre class="programlisting"><span class="comment">// 1. Read an image.</span>
+<span class="identifier">ifstream</span> <span class="identifier">in</span><span class="special">(</span> <span class="string">"test.tif"</span><span class="special">,</span> <span class="identifier">ios</span><span class="special">::</span><span class="identifier">binary</span> <span class="special">);</span>
+
+<span class="identifier">rgb8_image_t</span> <span class="identifier">img</span><span class="special">;</span>
+<span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">in</span><span class="special">,</span> <span class="identifier">img</span><span class="special">,</span> <span class="identifier">tiff_tag</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="comment">// 2. Write image to in-memory buffer.</span>
+<span class="identifier">stringstream</span> <span class="identifier">out_buffer</span><span class="special">(</span> <span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">out</span> <span class="special">|</span> <span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">binary</span> <span class="special">);</span>
+
+<span class="identifier">rgb8_image_t</span> <span class="identifier">src</span><span class="special">;</span>
+<span class="identifier">write_view</span><span class="special">(</span> <span class="identifier">out_buffer</span><span class="special">,</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">src</span> <span class="special">),</span> <span class="identifier">tiff_tag</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="comment">// 3. Copy in-memory buffer to another.</span>
+<span class="identifier">stringstream</span> <span class="identifier">in_buffer</span><span class="special">(</span> <span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">in</span> <span class="special">|</span> <span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">binary</span> <span class="special">);</span>
+<span class="identifier">in_buffer</span> <span class="special">&lt;&lt;</span> <span class="identifier">out_buffer</span><span class="special">.</span><span class="identifier">rdbuf</span><span class="special">();</span>
+
+<span class="comment">// 4. Read in-memory buffer to gil image</span>
+<span class="identifier">rgb8_image_t</span> <span class="identifier">dst</span><span class="special">;</span>
+<span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">in_buffer</span><span class="special">,</span> <span class="identifier">dst</span><span class="special">,</span> <span class="identifier">tag_t</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="comment">// 5. Write out image.</span>
+<span class="identifier">string</span> <span class="identifier">filename</span><span class="special">(</span> <span class="string">"out.tif"</span> <span class="special">);</span>
+<span class="identifier">ofstream</span> <span class="identifier">out</span><span class="special">(</span> <span class="identifier">filename</span><span class="special">.</span><span class="identifier">c_str</span><span class="special">(),</span> <span class="identifier">ios_base</span><span class="special">::</span><span class="identifier">binary</span> <span class="special">);</span>
+<span class="identifier">write_view</span><span class="special">(</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">dst</span> <span class="special">),</span> <span class="identifier">tiff_tag</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ In case the user is using his own stream classes he has to make sure it has
+ the common interface read, write, seek, close, etc. Interface.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Christian Henning<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../../index.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="using_io.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/gil/io/doc/html/gil/io/using_io.html
==============================================================================
--- (empty file)
+++ trunk/libs/gil/io/doc/html/gil/io/using_io.html 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -0,0 +1,772 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Using IO</title>
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="up" href="../../index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="running_gil__io_tests.html" title="Running gil::io tests">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="running_gil__io_tests.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section gil_io_using_io">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="gil.io.using_io"></a><a class="link" href="using_io.html" title="Using IO">Using IO</a>
+</h2></div></div></div>
+<h3>
+<a name="gil.io.using_io.h0"></a>
+ <span class="phrase"><a name="gil.io.using_io.general_overview"></a></span><a class="link" href="using_io.html#gil.io.using_io.general_overview">General
+ Overview</a>
+ </h3>
+<p>
+ The tutorial pointed out some use cases for reading and writing images in various
+ image formats. This section will provide a more thorough overview.
+ </p>
+<p>
+ The next sections will introduce the Read and Write interface. But it might
+ be worth poiting out that by using some advanced metaprogramming techniques
+ the interface is rather small and hopefully easy to understand.
+ </p>
+<p>
+ Besides the general interface the user also has the ability to interface directly
+ with the underlying image format. For that each reader or writer provides access
+ to the so-called backend. For instance:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">get_reader_backend</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span>
+ <span class="special">,</span> <span class="identifier">tag_t</span>
+ <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">backend_t</span><span class="special">;</span>
+
+<span class="identifier">backend_t</span> <span class="identifier">backend</span> <span class="special">=</span> <span class="identifier">read_image_info</span><span class="special">(</span> <span class="identifier">bmp_filename</span>
+ <span class="special">,</span> <span class="identifier">tag_t</span><span class="special">()</span>
+ <span class="special">);</span>
+
+<span class="identifier">BOOST_CHECK_EQUAL</span><span class="special">(</span> <span class="identifier">backend</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_width</span> <span class="special">,</span> <span class="number">127</span> <span class="special">);</span>
+<span class="identifier">BOOST_CHECK_EQUAL</span><span class="special">(</span> <span class="identifier">backend</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_height</span><span class="special">,</span> <span class="number">64</span> <span class="special">);</span>
+</pre>
+<p>
+ Of course, the typedef can be removed when using c++11's auto feature.
+ </p>
+<h3>
+<a name="gil.io.using_io.h1"></a>
+ <span class="phrase"><a name="gil.io.using_io.read_interface"></a></span><a class="link" href="using_io.html#gil.io.using_io.read_interface">Read
+ Interface</a>
+ </h3>
+<p>
+ As the Tutorial demonstrated there are a few ways to read images. Here is an
+ enumeration of all read functions with a short description:
+ </p>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">read_image</span> <span class="special">-</span> <span class="identifier">read</span> <span class="identifier">into</span> <span class="identifier">a</span> <span class="identifier">gil</span> <span class="identifier">image</span> <span class="identifier">with</span> <span class="identifier">no</span> <span class="identifier">conversion</span><span class="special">.</span> <span class="identifier">Memory</span> <span class="identifier">is</span> <span class="identifier">allocated</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">read_view</span> <span class="special">-</span> <span class="identifier">read</span> <span class="identifier">into</span> <span class="identifier">a</span> <span class="identifier">gil</span> <span class="identifier">view</span> <span class="identifier">with</span> <span class="identifier">no</span> <span class="identifier">conversion</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">read_and_convert_image</span> <span class="special">-</span> <span class="identifier">read</span> <span class="keyword">and</span> <span class="identifier">convert</span> <span class="identifier">into</span> <span class="identifier">a</span> <span class="identifier">gil</span> <span class="identifier">image</span><span class="special">.</span> <span class="identifier">Memory</span> <span class="identifier">is</span> <span class="identifier">allocated</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">read_and_convert_view</span> <span class="special">-</span> <span class="identifier">read</span> <span class="keyword">and</span> <span class="identifier">convert</span> <span class="identifier">into</span> <span class="identifier">a</span> <span class="identifier">gil</span> <span class="identifier">view</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">read_image_info</span> <span class="special">-</span> <span class="identifier">read</span> <span class="identifier">the</span> <span class="identifier">image</span> <span class="identifier">header</span><span class="special">.</span>
+</pre>
+<p>
+ Conversion in this context is necessary if the source ( file ) has an incompatible
+ color space with the destination ( gil image type ). If that's the case the
+ user has to use the xxx_and_convert_xxx variants.
+ </p>
+<p>
+ All functions take the filename or a device as the first parameter. The filename
+ can be anything from a c string, std::string, std::wstring, and a boost::filesystem
+ path. When using the path object the user needs to define the ADD_FS_PATH_SUPPORT
+ compiler symbol to include the boost::filesystem dependency. Devices could
+ be a FILE*, std::ifstream, and a TIFF* for TIFF images.
+ </p>
+<p>
+ The second parameter is either an image or view type depending on the read_xxx
+ function. The third and last parameter is either an instance of the image_read_settings&lt;FormatTag&gt;
+ or just the FormatTag. The settings can be various depending on the format
+ which is being read. But the all share settings for reading a partial image
+ area. The first point describes the top left image coordinate whereas the second
+ are the dimensions in x and y directions. Here an example of setting up partial
+ read.
+ </p>
+<pre class="programlisting"><span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">img</span>
+ <span class="special">,</span> <span class="identifier">image_read_settings</span><span class="special">&lt;</span> <span class="identifier">tiff_tag</span> <span class="special">&gt;(</span> <span class="identifier">point_t</span><span class="special">(</span> <span class="number">0</span><span class="special">,</span> <span class="number">0</span> <span class="special">),</span> <span class="identifier">point_t</span><span class="special">(</span> <span class="number">50</span><span class="special">,</span> <span class="number">50</span> <span class="special">)</span> <span class="special">)</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ Each format supports reading just the header information, using read_image_info().
+ Please refer to the format specific sections under 3.3. A basic example follows:
+ </p>
+<pre class="programlisting"><span class="identifier">image_read_info</span><span class="special">&lt;</span> <span class="identifier">tiff_t</span> <span class="special">&gt;</span> <span class="identifier">info</span> <span class="special">=</span> <span class="identifier">read_image_info</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">tiff_t</span><span class="special">()</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ GIL also comes with a dynamic image extension. In the context of GIL.IO a user
+ can define an any_image type based on several image types. The IO extension
+ would then pick the matching image type to the current image file. The following
+ example shows this feature:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">gray8_image_t</span>
+ <span class="special">,</span> <span class="identifier">gray16_image_t</span>
+ <span class="special">,</span> <span class="identifier">rgb8_image_t</span>
+ <span class="special">,</span> <span class="identifier">rgba_image_t</span>
+ <span class="special">&gt;</span> <span class="identifier">my_img_types</span><span class="special">;</span>
+
+<span class="identifier">any_image</span><span class="special">&lt;</span> <span class="identifier">my_img_types</span> <span class="special">&gt;</span> <span class="identifier">runtime_image</span><span class="special">;</span>
+
+<span class="identifier">read_image</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">runtime_image</span>
+ <span class="special">,</span> <span class="identifier">tiff_tag</span><span class="special">()</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ During the review it became clear that there is a need to read big images scanline
+ by scanline. To support such use case a scanline_reader is implemented for
+ all supported image formats. The scanline_read_iterators will then allow to
+ traverse through the image. The following code sample shows the usage:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">tiff_tag</span> <span class="identifier">tag_t</span><span class="special">;</span>
+
+<span class="keyword">typedef</span> <span class="identifier">scanline_reader</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">get_read_device</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span>
+ <span class="special">,</span> <span class="identifier">tag_t</span>
+ <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> <span class="identifier">tag_t</span>
+ <span class="special">&gt;</span> <span class="identifier">reader_t</span><span class="special">;</span>
+
+<span class="identifier">reader_t</span> <span class="identifier">reader</span> <span class="special">=</span> <span class="identifier">make_scanline_reader</span><span class="special">(</span> <span class="string">"C:/boost/libs/gil/io/test_images/tiff/test.tif"</span><span class="special">,</span> <span class="identifier">tag_t</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="keyword">typedef</span> <span class="identifier">rgba8_image_t</span> <span class="identifier">image_t</span><span class="special">;</span>
+
+<span class="identifier">image_t</span> <span class="identifier">dst</span><span class="special">(</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_width</span><span class="special">,</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_height</span> <span class="special">);</span>
+<span class="identifier">fill_pixels</span><span class="special">(</span> <span class="identifier">view</span><span class="special">(</span><span class="identifier">dst</span><span class="special">),</span> <span class="identifier">image_t</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">()</span> <span class="special">);</span>
+
+<span class="keyword">typedef</span> <span class="identifier">reader_t</span><span class="special">::</span><span class="identifier">iterator_t</span> <span class="identifier">iterator_t</span><span class="special">;</span>
+
+<span class="identifier">iterator_t</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+<span class="identifier">iterator_t</span> <span class="identifier">end</span> <span class="special">=</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+
+<span class="keyword">for</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">row</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">end</span><span class="special">;</span> <span class="special">++</span><span class="identifier">it</span><span class="special">,</span> <span class="special">++</span><span class="identifier">row</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">copy_pixels</span><span class="special">(</span> <span class="identifier">interleaved_view</span><span class="special">(</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_width</span>
+ <span class="special">,</span> <span class="number">1</span>
+ <span class="special">,</span> <span class="special">(</span> <span class="identifier">image_t</span><span class="special">::</span><span class="identifier">view_t</span><span class="special">::</span><span class="identifier">x_iterator</span> <span class="special">)</span> <span class="special">*</span><span class="identifier">it</span>
+ <span class="special">,</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">_scanline_length</span>
+ <span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">subimage_view</span><span class="special">(</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">dst</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="number">0</span>
+ <span class="special">,</span> <span class="identifier">row</span>
+ <span class="special">,</span> <span class="identifier">reader</span><span class="special">.</span><span class="identifier">_info</span><span class="special">.</span><span class="identifier">_width</span>
+ <span class="special">,</span> <span class="number">1</span>
+ <span class="special">)</span>
+ <span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ There are many ways to travese an image but for as of now only by scanline
+ is supported.
+ </p>
+<h3>
+<a name="gil.io.using_io.h2"></a>
+ <span class="phrase"><a name="gil.io.using_io.write_interface"></a></span><a class="link" href="using_io.html#gil.io.using_io.write_interface">Write
+ Interface</a>
+ </h3>
+<p>
+ There is only one function for writing out images, write_view. Similar to reading
+ the first parameter is either a filename or a device. The filename can be anything
+ from a c string, std::string, std::wstring, and a boost::filesystem path. When
+ using the path object the user needs to define the ADD_FS_PATH_SUPPORT compiler
+ symbol to include the boost::filesystem dependency. Devices could be a FILE*,
+ std::ifstream, and a TIFF* for TIFF images.
+ </p>
+<p>
+ The second parameter is an view object to image being written. The third and
+ last parameter is either a tag or an image_write_info&lt; FormatTag &gt; object
+ containing more settings. One example for instance is the jpeg quality. Refer
+ to the format specific sections under 3.3. to have a list of all the possible
+ settings.
+ </p>
+<p>
+ Writing an any_image&lt;...&gt; is supported. See the following example:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">gray8_image_t</span>
+ <span class="special">,</span> <span class="identifier">gray16_image_t</span>
+ <span class="special">,</span> <span class="identifier">rgb8_image_t</span>
+ <span class="special">,</span> <span class="identifier">rgba_image_t</span>
+ <span class="special">&gt;</span> <span class="identifier">my_img_types</span><span class="special">;</span>
+
+
+<span class="identifier">any_image</span><span class="special">&lt;</span> <span class="identifier">my_img_types</span> <span class="special">&gt;</span> <span class="identifier">runtime_image</span><span class="special">;</span>
+
+<span class="comment">// fill any_image </span>
+
+<span class="identifier">write_view</span><span class="special">(</span> <span class="identifier">filename</span>
+ <span class="special">,</span> <span class="identifier">view</span><span class="special">(</span> <span class="identifier">runtime_image</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">tiff_tag</span><span class="special">()</span>
+ <span class="special">);</span>
+</pre>
+<h3>
+<a name="gil.io.using_io.h3"></a>
+ <span class="phrase"><a name="gil.io.using_io.compiler_symbols"></a></span><a class="link" href="using_io.html#gil.io.using_io.compiler_symbols">Compiler
+ Symbols</a>
+ </h3>
+<p>
+ The following table gives an overview of all supported compiler symbols that
+ can be set by the user:
+ </p>
+<div class="table">
+<a name="gil.io.using_io.t0"></a><p class="title"><b>Table&#160;1.1.&#160;Compiler Symbols</b></p>
+<div class="table-contents"><table class="table" summary="Compiler Symbols">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Symbol
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_ENABLE_GRAY_ALPHA
+ </p>
+ </td>
+<td>
+ <p>
+ Enable the color space "gray_alpha".
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_ADD_FS_PATH_SUPPORT
+ </p>
+ </td>
+<td>
+ <p>
+ Enable boost::filesystem 3.0 library.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED
+ </p>
+ </td>
+<td>
+ <p>
+ Use libpng in floating point mode. This symbol is incompatible with
+ BOOST_GIL_IO_PNG_FIXED_POINT_SUPPORTED.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_PNG_FIXED_POINT_SUPPORTED
+ </p>
+ </td>
+<td>
+ <p>
+ Use libpng in integer mode. This symbol is incompatible with BOOST_GIL_IO_PNG_FLOATING_POINT_SUPPORTED.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_EXTENSION_IO_JPEG_C_LIB_COMPILED_AS_CPLUSPLUS
+ </p>
+ </td>
+<td>
+ <p>
+ libjpeg is compiled as c++ lib.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_EXTENSION_IO_PNG_C_LIB_COMPILED_AS_CPLUSPLUS
+ </p>
+ </td>
+<td>
+ <p>
+ libpng is compiled as c++ lib.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_EXTENSION_IO_RAW_C_LIB_COMPILED_AS_CPLUSPLUS
+ </p>
+ </td>
+<td>
+ <p>
+ libraw is compiled as c++ lib.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_EXTENSION_IO_TIFF_C_LIB_COMPILED_AS_CPLUSPLUS
+ </p>
+ </td>
+<td>
+ <p>
+ libtiff is compiled as c++ lib.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Allow basic test images to be read from local hard drive. The paths
+ can be set in paths.hpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Allow images to be written to the local hard drive. The paths can
+ be set in paths.hpp
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_BMP_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the bmp test images suite. See http://entropymine.com/jason/bmpsuite/
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_PNG_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the png test images suite. See http://www.schaik.com/pngsuite/pngsuite.html
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_PNM_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the pnm test images suite. Send me an email for accessing
+ the files.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_TARGA_FILEFORMAT_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the targa file format test images suite. See http://www.fileformat.info/format/tga/sample/index.htm
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_TIFF_LIBTIFF_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the targa file format test images suite. See http://www.remotesensing.org/libtiff/images.html
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
+ </p>
+ </td>
+<td>
+ <p>
+ Run tests using the targa file format test images suite. See ftp://ftp.graphicsmagick.org/pub/tiff-samples/tiff-sample-images-be.tar.gz
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><h3>
+<a name="gil.io.using_io.h4"></a>
+ <span class="phrase"><a name="gil.io.using_io.supported_image_formats"></a></span><a class="link" href="using_io.html#gil.io.using_io.supported_image_formats">Supported
+ Image Formats</a>
+ </h3>
+<h4>
+<a name="gil.io.using_io.h5"></a>
+ <span class="phrase"><a name="gil.io.using_io.bmp"></a></span><a class="link" href="using_io.html#gil.io.using_io.bmp">BMP</a>
+ </h4>
+<p>
+ For a general overview of the BMP image file format go to the following http://en.wikipedia.org/wiki/BMP_file_format.
+ </p>
+<p>
+ Please note, the code has not been tested on X Windows System variations of
+ the BMP format which are usually referred to XBM and XPM formats.
+ </p>
+<p>
+ Here, only the MS Windows and OS/2 format is relevant.
+ </p>
+<p>
+ Currently the code is able to read and write the following image types:
+ </p>
+<p>
+ Read: gray1_image_t, gray4_image_t, gray8_image_t, rgb8_image_t and, rgba8_image_t
+ Write: rgb8_image_t and, rgba8_image_t
+ </p>
+<p>
+ The lack of having an indexed image type in gil restricts the current interface
+ to only write out non-indexed images. This is subject to change soon.
+ </p>
+<h4>
+<a name="gil.io.using_io.h6"></a>
+ <span class="phrase"><a name="gil.io.using_io.jpeg"></a></span><a class="link" href="using_io.html#gil.io.using_io.jpeg">JPEG</a>
+ </h4>
+<p>
+ For a general overview of the JPEG image file format go to the following http://en.wikipedia.org/wiki/JPEG.
+ </p>
+<p>
+ This jpeg extension is based on the libjpeg library which can be found here,
+ <span class="underline">JPEG_Lib</span>.
+ </p>
+<p>
+ The user has to make sure this library is properly installed. I strongly recommend
+ the user to build the library yourself. It could potentially save you a lot
+ of trouble.
+ </p>
+<p>
+ Currently the code is able to read and write the following image types:
+ </p>
+<p>
+ Read: gray8_image_t, rgb8_image_t, cmyk8_image_t Write: gray8_image_t, rgb8_image_t,
+ cmyk8_image_t
+ </p>
+<p>
+ Reading YCbCr or YCCK images is possible but might result in inaccuracies since
+ both color spaces aren't available yet for gil. For now these color space are
+ read as rgb images. This is subject to change soon.
+ </p>
+<h4>
+<a name="gil.io.using_io.h7"></a>
+ <span class="phrase"><a name="gil.io.using_io.png"></a></span><a class="link" href="using_io.html#gil.io.using_io.png">PNG</a>
+ </h4>
+<p>
+ For a general overview of the PNG image file format go to the following http://en.wikipedia.org/wiki/Portable_Network_Graphics.
+ </p>
+<p>
+ This png extension is based on the libpng, which can be found here, _PNG_Lib.
+ </p>
+<p>
+ The user has to make sure this library is properly installed. I strongly recommend
+ the user to build the library yourself. It could potentially save you a lot
+ of trouble.
+ </p>
+<p>
+ Currently the code is able to read and write the following image types:
+ </p>
+<p>
+ Read: gray1, gray2, gray4, gray8, gray16, gray_alpha_8, gray_alpha_16, rgb8,
+ rgb16, rgba8, rgba16 Write: gray1, gray2, gray4, gray8, gray16, gray_alpha_8,
+ gray_alpha_16, rgb8, rgb16, rgba8, rgba16
+ </p>
+<p>
+ For reading gray_alpha images the user has to enable the ENABLE_GRAY_ALPHA
+ compiler switch. This color space is defined in the toolbox by using gray_alpha.hpp.
+ </p>
+<h4>
+<a name="gil.io.using_io.h8"></a>
+ <span class="phrase"><a name="gil.io.using_io.pnm"></a></span><a class="link" href="using_io.html#gil.io.using_io.pnm">PNM</a>
+ </h4>
+<p>
+ For a general overview of the PNM image file format go to the following http://en.wikipedia.org/wiki/Portable_anymap.
+ </p>
+<p>
+ No external library is needed for the pnm format. Both ascii and binary formats
+ are supported.
+ </p>
+<p>
+ Currently the code is able to read and write the following image types:
+ </p>
+<p>
+ Read: gray1, gray8, rgb8 Write: gray1, gray8, rgb8
+ </p>
+<p>
+ When reading a mono text image the data is read as a gray8 image.
+ </p>
+<h4>
+<a name="gil.io.using_io.h9"></a>
+ <span class="phrase"><a name="gil.io.using_io.raw"></a></span><a class="link" href="using_io.html#gil.io.using_io.raw">RAW</a>
+ </h4>
+<p>
+ For a general overview see _RAW_Wiki.
+ </p>
+<p>
+ Currently the extension is only able to read rgb8 images.
+ </p>
+<h4>
+<a name="gil.io.using_io.h10"></a>
+ <span class="phrase"><a name="gil.io.using_io.targa"></a></span><a class="link" href="using_io.html#gil.io.using_io.targa">TARGA</a>
+ </h4>
+<p>
+ For a general overview of the BMP image file format go to the following <span class="underline">TARGA_Wiki</span>.
+ </p>
+<p>
+ Currently the code is able to read and write the following image types:
+ </p>
+<p>
+ Read: rgb8_image_t and rgba8_image_t Write: rgb8_image_t and rgba8_image_t
+ </p>
+<p>
+ The lack of having an indexed image type in gil restricts the current interface
+ to only write out non-indexed images. This is subject to change soon.
+ </p>
+<h4>
+<a name="gil.io.using_io.h11"></a>
+ <span class="phrase"><a name="gil.io.using_io.tiff"></a></span><a class="link" href="using_io.html#gil.io.using_io.tiff">TIFF</a>
+ </h4>
+<p>
+ For a general overview of the TIFF image file format go to the following http://en.wikipedia.org/wiki/Tagged_Image_File_Format.
+ </p>
+<p>
+ This tiff extension is based on the libtiff, which can be found, http://www.remotesensing.org/libtiff/.
+ </p>
+<p>
+ The user has to make sure this library is properly installed. I strongly recommend
+ the user to build the library yourself. It could potentially save you a lot
+ of trouble.
+ </p>
+<p>
+ TIFF images can virtually encode all kinds of channel sizes representing various
+ color spaces. Even planar images are possible. For instance, rbg323 or gray7.
+ The channels also can have specific formats, like integer values or floating
+ point values. For a complete set of options please consult the following websites:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ http://www.awaresystems.be/imaging/tiff/tifftags/baseline.html
+ </li>
+<li class="listitem">
+ http://www.awaresystems.be/imaging/tiff/tifftags/extension.html
+ </li>
+</ul></div>
+<p>
+ The author of this extension is not claiming all tiff formats are supported.
+ This extension is likely to be a moving target adding new features with each
+ new milestone. Here is an incomplete lists:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ Multi-page tiffs - read only
+ </li>
+<li class="listitem">
+ Strip tiffs - read and write support
+ </li>
+<li class="listitem">
+ Tiled tiffs - read and write support with user defined tiled sizes
+ </li>
+<li class="listitem">
+ bit images tiffs - fully supported, like gray1_image_t ( minisblack )
+ </li>
+<li class="listitem">
+ planar tiffs - fully supported
+ </li>
+<li class="listitem">
+ floating point tiffs - fully supported
+ </li>
+<li class="listitem">
+ palette tiffs - supported but no indexed image type is available as of
+ now
+ </li>
+</ul></div>
+<p>
+ This gil extension uses two different test image suites to test read and write
+ capabilities. See test_image folder. It's advisable to use ImageMagick's test
+ viewer to display images.
+ </p>
+<h3>
+<a name="gil.io.using_io.h12"></a>
+ <span class="phrase"><a name="gil.io.using_io.extending_gil__io_with_new_formats"></a></span><a class="link" href="using_io.html#gil.io.using_io.extending_gil__io_with_new_formats">Extending
+ GIL::IO with new Formats</a>
+ </h3>
+<p>
+ Extending the gil::io with new formats is meant to be simple and straightforward.
+ Before adding I would recommend to have a look at existing implementations
+ and then trying to follow a couple of guidelines:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ Create the following files for your new xxx format
+ <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
+<li class="listitem">
+ xxx_read.hpp // Only includes read code
+ </li>
+<li class="listitem">
+ xxx_write.hpp // Only includes write code
+ </li>
+<li class="listitem">
+ xxx_all.hpp // includes xxx_read.hpp and xxx_write.hpp
+ </li>
+</ul></div>
+ </li>
+<li class="listitem">
+ Add the code to the boost::gil::detail namespace
+ </li>
+<li class="listitem">
+ Create a tag type for the new format. Like this:
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xxx_tag</span> <span class="special">:</span> <span class="identifier">format_tag</span> <span class="special">{};</span>
+</pre>
+ </li>
+<li class="listitem">
+ Create the image_read_info for the new format. It contains all the information
+ that are necessary to read an image. It should be filled and returned by
+ the get_info() member of the reader class. See below.
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">image_read_info</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span> <span class="special">&gt;</span> <span class="special">{};</span>
+</pre>
+ </li>
+<li class="listitem">
+ Create the image_write_info for the new format. It contains all the information
+ that are necessary to write an image.
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">image_write_info</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span> <span class="special">&gt;</span> <span class="special">{};</span>
+</pre>
+ </li>
+<li class="listitem">
+ Use the following reader skeleton as a start:
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Device</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ConversionPolicy</span>
+ <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">reader</span><span class="special">&lt;</span> <span class="identifier">Device</span>
+ <span class="special">,</span> <span class="identifier">xxx_tag</span>
+ <span class="special">,</span> <span class="identifier">ConversionPolicy</span>
+ <span class="special">&gt;</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">reader_base</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span>
+ <span class="special">,</span> <span class="identifier">ConversionPolicy</span>
+ <span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">private</span><span class="special">:</span>
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">ConversionPolicy</span><span class="special">::</span><span class="identifier">color_converter_type</span> <span class="identifier">cc_t</span><span class="special">;</span>
+
+<span class="keyword">public</span><span class="special">:</span>
+
+ <span class="identifier">reader</span><span class="special">(</span> <span class="identifier">Device</span><span class="special">&amp;</span> <span class="identifier">device</span> <span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">_io_dev</span><span class="special">(</span> <span class="identifier">device</span> <span class="special">)</span>
+ <span class="special">{}</span>
+
+ <span class="identifier">reader</span><span class="special">(</span> <span class="identifier">Device</span><span class="special">&amp;</span> <span class="identifier">device</span>
+ <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">cc_t</span><span class="special">&amp;</span> <span class="identifier">cc</span>
+ <span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">_io_dev</span><span class="special">(</span> <span class="identifier">device</span> <span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">reader_base</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span>
+ <span class="special">,</span> <span class="identifier">ConversionPolicy</span>
+ <span class="special">&gt;(</span> <span class="identifier">cc</span> <span class="special">)</span>
+ <span class="special">{}</span>
+
+ <span class="identifier">image_read_info</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span> <span class="special">&gt;</span> <span class="identifier">get_info</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="comment">// your implementation here</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">View</span> <span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">View</span><span class="special">&amp;</span> <span class="identifier">dst_view</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="comment">// your implementation here</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+ </li>
+<li class="listitem">
+ The writer skeleton:
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Device</span> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">writer</span><span class="special">&lt;</span> <span class="identifier">Device</span>
+ <span class="special">,</span> <span class="identifier">xxx_tag</span>
+ <span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+
+ <span class="identifier">writer</span><span class="special">(</span> <span class="identifier">Device</span> <span class="special">&amp;</span> <span class="identifier">file</span> <span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">out</span><span class="special">(</span><span class="identifier">file</span><span class="special">)</span>
+ <span class="special">{}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">View</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">View</span><span class="special">&amp;</span> <span class="identifier">view</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="comment">// your implementation here</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">View</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">View</span><span class="special">&amp;</span> <span class="identifier">view</span>
+ <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">image_write_info</span><span class="special">&lt;</span> <span class="identifier">xxx_tag</span> <span class="special">&gt;&amp;</span> <span class="identifier">info</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="comment">// your implementation here</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+ </li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2012 Christian Henning<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../index.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="running_gil__io_tests.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/gil/io/doc/html/index.html
==============================================================================
--- (empty file)
+++ trunk/libs/gil/io/doc/html/index.html 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -0,0 +1,109 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;Boost.GIL.IO</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Boost.GIL.IO">
+<link rel="next" href="gil/io/tutorial.html" title="Tutorial">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="gil/io/tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="gil.io"></a>Chapter&#160;1.&#160;Boost.GIL.IO</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Christian</span> <span class="surname">Henning</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 2012 Christian Henning</p></div>
+<div><div class="legalnotice">
+<a name="gil.io.legal"></a><p>
+ 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)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dt><span class="section">Using IO</span></dt>
+<dt><span class="section">Running gil::io tests</span></dt>
+</dl>
+</div>
+<div class="section gil_io_overview">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="gil.io.overview"></a><a class="link" href="index.html#gil.io.overview" title="Overview">Overview</a>
+</h2></div></div></div>
+<p>
+ This extension to boost::gil provides an easy to use interface for reading
+ and writing various image formats. It also includes a framework for adding
+ new formats.
+ </p>
+<p>
+ Please see section 3.3 for all supported image formats. A basic tutorial is
+ provided in section <a class="link" href="gil/io/tutorial.html" title="Tutorial">Tutorial</a>. Also,
+ this extension requires Boost version 1.42 and up. Furthermore the gil extension
+ Toolbox is used.
+ </p>
+<p>
+ For adding new image formats please refer to section <a class="link" href="gil/io/using_io.html#gil.io.using_io.extending_gil__io_with_new_formats">Extending
+ GIL::IO with new Formats</a>.
+ </p>
+<h3>
+<a name="gil.io.overview.h0"></a>
+ <span class="phrase"><a name="gil.io.overview.supported_platforms"></a></span><a class="link" href="index.html#gil.io.overview.supported_platforms">Supported
+ Platforms</a>
+ </h3>
+<p>
+ All platforms supported by boost which have a decent C++ compiler. Depending
+ on the image format one or more of the following image libraries might be needed:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ libtiff
+ </li>
+<li class="listitem">
+ libjpeg
+ </li>
+<li class="listitem">
+ libpng
+ </li>
+<li class="listitem">
+ libraw
+ </li>
+<li class="listitem">
+ zlib
+ </li>
+</ul></div>
+<p>
+ The library is designed to support as many formats as required by the user.
+ For instance, if the user only needs bmp support none of the above mentioned
+ dependencies are required.
+ </p>
+<p>
+ There are more details available in this documentation on the image format
+ dependencies. Please see section <a class="link" href="gil/io/using_io.html#gil.io.using_io.supported_image_formats">Supported
+ Image Formats</a>.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: March 06, 2013 at 01:32:50 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="gil/io/tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
+</body>
+</html>

Modified: trunk/libs/gil/io/doc/io.qbk
==============================================================================
--- trunk/libs/gil/io/doc/io.qbk (original)
+++ trunk/libs/gil/io/doc/io.qbk 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -1,7 +1,7 @@
 [library Boost.GIL.IO
         [quickbook 1.3]
     [authors [Henning, Christian] ]
- [copyright 2012 Christian Henning]
+ [copyright 2013 Christian Henning]
     [purpose
         An generic, user-friendly interface for reading and writing different image formats.
     ]

Modified: trunk/libs/libraries.htm
==============================================================================
--- trunk/libs/libraries.htm (original)
+++ trunk/libs/libraries.htm 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -160,6 +160,8 @@
         From Joel de Guzman, Dan Marsden and Tobias Schwinger.</li>
     <li>gil - Generic Image Library, from
         Lubomir Bourdev and Hailin Jin.</li>
+ <li>gil::io - Generic Image Library IO extension, from
+ Christian Henning.</li>
     <li>geometry - Geometry Library, from
         Barend Gehrels, Bruno Lalande and Mateusz Loskot.</li>
     <li>graph -
@@ -593,6 +595,8 @@
 <ul>
   <li>gil - Generic Image Library, from
   Lubomir Bourdev and Hailin Jin.</li>
+ <li>gil::io - Generic Image Library IO extension, from
+ Christian Henning.</li>
 </ul>
 
 <h3><a name="IO">Input/Output</a></h3>

Modified: trunk/libs/maintainers.txt
==============================================================================
--- trunk/libs/maintainers.txt (original)
+++ trunk/libs/maintainers.txt 2013-03-05 20:43:46 EST (Tue, 05 Mar 2013)
@@ -46,7 +46,7 @@
 fusion Joel de Guzman <joel -at- boost-consulting.com>, Dan Marsden <danmarsden -at- yahoo.co.uk>, Tobias Schwinger <tschwinger -at- isonews2.com>
 function_types Tobias Schwinger <tschwinger -at- isonews2.com>
 geometry Barend Gehrels<barend -at- xs4all.nl>, Bruno Lalande <bruno.lalande -at- gmail.com>, Mateusz Loskot <mateusz -at- loskot.net>
-gil Lubomir Bourdev <lbourdev -at- adobe.com>, Hailin Jin <hljin -at- adobe.com>
+gil Christian Henning <chhenning -at- gmail.com>
 graph Andrew Sutton <asutton -at- cs.kent.edu>
 heap Tim Blechmann <tim -at- klingt.org>
 icl Joachim Faulhaber <afojgo -at- gmail.com>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk