#include <string.h>
#include <stdio.h>
#include "../common/platform.h"
#include "../memory/memory.h"
#include "../common/common_utils.h"
Functions | |
PRIVATE void | rle_write (FILE *fp, W8 *buffer, W32 width, W32 bytes) |
Run length encode scanline. | |
PUBLIC W8 | TGA_write (const char *filename, W16 bpp, W32 width, W32 height, void *Data, W8 upsideDown, W8 rle) |
Write targa image file. |
PRIVATE void rle_write | ( | FILE * | fp, | |
W8 * | buffer, | |||
W32 | width, | |||
W32 | bytes | |||
) |
Run length encode scanline.
[in] | fp | Pointer to valid FILE structure. |
[in] | buffer | Scanline data. |
[in] | width | Image scanline width. |
[in] | bytes | Bytes per pixel. |
PUBLIC W8 TGA_write | ( | const char * | filename, | |
W16 | bpp, | |||
W32 | width, | |||
W32 | height, | |||
void * | Data, | |||
W8 | upsideDown, | |||
W8 | rle | |||
) |
Write targa image file.
[in] | filename | Name of TGA file to save as. |
[in] | depth | Bytes per pixel. (16, 24 or 32). |
[in] | width | Width of image in pixels. |
[in] | height | Height of image in pixels. |
[in] | Data | Raw image data. |
[in] | upsideDown | Is the data upside down? 1 yes, 0 no. |
[in] | rle | Run Length encode? 1 yes, 0 no. |