#include <image_write.hh>
Static Public Member Functions | |
static bool | by_extension (const T &input, std::ostream &out, const std::string &ext) |
Write object on the stream. Try do deduce the image format from the extension. | |
static bool | by_data (const T &input, std::ostream &out, const std::string &ext) |
Try to match the file format referring to the data only. |
W | Type of writer. |
Definition at line 58 of file image_write.hh.
static bool oln::io::internal::try_writers< W, T >::by_extension | ( | const T & | input, | |
std::ostream & | out, | |||
const std::string & | ext | |||
) | [inline, static] |
Write object on the stream. Try do deduce the image format from the extension.
Definition at line 68 of file image_write.hh.
00069 { 00070 if (image_writer<W,T>::knows_ext(ext)) 00071 if (image_writer<W,T>::write(out, input)) 00072 return true; 00073 return try_writers<writer_id(unsigned(W)-1), T> 00074 ::by_extension(input, out, ext); 00075 }
static bool oln::io::internal::try_writers< W, T >::by_data | ( | const T & | input, | |
std::ostream & | out, | |||
const std::string & | ext | |||
) | [inline, static] |
Try to match the file format referring to the data only.
Definition at line 83 of file image_write.hh.
00084 { 00085 if (image_writer<W,T>::write(out, input)) 00086 { 00087 // std::clog << "[ambiguous extension '" << ext 00088 // << "' wrote as " << image_writer<W,T>::name() << "] " 00089 // << std::flush; 00090 return true; 00091 } 00092 return try_writers<writer_id(unsigned(W)-1), T> 00093 ::by_data(input, out, ext); 00094 }