simage
1.8.3
Coin3D texture image library
|
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <config.h>
#include <simage.h>
#include <string.h>
#include <ctype.h>
#include <simage_jpeg.h>
#include <simage_png.h>
#include <simage_tiff.h>
#include <simage_rgb.h>
#include <simage_gif.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 void | add_internal_savers (void) |
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_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_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 char * | safe_strdup (const char *str) |
static void | safe_strfree (char *str) |
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) |
int | simage_check_save_supported (const char *filenameextension) |
int | simage_get_num_savers (void) |
const char * | simage_get_saver_description (void *handle) |
const char * | simage_get_saver_extensions (void *handle) |
const char * | simage_get_saver_fullname (void *handle) |
void * | simage_get_saver_handle (int idx) |
void | simage_remove_saver (void *handle) |
int | simage_save_image (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents, const char *filenameextension) |
static int | simage_strcasecmp (const char *str1, const char *str2) |
static void | str_tolower (char *str) |
Variables | |
static saver_data | eps_saver |
static char | epsext [] = "eps,ps" |
static const char | epsfull [] ="Encapsulated postscript" |
static saver_data * | first_saver = NULL |
static saver_data | gif_saver |
static char | gifext [] = "gif" |
static const char | giffull [] = "The Graphics Interchange Format" |
static saver_data | jpeg_saver |
static char | jpegext [] = "jpg,jpeg" |
static const char | jpegfull [] = "The Independent JPEG Group file format" |
static saver_data * | last_saver = NULL |
static saver_data | png_saver |
static char | pngext [] = "png" |
static const char | pngfull [] = "The PNG file format" |
static saver_data | rgb_saver |
static char | rgbext [] = "rgb,rgba,bw,inta,int" |
static const char | rgbfull [] ="The SGI RGB file format" |
char | simage_error_msg [] |
static saver_data | tiff_saver |
static char | tiffext [] = "tiff,tif" |
static const char | tifffull [] = "The Tag Image File Format" |
#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 |
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 ) |
int simage_check_save_supported | ( | const char * | filenameextension | ) |
Checks if export is available for a file type. 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 | ) |
const char * simage_get_saver_description | ( | void * | handle | ) |
const char * simage_get_saver_extensions | ( | void * | handle | ) |
const char * simage_get_saver_fullname | ( | void * | handle | ) |
void * simage_get_saver_handle | ( | int | idx | ) |
void simage_remove_saver | ( | void * | handle | ) |
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.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
extern |
|
static |
|
static |
|
static |