Loading...
Searching...
No Matches
Image.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
void create(unsigned int width, unsigned int height, const Uint8 *pixels)
Create the image from an array of pixels.
bool loadFromStream(InputStream &stream)
Load the image from a custom stream.
void createMaskFromColor(const Color &color, Uint8 alpha=0)
Create a transparency mask from a specified color-key.
void create(unsigned int width, unsigned int height, const Color &color=Color(0, 0, 0))
Create the image and fill it with a unique color.
const Uint8 * getPixelsPtr() const
Get a read-only pointer to the array of pixels.
bool saveToFile(const std::string &filename) const
Save the image to a file on disk.
bool loadFromFile(const std::string &filename)
Load the image from a file on disk.
void setPixel(unsigned int x, unsigned int y, const Color &color)
Change the color of a pixel.
bool loadFromMemory(const void *data, std::size_t size)
Load the image from a file in memory.
void copy(const Image &source, unsigned int destX, unsigned int destY, const IntRect &sourceRect=IntRect(0, 0, 0, 0), bool applyAlpha=false)
Copy pixels from another image onto this one.
bool saveToMemory(std::vector< sf::Uint8 > &output, const std::string &format) const
Save the image to a buffer in memory.
Definition AlResource.hpp:35