13 #ifndef MLPACK_CORE_DATA_IMAGE_INFO_IMPL_HPP 14 #define MLPACK_CORE_DATA_IMAGE_INFO_IMPL_HPP 16 #ifdef HAS_STB // Compile this only if stb is present. 24 static const std::vector<std::string> loadFileTypes({
"jpg",
"png",
"tga",
25 "bmp",
"psd",
"gif",
"hdr",
"pic",
"pnm",
"jpeg"});
27 static const std::vector<std::string> saveFileTypes({
"jpg",
"png",
"tga",
35 for (
auto extension : saveFileTypes)
37 if (extension == Extension(fileName))
44 for (
auto extension : loadFileTypes)
46 if (extension == Extension(fileName))
64 const size_t channels,
65 const size_t quality) :
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
bool ImageFormatSupported(const std::string &fileName, const bool save=false)
Checks if the given image filename is supported.
ImageInfo(const size_t width=0, const size_t height=0, const size_t channels=3, const size_t quality=90)
Instantiate the ImageInfo object with the given image width, height, number of channels and quality p...
Definition: image_info_impl.hpp:62