25 #ifndef SFML_IMAGE_HPP
26 #define SFML_IMAGE_HPP
31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Color.hpp>
33 #include <SFML/Graphics/Rect.hpp>
72 void create(
unsigned int width,
unsigned int height,
const Color& color =
Color(0, 0, 0));
87 void create(
unsigned int width,
unsigned int height,
const Uint8* pixels);
104 bool loadFromFile(
const std::string& filename);
122 bool loadFromMemory(
const void* data, std::size_t size);
156 bool saveToFile(
const std::string& filename)
const;
177 void createMaskFromColor(
const Color& color, Uint8 alpha = 0);
199 void copy(
const Image& source,
unsigned int destX,
unsigned int destY,
const IntRect& sourceRect =
IntRect(0, 0, 0, 0),
bool applyAlpha =
false);
215 void setPixel(
unsigned int x,
unsigned int y,
const Color& color);
232 Color getPixel(
unsigned int x,
unsigned int y)
const;
247 const Uint8* getPixelsPtr()
const;
253 void flipHorizontally();
259 void flipVertically();
267 std::vector<Uint8> m_pixels;
268 #ifdef SFML_SYSTEM_ANDROID
276 #endif // SFML_IMAGE_HPP
Utility class for manipulating RGBA colors.
Class for loading, manipulating and saving images.