#include <image_read.hh>
Static Public Member Functions | |
static bool | by_extension (T &output, std::istream &in, const std::string &ext) |
Read an object from a stream. Try do deduce the image format from the extension. | |
static bool | by_data (T &output, std::istream &in) |
Read an object from a stream. Try to match the file format referring to the data only. |
R | Type of reader. |
Definition at line 58 of file image_read.hh.
static bool oln::io::internal::try_readers< R, T >::by_extension | ( | T & | output, | |
std::istream & | in, | |||
const std::string & | ext | |||
) | [inline, static] |
Read an object from a stream. Try do deduce the image format from the extension.
Definition at line 68 of file image_read.hh.
00069 { 00070 if (image_reader<R,T>::knows_ext(ext)) 00071 if (image_reader<R,T>::read(in, output)) 00072 return true; 00073 in.seekg(0, std::ios::beg); 00074 return try_readers<reader_id(unsigned(R)-1), T> 00075 ::by_extension(output, in, ext); 00076 }
static bool oln::io::internal::try_readers< R, T >::by_data | ( | T & | output, | |
std::istream & | in | |||
) | [inline, static] |
Read an object from a stream. Try to match the file format referring to the data only.
Definition at line 85 of file image_read.hh.
00086 { 00087 if (image_reader<R,T>::read(in, output)) 00088 return true; 00089 in.seekg(0, std::ios::beg); 00090 return try_readers<reader_id(unsigned(R)-1), T>::by_data(output, in); 00091 }