ViSP  2.10.0
tutorial-image-reader.cpp
1 
2 #include <visp/vpImageIo.h>
3 
4 int main()
5 {
6  try {
8  vpImageIo::read(I, "lena.jpeg");
9  vpImageIo::write(I, "lena.png");
10  }
11  catch(vpException e) {
12  std::cout << e.getMessage() << std::endl;
13  }
14  catch(...) {
15  std::cout << "Unsupported image format" << std::endl;
16  }
17 }
18 
const char * getMessage(void)
static void write(const vpImage< unsigned char > &I, const char *filename)
Definition: vpImageIo.cpp:476
error that can be emited by ViSP classes.
Definition: vpException.h:76
static void read(vpImage< unsigned char > &I, const char *filename)
Definition: vpImageIo.cpp:278