42 #include <visp3/core/vpImage.h>
43 #include <visp3/core/vpImageConvert.h>
122 static vpImageFormatType getFormat(
const std::string &filename);
123 static std::string getExtension(
const std::string &filename);
136 static void read(
vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
137 static void read(
vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
139 static void write(
const vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
140 static void write(
const vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
142 static void readPFM(
vpImage<float> &I,
const std::string &filename);
143 static void readPFM_HDR(
vpImage<float> &I,
const std::string &filename);
144 static void readPFM_HDR(
vpImage<vpRGBf> &I,
const std::string &filename);
152 static void readJPEG(
vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
153 static void readJPEG(
vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
155 static void readPNG(
vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
156 static void readPNG(
vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
158 static void readEXR(
vpImage<float> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
159 static void readEXR(
vpImage<vpRGBf> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
161 static void writePFM(
const vpImage<float> &I,
const std::string &filename);
162 static void writePFM_HDR(
const vpImage<float> &I,
const std::string &filename);
163 static void writePFM_HDR(
const vpImage<vpRGBf> &I,
const std::string &filename);
166 static void writePGM(
const vpImage<short> &I,
const std::string &filename);
167 static void writePGM(
const vpImage<vpRGBa> &I,
const std::string &filename);
170 static void writePPM(
const vpImage<vpRGBa> &I,
const std::string &filename);
172 static void writeJPEG(
const vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND,
174 static void writeJPEG(
const vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND,
177 static void writePNG(
const vpImage<unsigned char> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
178 static void writePNG(
const vpImage<vpRGBa> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
180 static void writeEXR(
const vpImage<float> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
181 static void writeEXR(
const vpImage<vpRGBf> &I,
const std::string &filename,
int backend = IO_DEFAULT_BACKEND);
184 int backend = IO_DEFAULT_BACKEND);
185 static void readPNGfromMem(
const std::vector<unsigned char> &buffer,
vpImage<vpRGBa> &I,
186 int backend = IO_DEFAULT_BACKEND);
189 int backend = IO_DEFAULT_BACKEND);
190 static void writePNGtoMem(
const vpImage<vpRGBa> &I, std::vector<unsigned char> &buffer,
191 int backend = IO_DEFAULT_BACKEND,
bool saveAlpha =
false);
Read/write images with various image format.
vpImageIoBackendType
Image IO backend for only jpeg and png formats image loading and saving.
@ IO_DEFAULT_BACKEND
Default backend.
@ IO_SIMDLIB_BACKEND
Use embedded simd library.
@ IO_SYSTEM_LIB_BACKEND
Use system libraries like libpng or libjpeg-turbo.
@ IO_OPENCV_BACKEND
Use OpenCV imgcodecs module.