8 #ifndef BOOST_GIL_IO_CONVERSION_POLICIES_HPP 9 #define BOOST_GIL_IO_CONVERSION_POLICIES_HPP 11 #include <boost/gil/image_view_factory.hpp> 12 #include <boost/gil/io/error.hpp> 16 #include <type_traits> 18 namespace boost{
namespace gil{
namespace detail {
20 struct read_and_no_convert
23 using color_converter_type =
void *;
25 template <
typename InIterator,
typename OutIterator>
27 InIterator
const& , InIterator
const& , OutIterator ,
28 typename std::enable_if
34 typename std::iterator_traits<InIterator>::value_type,
35 typename std::iterator_traits<OutIterator>::value_type
40 io_error(
"Data cannot be copied because the pixels are incompatible.");
43 template <
typename InIterator,
typename OutIterator>
44 void read(InIterator
const& begin, InIterator
const& end, OutIterator out,
45 typename std::enable_if
49 typename std::iterator_traits<InIterator>::value_type,
50 typename std::iterator_traits<OutIterator>::value_type
59 struct read_and_convert
62 using color_converter_type = default_color_converter;
68 read_and_convert(
const color_converter_type& cc )
72 template<
typename InIterator
73 ,
typename OutIterator
75 void read(
const InIterator& begin
76 ,
const InIterator& end
80 using deref_t = color_convert_deref_fn<typename std::iterator_traits<InIterator>::reference
81 ,
typename std::iterator_traits<OutIterator>::value_type
95 template<
typename Conversion_Policy >
99 struct is_read_only< detail::read_and_no_convert > : mpl::true_ {};
BOOST_FORCEINLINE boost::gil::pixel< T, Cs > * copy(boost::gil::pixel< T, Cs > *first, boost::gil::pixel< T, Cs > *last, boost::gil::pixel< T, Cs > *dst)
Copy when both src and dst are interleaved and of the same type can be just memmove.
Definition: algorithm.hpp:132
Definition: algorithm.hpp:30
Determines if reader type is read only ( no conversion ).
Definition: conversion_policies.hpp:96