Visual Servoing Platform  version 3.3.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;
}
}
vpImageIo::read
static void read(vpImage< unsigned char > &I, const std::string &filename)
Definition: vpImageIo.cpp:243
vpImageIo::write
static void write(const vpImage< unsigned char > &I, const std::string &filename)
Definition: vpImageIo.cpp:445
vpException::getMessage
const char * getMessage(void) const
Definition: vpException.cpp:90
vpImage< vpRGBa >
vpException
error that can be emited by ViSP classes.
Definition: vpException.h:71