Visual Servoing Platform  version 3.4.0
tutorial-image-reader.cpp
#include <visp3/io/vpImageIo.h>
int main()
{
try {
vpImageIo::read(I, "monkey.jpeg");
vpImageIo::write(I, "monkey.png");
} catch (const vpException &e) {
std::cout << e.getMessage() << std::endl;
} catch (...) {
std::cout << "Unsupported image format" << std::endl;
}
}
error that can be emited by ViSP classes.
Definition: vpException.h:72
const char * getMessage() const
Definition: vpException.cpp:90
static void read(vpImage< unsigned char > &I, const std::string &filename)
Definition: vpImageIo.cpp:244
static void write(const vpImage< unsigned char > &I, const std::string &filename)
Definition: vpImageIo.cpp:445