diff options
| author | Ray <[email protected]> | 2018-09-17 16:56:02 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-09-17 16:56:02 +0200 |
| commit | ec5c9686b3afef5fb2c147fc9786b6890c025dd9 (patch) | |
| tree | 3cf23b81c4cf04d54c7c580c8d085c1185572ee7 /src/utils.c | |
| parent | 3a1a4895454f33bea4c33a294050a88cf76d78f4 (diff) | |
| download | raylib-ec5c9686b3afef5fb2c147fc9786b6890c025dd9.tar.gz raylib-ec5c9686b3afef5fb2c147fc9786b6890c025dd9.zip | |
Improved data export capabilities!
REVIEWED: ExportImage()
REVIEWED: ExportMesh()
ADDED: ExportWave()
REMOVED: Internal funcs: SavePNG(), SaveBMP()
NOTE: These changes break the API (parameters order)
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/utils.c b/src/utils.c index f7c19afb..b2951040 100644 --- a/src/utils.c +++ b/src/utils.c @@ -4,21 +4,10 @@ * * CONFIGURATION: * -* #define SUPPORT_SAVE_PNG (defined by default) -* Support saving image data as PNG fileformat -* NOTE: Requires stb_image_write library -* -* #define SUPPORT_SAVE_BMP -* Support saving image data as BMP fileformat -* NOTE: Requires stb_image_write library -* * #define SUPPORT_TRACELOG * Show TraceLog() output messages * NOTE: By default LOG_DEBUG traces not shown * -* DEPENDENCIES: -* stb_image_write - BMP/PNG writting functions -* * * LICENSE: zlib/libpng * @@ -62,12 +51,6 @@ FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int), int (*writefn)(void *, const char *, int), fpos_t (*seekfn)(void *, fpos_t, int), int (*closefn)(void *)); - -#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) - #define STB_IMAGE_WRITE_IMPLEMENTATION - #include "external/stb_image_write.h" // Required for: stbi_write_bmp(), stbi_write_png() -#endif - //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -160,24 +143,6 @@ void TraceLog(int msgType, const char *text, ...) #endif // SUPPORT_TRACELOG } -// Creates a BMP image file from an array of pixel data -void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize) -{ -#if defined(SUPPORT_SAVE_BMP) && (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)) - stbi_write_bmp(fileName, width, height, compSize, imgData); - TraceLog(LOG_INFO, "BMP Image saved: %s", fileName); -#endif -} - -// Creates a PNG image file from an array of pixel data -void SavePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize) -{ -#if defined(SUPPORT_SAVE_PNG) && (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)) - stbi_write_png(fileName, width, height, compSize, imgData, width*compSize); - TraceLog(LOG_INFO, "PNG Image saved: %s", fileName); -#endif -} - // Keep track of memory allocated // NOTE: mallocType defines the type of data allocated /* |
