39 #ifndef _vpImageIoBackend_h_
40 #define _vpImageIoBackend_h_
42 #include <visp3/core/vpImage.h>
47 void vp_writePFM(
const vpImage<float> &I,
const std::string &filename);
48 void vp_writePFM_HDR(
const vpImage<float> &I,
const std::string &filename);
49 void vp_writePFM_HDR(
const vpImage<vpRGBf> &I,
const std::string &filename);
51 void vp_writePGM(
const vpImage<short> &I,
const std::string &filename);
52 void vp_writePGM(
const vpImage<vpRGBa> &I,
const std::string &filename);
54 void vp_readPFM_HDR(
vpImage<float> &I,
const std::string &filename);
61 void vp_writePPM(
const vpImage<vpRGBa> &I,
const std::string &filename);
68 void writeJPEGLibjpeg(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
75 void writePNGLibpng(
const vpImage<vpRGBa> &I,
const std::string &filename);
77 #if ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_IMGCODECS)) || ((VISP_HAVE_OPENCV_VERSION < 0x030000) \
78 && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_IMGPROC))
86 void writeOpenCV(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
87 void writeOpenCV(
const vpImage<float> &I,
const std::string &filename);
88 void writeOpenCV(
const vpImage<vpRGBf> &I,
const std::string &filename);
91 void readPNGfromMemOpenCV(
const std::vector<unsigned char> &buffer,
vpImage<vpRGBa> &I);
94 void writePNGtoMemOpenCV(
const vpImage<vpRGBa> &I, std::vector<unsigned char> &buffer,
bool saveAlpha);
97 #if defined(VISP_HAVE_SIMDLIB)
103 void writeJPEGSimdlib(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
106 void writePNGSimdlib(
const vpImage<vpRGBa> &I,
const std::string &filename);
109 #if defined(VISP_HAVE_TINYEXR)
114 void writeEXRTiny(
const vpImage<float> &I,
const std::string &filename);
115 void writeEXRTiny(
const vpImage<vpRGBf> &I,
const std::string &filename);
118 #if defined(VISP_HAVE_STBIMAGE)
124 void writeJPEGStb(
const vpImage<vpRGBa> &I,
const std::string &filename,
int quality);
127 void writePNGStb(
const vpImage<vpRGBa> &I,
const std::string &filename);
130 void readPNGfromMemStb(
const std::vector<unsigned char> &buffer,
vpImage<vpRGBa> &I);
133 void writePNGtoMemStb(
const vpImage<vpRGBa> &I, std::vector<unsigned char> &buffer,
bool saveAlpha);