65 #define SIMAGE_VERSION_1_1
68 #define SIMAGE_VERSION_1_2
71 #define SIMAGE_VERSION_1_3
74 #define SIMAGE_VERSION_1_4
80 #define SIMAGE_VERSION_1_5
84 #define SIMAGE_VERSION_1_6
92 #if !defined(SIMAGE_MAJOR_VERSION)
93 #undef SIMAGE_MAJOR_VERSION
95 #if !defined(SIMAGE_MINOR_VERSION)
96 #undef SIMAGE_MINOR_VERSION
98 #if !defined(SIMAGE_MICRO_VERSION)
99 #undef SIMAGE_MICRO_VERSION
101 #if !defined(SIMAGE_VERSION)
102 #undef SIMAGE_VERSION
108 #ifdef SIMAGE_DLL_API
109 # error Leave the internal SIMAGE_DLL_API define alone.
143 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
144 # ifdef SIMAGE_INTERNAL
145 # ifdef SIMAGE_MAKE_DLL
146 # define SIMAGE_DLL_API __declspec(dllexport)
150 # define SIMAGE_DLL_API __declspec(dllimport)
152 # ifndef SIMAGE_NOT_DLL
153 # error Define either SIMAGE_DLL or SIMAGE_NOT_DLL as appropriate for your linkage!
160 #ifndef SIMAGE_DLL_API
161 # define SIMAGE_DLL_API
179 SIMAGE_DLL_API
void simage_version(
int * major,
int * minor,
int * micro);
200 int * width,
int * height,
201 int * numcomponents);
227 SIMAGE_DLL_API
unsigned char *
simage_resize(
unsigned char * imagedata,
228 int width,
int height,
230 int newwidth,
int newheight);
237 unsigned char *(*load_func)(
const char * name,
int * width,
int * height,
238 int * numcomponents);
240 const unsigned char * header,
int headerlen);
263 const unsigned char * bytes,
264 int w,
int h,
int numcomponents,
265 const char * filenameextension);
268 const unsigned char * bytes,
269 int width,
int height,
int nc),
270 int (*error_func)(
char * textbuffer,
int bufferlen),
271 const char * extensions,
272 const char * fullname,
273 const char * description,
298 unsigned char * prealloc );
306 unsigned char * data,
int copydata);
406 SIMAGE_DLL_API
unsigned char *
simage_resize3d(
unsigned char * imagedata,
407 int width,
int height,
410 int newwidth,
int newheight,
492 unsigned char * buf);
int s_image_set_component_order(s_image *image, int order)
int simage_get_num_savers(void)
int simage_save_image(const char *filename, const unsigned char *bytes, int w, int h, int numcomponents, const char *filenameextension)
int s_stream_seek(s_stream *stream, int offset, int whence, s_params *params)
int s_image_height(s_image *image)
const char * simage_get_last_error(void)
void s_movie_exporter_add(s_movie_create_func *create, s_movie_put_func *put, s_movie_close_func *close)
void s_dlclose_func(void *handle)
static s_dlsym_func * dlsym
int s_image_width(s_image *image)
void * s_dlopen_func(const char *filename)
void s_stream_importer_add(s_stream_open_func *open, s_stream_get_func *get, s_stream_close_func *close)
s_params * s_params_create(void)
void s_stream_exporter_add(s_stream_create_func *create, s_stream_put_func *put, s_stream_close_func *close)
int s_movie_put_image(s_movie *movie, s_image *image, s_params *params)
const char * simage_get_saver_fullname(void *handle)
unsigned char * simage_resize3d(unsigned char *imagedata, int width, int height, int numcomponents, int layers, int newwidth, int newheight, int newlayers)
s_movie * s_movie_open(const char *filename)
s_params * s_params_copy(s_params *params)
int simage_check_save_supported(const char *filenameextension)
unsigned char * simage_read_image(const char *filename, int *width, int *height, int *numcomponents)
int simage_next_power_of_two(int val)
void s_movie_importer_add(s_movie_open_func *open, s_movie_get_func *get, s_movie_close_func *close)
s_stream * s_stream_open(const char *filename, s_params *params)
static s_dlopen_func * dlopen
void s_movie_close_func(s_movie *)
int s_stream_seek_func(s_stream *, int, int, s_params *)
int s_stream_put_func(s_stream *, void *, int, s_params *)
int simage_check_supported(const char *filename)
void s_image_destroy(s_image *image)
void * s_stream_get_buffer(s_stream *stream, void *prealloc, int *size, s_params *params)
void * simage_get_saver_handle(int idx)
void * simage_add_loader(const struct simage_plugin *l, int addbefore)
void s_params_set(s_params *params,...)
int s_movie_create_func(const char *, s_movie *, s_params *)
int(* identify_func)(const char *filename, const unsigned char *header, int headerlen)
s_image * s_image_create(int w, int h, int components, unsigned char *prealloc)
int s_stream_create_func(const char *, s_stream *, s_params *)
s_stream_close_func * close
void s_stream_exporter_add_ex(s_stream_create_func *create, s_stream_put_func *put, s_stream_seek_func *seek, s_stream_tell_func *tell, s_stream_close_func *close)
s_stream_seek_func * seek
const char * simage_get_saver_description(void *handle)
s_params * s_stream_params(s_stream *stream)
unsigned char * s_image_data(s_image *image)
int s_movie_put_func(s_movie *, s_image *, s_params *)
void * s_dlsym_func(void *handle, const char *symbolname)
s_stream_open_func * open
void s_stream_importer_add_ex(s_stream_open_func *open, s_stream_get_func *get, s_stream_seek_func *seek, s_stream_tell_func *tell, s_stream_close_func *close)
s_image * s_movie_get_image(s_movie *movie, s_image *prealloc, s_params *params)
static s_dlclose_func * dlclose
int s_stream_open_func(const char *, s_stream *, s_params *)
s_stream_tell_func * tell
void s_stream_destroy(s_stream *stream)
int s_stream_tell(s_stream *stream, s_params *params)
s_stream_create_func * create
void * s_stream_get_func(s_stream *, void *, int *, s_params *)
void s_stream_close_func(s_stream *)
void simage_free_image(unsigned char *imagedata)
void simage_version(int *major, int *minor, int *micro)
void simage_remove_loader(void *handle)
void s_movie_close(s_movie *movie)
int s_stream_tell_func(s_stream *, s_params *)
void s_movie_destroy(s_movie *movie)
int s_image_read_line(s_image *image, int line, unsigned char *buf)
s_image * s_movie_get_func(s_movie *, s_image *, s_params *)
void s_set_dynamic_loader_interface(s_dlopen_func *dlopen, s_dlsym_func *dlsym, s_dlclose_func *dlclose)
void s_image_set(s_image *image, int w, int h, int components, unsigned char *data, int copydata)
int s_image_save(const char *filename, s_image *image, s_params *params)
s_movie * s_movie_create(const char *filename, s_params *params)
int s_image_get_component_order(s_image *image)
void s_stream_close(s_stream *stream)
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)
s_image * s_image_load(const char *filename, s_image *prealloc)
unsigned char * simage_resize(unsigned char *imagedata, int width, int height, int numcomponents, int newwidth, int newheight)
void s_params_destroy(s_params *params)
int s_stream_put_buffer(s_stream *stream, void *buffer, int size, s_params *params)
int s_params_get(s_params *params,...)
void simage_remove_saver(void *handle)
const char * simage_get_saver_extensions(void *handle)
int s_image_components(s_image *image)
s_image * s_image_open(const char *file, int oktoreadall)
int s_movie_open_func(const char *, s_movie *)
int(* error_func)(char *textbuffer, int bufferlen)
s_stream * s_stream_create(const char *filename, s_params *params)