Esempio n. 1
0
inline
void pnm_read_and_convert_view( const String& filename
                                , const View&   view
                              )
{
    read_and_convert_view( filename
                           , view
                           , pnm_tag()
                         );
}
Esempio n. 2
0
inline
void tiff_read_and_convert_view( const String& filename
                               , const View&   view
                               , CC            cc
                               )
{
    read_and_convert_view( filename
                         , view
                         , cc
                         , tiff_tag()
                         );
}
Esempio n. 3
0
inline 
void png_read_and_convert_view( const String& filename
                               , const View&   view
                               , CC            cc
                               )
{
    read_and_convert_view( filename
                         , view
                         , cc
                         , tag_t()
                         );
}
Esempio n. 4
0
inline
void read_and_convert_view( const String&    file_name
                          , const View&      view
                          , const FormatTag&
                          , typename enable_if< mpl::and_< is_format_tag< FormatTag >
                                                         , detail::is_supported_path_spec< String >
                                                         >
                                              >::type* /* ptr */ = 0
                          )
{
   read_and_convert_view( file_name
                        , view
                        , image_read_settings< FormatTag >()
                        , default_color_converter()
                        );
}
Esempio n. 5
0
inline
void read_and_convert_view( const String&    file_name
                          , const View&      view
                          , const FormatTag& tag
                          , typename enable_if< typename mpl::and_< typename is_format_tag< FormatTag >::type
                                                                  , typename detail::is_supported_path_spec< String >::type
                                                                  >::type
                                              >::type* ptr = 0
                          )
{
   read_and_convert_view( file_name
                        , view
                        , point_t( 0, 0 )
                        , default_color_converter()
                        , tag
                        );
}
Esempio n. 6
0
inline
void read_and_convert_view( Device&          device
                          , const View&      view
                          , const FormatTag&
                          , typename enable_if< mpl::and_< mpl::or_< detail::is_input_device< Device >
                                                                   , detail::is_adaptable_input_device< FormatTag
                                                                                                      , Device
                                                                                                      >
                                                                   >
                                                         , is_format_tag< FormatTag >
                                                         >
                                               >::type* /* ptr */ = 0
                          )
{
   read_and_convert_view( device
                        , view
                        , image_read_settings< FormatTag >()
                        , default_color_converter()
                        );
}
Esempio n. 7
0
inline
void read_and_convert_view( const String&                           file_name
                          , const View&                             view
                          , const image_read_settings< FormatTag >& settings
                          , const ColorConverter&                   cc
                          , typename enable_if< mpl::and_< is_format_tag< FormatTag >
                                                         , detail::is_supported_path_spec< String >
                                                         >
                                            >::type* /* ptr */ = 0
                          )
{
    detail::file_stream_device< FormatTag > device( detail::convert_to_string( file_name )
                                                  , typename detail::file_stream_device< FormatTag >::read_tag()
                                                  );

    read_and_convert_view( device
                         , view
                         , settings
                         , cc
                         );
}
Esempio n. 8
0
inline
void read_and_convert_view( Device&          device
                          , const View&      view
                          , const FormatTag& tag
                          , typename enable_if< typename mpl::and_< typename mpl::or_< typename detail::is_input_device< Device >::type
                                                                                     , typename detail::is_adaptable_input_device< FormatTag
                                                                                                                                 , Device
                                                                                                                                 >::type
                                                                                      >::type
                                                                   , typename is_format_tag< FormatTag >::type
                                                                   >::type
                                               >::type* ptr = 0
                          )
{
   read_and_convert_view( device
                        , view
                        , point_t( 0, 0 )
                        , default_color_converter()
                        , tag
                        );
}
Esempio n. 9
0
inline
void read_and_convert_view( const String&         file_name
                          , const View&           view
                          , const point_t&        top_left
                          , const ColorConverter& cc
                          , const FormatTag&      tag
                          , typename enable_if< typename mpl::and_< typename is_format_tag< FormatTag >::type
                                                                 , typename detail::is_supported_path_spec< String >::type
                                                                 >::type
                                            >::type* ptr = 0
                          )
{
    detail::file_stream_device< FormatTag > device( detail::convert_to_string( file_name )
                                                  , detail::file_stream_device< FormatTag >::read_tag()
                                                  );

    read_and_convert_view( device
                         , view
                         , top_left
                         , cc
                         , tag
                         );
}
Esempio n. 10
0
inline
void read_and_convert_view( const String&    file_name
                          , const View&      view
                          , const FormatTag& tag
                          , typename enable_if< mpl::and_< is_format_tag< FormatTag >
                                                         , detail::is_supported_path_spec< String >
                                                         >
                                              >::type* /* ptr */ = 0
                          )
{
    typedef typename get_reader< String
                               , FormatTag
                               , detail::read_and_convert< default_color_converter >
                               >::type reader_t;

    reader_t reader = make_reader( file_name
                                 , tag
                                 , detail::read_and_convert< default_color_converter >()
                                 );

    read_and_convert_view( reader
                         , view
                         );
}