25 #ifndef SFML_IMAGELOADER_HPP
26 #define SFML_IMAGELOADER_HPP
31 #include <SFML/Graphics/Color.hpp>
32 #include <SFML/System/NonCopyable.hpp>
45 class ImageLoader : NonCopyable
55 static ImageLoader& GetInstance();
68 bool LoadImageFromFile(
const std::string& Filename, std::vector<Color>& Pixels,
unsigned int& Width,
unsigned int& Height);
82 bool LoadImageFromMemory(
const char* Data, std::size_t SizeInBytes, std::vector<Color>& Pixels,
unsigned int& Width,
unsigned int& Height);
95 bool SaveImageToFile(
const std::string& Filename,
const std::vector<Color>& Pixels,
unsigned int Width,
unsigned int Height);
122 bool WriteJpg(
const std::string& Filename,
const std::vector<Color>& Pixels,
unsigned int Width,
unsigned int Height);
135 bool WritePng(
const std::string& Filename,
const std::vector<Color>& Pixels,
unsigned int Width,
unsigned int Height);
143 #endif // SFML_IMAGELOADER_HPP