update boost
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
@@ -117,11 +118,7 @@ public:
|
||||
};
|
||||
|
||||
template< typename FormatTag >
|
||||
struct is_adaptable_input_device< FormatTag
|
||||
, LibRaw
|
||||
, void
|
||||
>
|
||||
: mpl::true_
|
||||
struct is_adaptable_input_device<FormatTag, LibRaw, void> : std::true_type
|
||||
{
|
||||
using device_type = file_stream_device<FormatTag>;
|
||||
};
|
||||
|
||||
@@ -11,29 +11,31 @@
|
||||
#include <boost/gil/extension/io/raw/tags.hpp>
|
||||
#include <boost/gil/io/base.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
template< typename View >
|
||||
bool is_allowed( const image_read_info< raw_tag >& info
|
||||
, mpl::true_ // is read_and_no_convert
|
||||
, std::true_type // is read_and_no_convert
|
||||
)
|
||||
{
|
||||
using pixel_t = typename get_pixel_type<View>::type;
|
||||
using num_channel_t = typename num_channels<pixel_t>::value_type;
|
||||
using channel_t = typename channel_traits<typename element_type<typename View::value_type>::type>::value_type;
|
||||
|
||||
const num_channel_t dst_samples_per_pixel = num_channels< pixel_t >::value;
|
||||
const unsigned int dst_bits_per_pixel = detail::unsigned_integral_num_bits< channel_t >::value;
|
||||
const bool is_type_signed = boost::is_signed< channel_t >::value;
|
||||
constexpr num_channel_t dst_samples_per_pixel = num_channels<pixel_t>::value;
|
||||
constexpr unsigned int dst_bits_per_pixel = detail::unsigned_integral_num_bits<channel_t>::value;
|
||||
constexpr bool is_type_signed = std::is_signed<channel_t>::value;
|
||||
|
||||
return( dst_samples_per_pixel == info._samples_per_pixel &&
|
||||
dst_bits_per_pixel == static_cast<unsigned int>(info._bits_per_pixel) &&
|
||||
!is_type_signed );
|
||||
return (dst_samples_per_pixel == info._samples_per_pixel &&
|
||||
dst_bits_per_pixel == static_cast<unsigned int>(info._bits_per_pixel) &&
|
||||
!is_type_signed);
|
||||
}
|
||||
|
||||
template< typename View >
|
||||
bool is_allowed( const image_read_info< raw_tag >& /* info */
|
||||
, mpl::false_ // is read_and_convert
|
||||
, std::false_type // is read_and_convert
|
||||
)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -13,17 +13,18 @@
|
||||
#include <boost/gil/extension/io/raw/detail/is_allowed.hpp>
|
||||
#include <boost/gil/extension/io/raw/detail/reader_backend.hpp>
|
||||
|
||||
#include <boost/gil/io/detail/dynamic.hpp>
|
||||
#include <boost/gil/io/base.hpp>
|
||||
#include <boost/gil/io/bit_operations.hpp>
|
||||
#include <boost/gil/io/conversion_policies.hpp>
|
||||
#include <boost/gil/io/device.hpp>
|
||||
#include <boost/gil/io/dynamic_io_new.hpp>
|
||||
#include <boost/gil/io/reader_base.hpp>
|
||||
#include <boost/gil/io/row_buffer_helper.hpp>
|
||||
#include <boost/gil/io/typedefs.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace gil {
|
||||
@@ -100,7 +101,7 @@ public:
|
||||
io_error( "Image header was not read." );
|
||||
}
|
||||
|
||||
using is_read_and_convert_t = typename is_same
|
||||
using is_read_and_convert_t = typename std::is_same
|
||||
<
|
||||
ConversionPolicy,
|
||||
detail::read_and_no_convert
|
||||
@@ -165,10 +166,7 @@ struct raw_type_format_checker
|
||||
bool apply()
|
||||
{
|
||||
using view_t = typename Image::view_t;
|
||||
|
||||
return is_allowed< view_t >( _info
|
||||
, mpl::true_()
|
||||
);
|
||||
return is_allowed<view_t>(_info, std::true_type{});
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -202,12 +200,12 @@ public:
|
||||
)
|
||||
{}
|
||||
|
||||
template< typename Images >
|
||||
void apply( any_image< Images >& images )
|
||||
template< typename ...Images >
|
||||
void apply( any_image< Images... >& images )
|
||||
{
|
||||
detail::raw_type_format_checker format_checker( this->_info );
|
||||
|
||||
if( !construct_matched( images
|
||||
if( !detail::construct_matched( images
|
||||
, format_checker
|
||||
))
|
||||
{
|
||||
@@ -226,8 +224,8 @@ public:
|
||||
, parent_t
|
||||
> op( this );
|
||||
|
||||
apply_operation( view( images )
|
||||
, op
|
||||
variant2::visit( op
|
||||
, view( images )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
}
|
||||
|
||||
/// Check if image is large enough.
|
||||
void check_image_size( const point_t& img_dim )
|
||||
void check_image_size( point_t const& img_dim )
|
||||
{
|
||||
if( _settings._dim.x > 0 )
|
||||
{
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
#include <boost/gil/color_base.hpp>
|
||||
#include <boost/gil/io/base.hpp>
|
||||
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
@@ -52,23 +51,24 @@ struct raw_write_support : write_support_false {};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template< typename Pixel >
|
||||
struct is_read_supported< Pixel,
|
||||
raw_tag
|
||||
>
|
||||
: mpl::bool_< detail::raw_read_support< typename channel_type< Pixel >::type
|
||||
, typename color_space_type< Pixel >::type
|
||||
>::is_supported > {};
|
||||
|
||||
template< typename Pixel >
|
||||
struct is_write_supported< Pixel
|
||||
, raw_tag
|
||||
>
|
||||
: mpl::bool_< detail::raw_write_support::is_supported >
|
||||
template<typename Pixel>
|
||||
struct is_read_supported<Pixel,raw_tag>
|
||||
: std::integral_constant
|
||||
<
|
||||
bool,
|
||||
detail::raw_read_support
|
||||
<
|
||||
typename channel_type<Pixel>::type,
|
||||
typename color_space_type<Pixel>::type
|
||||
>::is_supported
|
||||
>
|
||||
{};
|
||||
|
||||
} // namespace gil
|
||||
} // namespace boost
|
||||
template<typename Pixel>
|
||||
struct is_write_supported<Pixel, raw_tag>
|
||||
: std::integral_constant<bool, detail::raw_write_support::is_supported>
|
||||
{};
|
||||
|
||||
}} // namespace boost::gil
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,15 @@
|
||||
|
||||
#include <boost/gil/io/base.hpp>
|
||||
|
||||
// Historically, LibRaw expects WIN32, not _WIN32 (see https://github.com/LibRaw/LibRaw/pull/206)
|
||||
#ifdef _MSC_VER
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4251) // 'type' needs to have dll-interface to be used by clients of class
|
||||
#endif
|
||||
|
||||
#include <libraw/libraw.h>
|
||||
|
||||
namespace boost { namespace gil {
|
||||
@@ -114,7 +123,7 @@ template<>
|
||||
struct image_read_info< raw_tag >
|
||||
{
|
||||
/// Default contructor.
|
||||
image_read_info< raw_tag >()
|
||||
image_read_info()
|
||||
: _valid( false )
|
||||
{}
|
||||
|
||||
@@ -173,8 +182,8 @@ struct image_read_settings< raw_tag > : public image_read_settings_base
|
||||
/// Constructor
|
||||
/// \param top_left Top left coordinate for reading partial image.
|
||||
/// \param dim Dimensions for reading partial image.
|
||||
image_read_settings( const point_t& top_left
|
||||
, const point_t& dim
|
||||
image_read_settings( point_t const& top_left
|
||||
, point_t const& dim
|
||||
)
|
||||
: image_read_settings_base( top_left
|
||||
, dim
|
||||
@@ -190,7 +199,10 @@ struct image_write_info< raw_tag >
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace gil
|
||||
} // namespace boost
|
||||
}} // namespace boost::gil
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user