27#ifndef EASY3D_FILEIO_IMAGE_IO_H
28#define EASY3D_FILEIO_IMAGE_IO_H
87 const std::string& file_name,
88 std::vector<unsigned char>& data,
92 int requested_channels = 0,
93 bool flip_vertically =
true
116 const std::string& file_name,
117 const std::vector<unsigned char>& data,
121 bool flip_vertically =
false
138 bool save_ppm(
const std::string& file_name,
const std::vector<unsigned char>& bits,
int width,
int height);
143 bool save_bmp(
const std::string& file_name,
const std::vector<unsigned char>& bits,
int width,
int height);
148 bool save_tga(
const std::string& file_name,
const std::vector<unsigned char>& bits,
int width,
int height);
Implementation of file input/output operations for images.
Definition: image_io.h:40
static bool load(const std::string &file_name, std::vector< unsigned char > &data, int &width, int &height, int &channels, int requested_channels=0, bool flip_vertically=true)
Load image data from a file. The following formats are supported JPG/JPEG, PNG, BMP,...
Definition: image_io.cpp:41
static bool save(const std::string &file_name, const std::vector< unsigned char > &data, int width, int height, int channels, bool flip_vertically=false)
Write image data into a file. The following formats are supported JPG/JPEG, PNG, BMP,...
Definition: image_io.cpp:68
bool save_tga(const std::string &file_name, const std::vector< unsigned char > &bits, int width, int height)
Definition: image_io.cpp:190
bool save_bmp(const std::string &file_name, const std::vector< unsigned char > &bits, int width, int height)
Definition: image_io.cpp:137
bool save_ppm(const std::string &file_name, const std::vector< unsigned char > &bits, int width, int height)
Definition: image_io.cpp:114
Definition: collider.cpp:182