#include <algorithm>
#include <string>
+#include <type_traits>
#include <vector>
// taken from jpegxx - https://bitbucket.org/edd/jpegxx/src/ea2492a1a4a6/src/ijg_headers.hpp
// the tiff type need to compatible. Which means:
// color_spaces_are_compatible && channels_are_pairwise_compatible
- using is_read_only = typename is_same
+ using is_read_only = typename std::is_same
<
ConversionPolicy,
detail::read_and_no_convert
template< typename View >
void read( View v
- , mpl::true_ // is_read_only
+ , std::true_type // is_read_only
)
{
read_data< detail::row_buffer_helper_view< View > >( v, 0 );
template< typename View >
void read( View v
- , mpl::false_ // is_read_only
+ , std::false_type // is_read_only
)
{
// the read_data function needs to know what gil type the source image is
, this->_info._height - this->_settings._top_left.y );
// read the palette first
- read_data< detail::row_buffer_helper_view< typename PaletteImage::view_t > >( view( indices ), 0 );
+ read_data< detail::row_buffer_helper_view
+ <
+ typename PaletteImage::view_t>
+ >(view(indices), 0);
- read_palette_image( dst_view
- , view( indices )
- , typename is_same< View, rgb16_view_t >::type() );
+ read_palette_image(dst_view, view(indices),
+ typename std::is_same<View, rgb16_view_t>::type());
}
template< typename View
>
void read_palette_image( const View& dst_view
, const Indices_View& indices_view
- , mpl::true_ // is View rgb16_view_t
+ , std::true_type // is View rgb16_view_t
)
{
tiff_color_map::red_t red = nullptr;
inline
void read_palette_image( const View& /* dst_view */
, const Indices_View& /* indices_view */
- , mpl::false_ // is View rgb16_view_t
+ , std::false_type // is View rgb16_view_t
)
{
io_error( "User supplied image type must be rgb16_image_t." );
template< typename Pixel >
std::size_t buffer_size( std::size_t width
- , mpl::false_ // is_bit_aligned
+ , std::false_type // is_bit_aligned
)
{
std::size_t scanline_size_in_bytes = this->_io_dev.get_scanline_size();
template< typename Pixel >
std::size_t buffer_size( std::size_t /* width */
- , mpl::true_ // is_bit_aligned
+ , std::true_type // is_bit_aligned
)
{
return this->_io_dev.get_scanline_size();
using view_t = typename Image::view_t;
return is_allowed< view_t >( _info
- , mpl::true_()
+ , std::true_type()
);
}