25 #ifndef CPP3DS_IMAGELOADER_HPP
26 #define CPP3DS_IMAGELOADER_HPP
31 #include <cpp3ds/Config.hpp>
32 #include <cpp3ds/System/NonCopyable.hpp>
33 #include <cpp3ds/System/Vector2.hpp>
48 class ImageLoader : NonCopyable
58 static ImageLoader& getInstance();
70 bool loadImageFromFile(
const std::string& filename, std::vector<Uint8>& pixels, Vector2u& size);
83 bool loadImageFromMemory(
const void* data, std::size_t dataSize, std::vector<Uint8>& pixels, Vector2u& size);
95 bool loadImageFromStream(InputStream& stream, std::vector<Uint8>& pixels, Vector2u& size);
107 bool saveImageToFile(
const std::string& filename,
const std::vector<Uint8>& pixels,
const Vector2u& size);
134 bool writeJpg(
const std::string& filename,
const std::vector<Uint8>& pixels,
unsigned int width,
unsigned int height);