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)
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);
static s_dlclose_func * dlclose
Definition simage.c:492
static s_dlopen_func * dlopen
Definition simage.c:490
static s_dlsym_func * dlsym
Definition simage.c:491
s_movie * s_movie_create(const char *filename, s_params *params)
Definition movie.c:135
int s_movie_put_func(s_movie *, s_image *, s_params *)
Definition simage.h:294
s_image * s_image_create(int w, int h, int components, unsigned char *prealloc)
Definition simage12.c:30
s_params * s_stream_params(s_stream *stream)
Definition stream.c:204
void s_params_destroy(s_params *params)
Definition params.c:57
s_params * s_params_create(void)
Definition params.c:49
void * simage_get_saver_handle(int idx)
Definition simage_write.c:542
int s_stream_put_func(s_stream *, void *, int, s_params *)
Definition simage.h:421
void s_stream_exporter_add(s_stream_create_func *create, s_stream_put_func *put, s_stream_close_func *close)
Definition stream.c:260
void s_stream_close_func(s_stream *)
Definition simage.h:422
int s_image_read_line(s_image *image, int line, unsigned char *buf)
Definition simage.c:453
s_image * s_movie_get_image(s_movie *movie, s_image *prealloc, s_params *params)
Definition movie.c:163
int simage_next_power_of_two(int val)
Definition simage.c:383
void s_stream_importer_add(s_stream_open_func *open, s_stream_get_func *get, s_stream_close_func *close)
Definition stream.c:225
int simage_check_save_supported(const char *filenameextension)
Definition simage_write.c:515
s_params * s_params_copy(s_params *params)
Definition params.c:94
void simage_remove_saver(void *handle)
Definition simage_write.c:489
s_movie * s_movie_open(const char *filename)
Definition movie.c:106
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)
Definition simage_write.c:469
int s_params_get(s_params *params,...)
Definition params.c:251
void * s_dlsym_func(void *handle, const char *symbolname)
Definition simage.h:495
const char * simage_get_last_error(void)
Definition simage.c:319
int simage_save_image(const char *filename, const unsigned char *bytes, int w, int h, int numcomponents, const char *filenameextension)
Definition simage_write.c:433
int s_stream_create_func(const char *, s_stream *, s_params *)
Definition simage.h:419
const char * simage_get_saver_extensions(void *handle)
Definition simage_write.c:553
int s_image_save(const char *filename, s_image *image, s_params *params)
Definition simage12.c:191
void s_image_set(s_image *image, int w, int h, int components, unsigned char *data, int copydata)
Definition simage12.c:126
void s_movie_close(s_movie *movie)
Definition movie.c:176
int simage_get_num_savers(void)
Definition simage_write.c:524
int s_stream_seek_func(s_stream *, int, int, s_params *)
Definition simage.h:451
void s_stream_close(s_stream *stream)
Definition stream.c:190
void simage_version(int *major, int *minor, int *micro)
Definition simage.c:398
@ SIMAGE_SEEK_END
Definition simage.h:457
@ SIMAGE_SEEK_CUR
Definition simage.h:456
@ SIMAGE_SEEK_SET
Definition simage.h:455
int s_image_set_component_order(s_image *image, int order)
Definition simage12.c:94
const char * simage_get_saver_description(void *handle)
Definition simage_write.c:567
int s_stream_open_func(const char *, s_stream *, s_params *)
Definition simage.h:418
int s_image_width(s_image *image)
Definition simage12.c:72
@ SIMAGE_ORDER_RGB
Definition simage.h:479
@ SIMAGE_ORDER_BGR
Definition simage.h:480
void simage_free_image(unsigned char *imagedata)
Definition simage.c:406
void s_image_destroy(s_image *image)
Definition simage12.c:56
void s_movie_importer_add(s_movie_open_func *open, s_movie_get_func *get, s_movie_close_func *close)
Definition movie.c:199
int s_movie_put_image(s_movie *movie, s_image *image, s_params *params)
Definition movie.c:169
void s_movie_close_func(s_movie *)
Definition simage.h:295
void s_movie_destroy(s_movie *movie)
Definition movie.c:182
int s_stream_seek(s_stream *stream, int offset, int whence, s_params *params)
Definition stream.c:295
int s_stream_put_buffer(s_stream *stream, void *buffer, int size, s_params *params)
Definition stream.c:183
void s_stream_destroy(s_stream *stream)
Definition stream.c:196
void s_dlclose_func(void *handle)
Definition simage.h:496
int s_stream_tell_func(s_stream *, s_params *)
Definition simage.h:452
void * simage_add_loader(const struct simage_plugin *l, int addbefore)
Definition simage.c:335
unsigned char * simage_resize(unsigned char *imagedata, int width, int height, int numcomponents, int newwidth, int newheight)
Definition resize.c:512
const char * simage_get_saver_fullname(void *handle)
Definition simage_write.c:560
int s_movie_create_func(const char *, s_movie *, s_params *)
Definition simage.h:292
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)
Definition stream.c:268
void * s_stream_get_func(s_stream *, void *, int *, s_params *)
Definition simage.h:420
int s_movie_open_func(const char *, s_movie *)
Definition simage.h:291
unsigned char * simage_resize3d(unsigned char *imagedata, int width, int height, int numcomponents, int layers, int newwidth, int newheight, int newlayers)
Definition simage13.c:29
unsigned char * s_image_data(s_image *image)
Definition simage12.c:108
s_stream * s_stream_create(const char *filename, s_params *params)
Definition stream.c:145
s_image * s_image_load(const char *filename, s_image *prealloc)
Definition simage12.c:163
int s_image_get_component_order(s_image *image)
Definition simage12.c:102
void * s_stream_get_buffer(s_stream *stream, void *prealloc, int *size, s_params *params)
Definition stream.c:176
int s_image_components(s_image *image)
Definition simage12.c:86
int s_stream_tell(s_stream *stream, s_params *params)
Definition stream.c:304
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)
Definition stream.c:233
void s_params_set(s_params *params,...)
Definition params.c:187
void s_set_dynamic_loader_interface(s_dlopen_func *dlopen, s_dlsym_func *dlsym, s_dlclose_func *dlclose)
Definition simage.c:495
@ S_FUNCTION_PARAM_TYPE
Definition simage.h:391
@ S_INTEGER_PARAM_TYPE
Definition simage.h:385
@ S_DOUBLE_PARAM_TYPE
Definition simage.h:388
@ S_POINTER_PARAM_TYPE
Definition simage.h:390
@ S_FLOAT_PARAM_TYPE
Definition simage.h:387
@ S_BOOL_PARAM_TYPE
Definition simage.h:386
@ S_STRING_PARAM_TYPE
Definition simage.h:389
void * s_dlopen_func(const char *filename)
Definition simage.h:494
s_image * s_movie_get_func(s_movie *, s_image *, s_params *)
Definition simage.h:293
s_image * s_image_open(const char *file, int oktoreadall)
Definition simage.c:415
int s_image_height(s_image *image)
Definition simage12.c:79
unsigned char * simage_read_image(const char *filename, int *width, int *height, int *numcomponents)
Definition simage.c:292
int simage_check_supported(const char *filename)
Definition simage.c:328
s_stream * s_stream_open(const char *filename, s_params *params)
Definition stream.c:111
void simage_remove_loader(void *handle)
Definition simage.c:346
void s_movie_exporter_add(s_movie_create_func *create, s_movie_put_func *put, s_movie_close_func *close)
Definition movie.c:222
Definition simage_private.h:34
int(* identify_func)(const char *filename, const unsigned char *header, int headerlen)
Definition simage.h:239
int(* error_func)(char *textbuffer, int bufferlen)
Definition simage.h:241
s_stream_open_func * open
Definition stream.c:40
s_stream_create_func * create
Definition stream.c:41
s_params * params
Definition stream.c:48
s_stream_get_func * get
Definition stream.c:42
char * filename
Definition stream.c:38
s_stream_tell_func * tell
Definition stream.c:46
s_stream_close_func * close
Definition stream.c:44
s_stream_seek_func * seek
Definition stream.c:45
s_stream_put_func * put
Definition stream.c:43