|
Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <config.h>#include <simage.h>#include <string.h>#include <ctype.h>#include <simage_gdiplus.h>#include <simage_rgb.h>#include <simage_eps.h>Data Structures | |
| struct | _saver_data |
Macros | |
| #define | SIMAGE_ERROR_BUFSIZE 512 /* hack warning. Must match define in simage.c */ |
Typedefs | |
| typedef struct _saver_data | saver_data |
Functions | |
| static char * | safe_strdup (const char *str) |
| static void | safe_strfree (char *str) |
| static int | simage_strcasecmp (const char *str1, const char *str2) |
| static void | add_saver_data (saver_data *saver, int(*error_func)(char *, int), const char *extensions, const char *fullname, const char *description, int is_internal, int addbefore) |
| static void * | add_saver (saver_data *saver, int(*save_func)(const char *, const unsigned char *, int, int, int), int(*error_func)(char *, int), const char *extensions, const char *fullname, const char *description, int is_internal, int addbefore) |
| static void * | add_saver_ext (saver_data *saver, int(*save_func)(const char *, const unsigned char *, int, int, int, const char *), int(*error_func)(char *, int), const char *extensions, const char *fullname, const char *description, int is_internal, int addbefore) |
| static saver_data * | find_saver (const char *filenameextension) |
| static void | str_tolower (char *str) |
| static void | add_internal_savers (void) |
| int | simage_save_image (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents, const char *filenameextension) |
| void * | simage_add_saver (int(*save_func)(const char *name, const unsigned char *bytes, int width, int height, int nc), int(*error_func)(char *textbuffer, int bufferlen), const char *extensions, const char *fullname, const char *description, int addbefore) |
| void | simage_remove_saver (void *handle) |
| int | simage_check_save_supported (const char *filenameextension) |
| int | simage_get_num_savers (void) |
| void * | simage_get_saver_handle (int idx) |
| const char * | simage_get_saver_extensions (void *handle) |
| const char * | simage_get_saver_fullname (void *handle) |
| const char * | simage_get_saver_description (void *handle) |
Variables | |
| static saver_data | rgb_saver |
| static saver_data | eps_saver |
| static saver_data * | first_saver = NULL |
| static saver_data * | last_saver = NULL |
| static char | jpegext [] = "jpg,jpeg" |
| static const char | jpegfull [] = "The Independent JPEG Group file format" |
| static char | pngext [] = "png" |
| static const char | pngfull [] = "The PNG file format" |
| static char | tiffext [] = "tiff,tif" |
| static const char | tifffull [] = "The Tag Image File Format" |
| static char | rgbext [] = "rgb,rgba,bw,inta,int" |
| static const char | rgbfull [] ="The SGI RGB file format" |
| static char | gifext [] = "gif" |
| static const char | giffull [] = "The Graphics Interchange Format" |
| static char | epsext [] = "eps,ps" |
| static const char | epsfull [] ="Encapsulated postscript" |
| char | simage_error_msg [] |
| #define SIMAGE_ERROR_BUFSIZE 512 /* hack warning. Must match define in simage.c */ |
| typedef struct _saver_data saver_data |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int simage_save_image | ( | const char * | filename, |
| const unsigned char * | bytes, | ||
| int | w, | ||
| int | h, | ||
| int | numcomponents, | ||
| const char * | filenameextension | ||
| ) |
Saves image in the format specified in filenameextension. Use simage_check_write_supported first to verify that the file format is supported.
| void* simage_add_saver | ( | int(*)(const char *name, const unsigned char *bytes, int width, int height, int nc) | save_func, |
| int(*)(char *textbuffer, int bufferlen) | error_func, | ||
| const char * | extensions, | ||
| const char * | fullname, | ||
| const char * | description, | ||
| int | addbefore | ||
| ) |
| void simage_remove_saver | ( | void * | handle | ) |
| int simage_check_save_supported | ( | const char * | filenameextension | ) |
Checks if export is available for a filetype. Returns 1 if a saver of type filenameextension is supported, 0 otherwise. The built-in savers are gif, jpg/jpeg, png, tif/tiff and rgb.
| int simage_get_num_savers | ( | void | ) |
| void* simage_get_saver_handle | ( | int | idx | ) |
| const char* simage_get_saver_extensions | ( | void * | handle | ) |
| const char* simage_get_saver_fullname | ( | void * | handle | ) |
| const char* simage_get_saver_description | ( | void * | handle | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| char simage_error_msg[] |