27 bool write_png(
const std::string &filename,
const std::vector<std::uint8_t> &data,
unsigned int w = 100,
unsigned int h = 100,
unsigned int stride = 4) const noexcept;
36 bool write_jpeg(const std::
string &filename, const std::vector<std::uint8_t> &data,
unsigned int w = 100,
unsigned int h = 100,
unsigned int stride = 4) const noexcept;
42 bool write(std::ostream &oss, const std::
string &data) const noexcept;
48 bool write_file(const std::
string &filename, const std::
string &data) const noexcept;
54 std::filesystem::path p(filepath);
55 return p.parent_path().string();
Handles file writing for text, stdout, images, and object files.
Definition io_utils.h:18
bool write(std::ostream &oss, const std::string &data) const noexcept
Handles writing to an output stream.
bool write_jpeg(const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept
Write pixels to a JPEG file.
static std::string getDirectoryPath(const std::string &filepath) noexcept
Get the directory path from a full file path.
Definition io_utils.h:53
bool write_file(const std::string &filename, const std::string &data) const noexcept
Write to a file.
bool write_png(const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept
Write pixels to a PNG file.
Namespace for the maze builder.
Definition algo_interface.h:6