Visual Servoing Platform  version 3.0.0
tutorial-image-reader.cpp
1 
2 #include <visp3/io/vpImageIo.h>
3 
4 int main()
5 {
6  try {
8  vpImageIo::read(I, "monkey.jpeg");
9  vpImageIo::write(I, "monkey.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)
Definition: vpException.cpp:97
static void write(const vpImage< unsigned char > &I, const char *filename)
Definition: vpImageIo.cpp:472
error that can be emited by ViSP classes.
Definition: vpException.h:73
static void read(vpImage< unsigned char > &I, const char *filename)
Definition: vpImageIo.cpp:274