mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Implement sf::Image::saveToMemory
https://github.com/SFML/SFML/pull/1669 Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
This commit is contained in:
1 parent
39dd578d45
commit
725811baa9
2 files changed
+32
No files matched your search
@@ -27,9 +27,11 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics/Image.h>
|
||||
#include <SFML/Graphics/ImageStruct.h>
|
||||
#include <SFML/System/BufferStruct.h>
|
||||
#include <SFML/Internal.h>
|
||||
#include <SFML/CallbackStream.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfImage* sfImage_create(unsigned int width, unsigned int height)
|
||||
{
|
||||
@@ -131,6 +133,14 @@ sfBool sfImage_saveToFile(const sfImage* image, const char* filename)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfBool sfImage_saveToMemory(const sfImage* image, sfBuffer* output, const char* format)
|
||||
{
|
||||
CSFML_CHECK_RETURN(output, sfFalse);
|
||||
CSFML_CALL_RETURN(image, saveToMemory(output->buffer, format), sfFalse);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfImage_createMaskFromColor(sfImage* image, sfColor colorKey, sfUint8 alpha)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user