Loading...
Searching...
No Matches
Image.h
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.
64CSFML_GRAPHICS_API sfImage* sfImage_createFromColor(unsigned int width, unsigned int height, sfColor color);
81CSFML_GRAPHICS_API sfImage* sfImage_createFromPixels(unsigned int width, unsigned int height, const sfUint8* pixels);
182CSFML_GRAPHICS_API sfBool sfImage_saveToMemory(const sfImage* image, sfBuffer* output, const char* format);
206CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfImage* image, sfColor color, sfUint8 alpha);
229CSFML_GRAPHICS_API void sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha);
244CSFML_GRAPHICS_API void sfImage_setPixel(sfImage* image, unsigned int x, unsigned int y, sfColor color);
260CSFML_GRAPHICS_API sfColor sfImage_getPixel(const sfImage* image, unsigned int x, unsigned int y);
sfImage * sfImage_createFromPixels(unsigned int width, unsigned int height, const sfUint8 *pixels)
Create an image from an array of pixels.
void sfImage_flipHorizontally(sfImage *image)
Flip an image horizontally (left <-> right)
sfImage * sfImage_createFromStream(sfInputStream *stream)
Create an image from a custom stream.
sfBool sfImage_saveToFile(const sfImage *image, const char *filename)
Save an image to a file on disk.
const sfUint8 * sfImage_getPixelsPtr(const sfImage *image)
Get a read-only pointer to the array of pixels of an image.
void sfImage_setPixel(sfImage *image, unsigned int x, unsigned int y, sfColor color)
Change the color of a pixel in an image.
sfBool sfImage_saveToMemory(const sfImage *image, sfBuffer *output, const char *format)
Save the image to a buffer in memory.
sfImage * sfImage_createFromColor(unsigned int width, unsigned int height, sfColor color)
Create an image and fill it with a unique color.
sfImage * sfImage_createFromFile(const char *filename)
Create an image from a file on disk.
sfColor sfImage_getPixel(const sfImage *image, unsigned int x, unsigned int y)
Get the color of a pixel in an image.
void sfImage_flipVertically(sfImage *image)
Flip an image vertically (top <-> bottom)
void sfImage_copyImage(sfImage *image, const sfImage *source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha)
Copy pixels from an image onto another.
sfImage * sfImage_createFromMemory(const void *data, size_t size)
Create an image from a file in memory.
void sfImage_createMaskFromColor(sfImage *image, sfColor color, sfUint8 alpha)
Create a transparency mask from a specified color-key.
Set of callbacks that allow users to define custom file streams.
Definition InputStream.h:45