39 #ifndef _vpImageIoBackend_h_
40 #define _vpImageIoBackend_h_
42 #include <visp3/core/vpImage.h>
49 void vp_writePFM(
const vpImage<float> &I,
const std::string &filename);
50 void vp_writePFM_HDR(
const vpImage<float> &I,
const std::string &filename);
51 void vp_writePFM_HDR(
const vpImage<vpRGBf> &I,
const std::string &filename);
53 void vp_writePGM(
const vpImage<short> &I,
const std::string &filename);
54 void vp_writePGM(
const vpImage<vpRGBa> &I,
const std::string &filename);
56 void vp_readPFM_HDR(
vpImage<float> &I,
const std::string &filename);
63 void vp_writePPM(
const vpImage<vpRGBa> &I,
const std::string &filename);
70 void writeJPEGLibjpeg(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
77 void writePNGLibpng(
const vpImage<vpRGBa> &I,
const std::string &filename);
79 #if ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_IMGCODECS)) || ((VISP_HAVE_OPENCV_VERSION < 0x030000) \
80 && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_IMGPROC))
88 void writeOpenCV(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
89 void writeOpenCV(
const vpImage<float> &I,
const std::string &filename);
90 void writeOpenCV(
const vpImage<vpRGBf> &I,
const std::string &filename);
93 void readPNGfromMemOpenCV(
const std::vector<unsigned char> &buffer,
vpImage<vpRGBa> &I);
96 void writePNGtoMemOpenCV(
const vpImage<vpRGBa> &I, std::vector<unsigned char> &buffer,
bool saveAlpha);
99 #if defined(VISP_HAVE_SIMDLIB)
105 void writeJPEGSimdlib(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
108 void writePNGSimdlib(
const vpImage<vpRGBa> &I,
const std::string &filename);
111 #if defined(VISP_HAVE_TINYEXR)
116 void writeEXRTiny(
const vpImage<float> &I,
const std::string &filename);
117 void writeEXRTiny(
const vpImage<vpRGBf> &I,
const std::string &filename);
120 #if defined(VISP_HAVE_STBIMAGE)
126 void writeJPEGStb(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
129 void writePNGStb(
const vpImage<vpRGBa> &I,
const std::string &filename);
132 void readPNGfromMemStb(
const std::vector<unsigned char> &buffer,
vpImage<vpRGBa> &I);
135 void writePNGtoMemStb(
const vpImage<vpRGBa> &I, std::vector<unsigned char> &buffer,
bool saveAlpha);