summaryrefslogtreecommitdiff
path: root/boost/gil/extension/io/tiff/old.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/gil/extension/io/tiff/old.hpp')
-rw-r--r--boost/gil/extension/io/tiff/old.hpp60
1 files changed, 20 insertions, 40 deletions
diff --git a/boost/gil/extension/io/tiff/old.hpp b/boost/gil/extension/io/tiff/old.hpp
index d0fa548a37..cd2d97e2ec 100644
--- a/boost/gil/extension/io/tiff/old.hpp
+++ b/boost/gil/extension/io/tiff/old.hpp
@@ -1,24 +1,13 @@
-/*
- Copyright 2007-2008 Christian Henning
- Use, modification and distribution are subject to 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 2007-2008 Christian Henning
+//
+// 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_TIFF_OLD_HPP
#define BOOST_GIL_EXTENSION_IO_TIFF_OLD_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2007-2008 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
#include <boost/gil/extension/io/tiff.hpp>
namespace boost { namespace gil {
@@ -26,32 +15,23 @@ namespace boost { namespace gil {
/// \ingroup TIFF_IO
/// \brief 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
-template< typename String >
-inline
-point2< std::ptrdiff_t > tiff_read_dimensions( const String& filename )
+template<typename String>
+inline point_t tiff_read_dimensions(String const& filename)
{
- typedef typename get_reader_backend< String
- , tiff_tag
- >::type backend_t;
-
- backend_t backend = read_image_info( filename
- , tiff_tag()
- );
-
- return point2< std::ptrdiff_t >( backend._info._width
- , backend._info._height
- );
+ using backend_t = typename get_reader_backend<String, tiff_tag>::type;
+ backend_t backend = read_image_info(filename, tiff_tag());
+ return { backend._info._width, backend._info._height };
}
/// \ingroup TIFF_IO
/// \brief Loads the image specified by the given tiff image 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
+/// 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.
template< typename String
, typename View
>
-inline
+inline
void tiff_read_view( const String& filename
, const View& view
)
@@ -65,12 +45,12 @@ void tiff_read_view( const String& filename
/// \ingroup TIFF_IO
/// \brief Allocates a new image whose dimensions are determined by the given tiff image file, and loads the pixels into it.
/// Triggers a compile assert if the image 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
+/// 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
template< typename String
, typename Image
>
-inline
+inline
void tiff_read_image( const String& filename
, Image& img
)
@@ -88,7 +68,7 @@ template< typename String
, typename View
, typename CC
>
-inline
+inline
void tiff_read_and_convert_view( const String& filename
, const View& view
, CC cc
@@ -107,7 +87,7 @@ void tiff_read_and_convert_view( const String& filename
template< typename String
, typename View
>
-inline
+inline
void tiff_read_and_convert_view( const String& filename
, const View& view
)
@@ -125,7 +105,7 @@ template< typename String
, typename Image
, typename CC
>
-inline
+inline
void tiff_read_and_convert_image( const String& filename
, Image& img
, CC cc
@@ -144,7 +124,7 @@ void tiff_read_and_convert_image( const String& filename
template< typename String
, typename Image
>
-inline
+inline
void tiff_read_and_convert_image( const String filename
, Image& img
)