]> git.imager.perl.org - imager.git/blobdiff - imager.h
skip the right number of tests when gif not available
[imager.git] / imager.h
index ba69645a4a3952825cccf314c4ee7331451375b7..e59978058aee5a86a8b6ba013e550d0c00ede122 100644 (file)
--- a/imager.h
+++ b/imager.h
@@ -181,6 +181,8 @@ void i_poly_aa_cfill(i_img *im,int l,const double *x,const double *y,i_fill_t *f
 
 undef_int i_flood_fill  (i_img *im,int seedx,int seedy, const i_color *dcol);
 undef_int i_flood_cfill(i_img *im, int seedx, int seedy, i_fill_t *fill);
+undef_int i_flood_fill_border  (i_img *im,int seedx,int seedy, const i_color *dcol, const i_color *border);
+undef_int i_flood_cfill_border(i_img *im, int seedx, int seedy, i_fill_t *fill, const i_color *border);
 
 
 /* image processing functions */
@@ -274,11 +276,11 @@ i_ft2_set_mm_coords(FT2_Fonthandle *handle, int coord_count, const long *coords)
 
 #ifdef WIN32
 
-extern int i_wf_bbox(char *face, int size, const char *text, int length, int *bbox);
+extern int i_wf_bbox(const char *face, int size, const char *text, int length, int *bbox);
 extern int i_wf_text(const char *face, i_img *im, int tx, int ty, const i_color *cl, 
                     int size, const char *text, int len, int align, int aa);
 extern int i_wf_cp(const char *face, i_img *im, int tx, int ty, int channel, 
-                  int size, char *text, int len, int align, int aa);
+                  int size, const char *text, int len, int align, int aa);
 extern int i_wf_addfont(char const *file);
 
 #endif
@@ -351,7 +353,7 @@ extern i_img *i_img_double_new(int x, int y, int ch);
 extern i_img *i_img_double_new_low(i_img *im, int x, int y, int ch);
 
 
-char * i_test_format_probe(io_glue *data, int length);
+const char * i_test_format_probe(io_glue *data, int length);
 
 
 #ifdef HAVE_LIBJPEG
@@ -415,6 +417,7 @@ undef_int i_writergb_wiol(i_img *img, io_glue *ig, int wierdpack, int compress,
 
 i_img * i_scaleaxis(i_img *im, float Value, int Axis);
 i_img * i_scale_nn(i_img *im, float scx, float scy);
+i_img * i_scale_mixing(i_img *src, int width, int height);
 i_img * i_haar(i_img *im);
 int     i_count_colors(i_img *im,int maxc);
 
@@ -442,12 +445,13 @@ void i_autolevels(i_img *im,float lsat,float usat,float skew);
 void i_radnoise(i_img *im,int xo,int yo,float rscale,float ascale);
 void i_turbnoise(i_img *im,float xo,float yo,float scale);
 void i_gradgen(i_img *im, int num, int *xo, int *yo, i_color *ival, int dmeasure);
-void i_nearest_color(i_img *im, int num, int *xo, int *yo, i_color *ival, int dmeasure);
+int i_nearest_color(i_img *im, int num, int *xo, int *yo, i_color *ival, int dmeasure);
 i_img *i_diff_image(i_img *im, i_img *im2, int mindist);
-void i_fountain(i_img *im, double xa, double ya, double xb, double yb, 
-                i_fountain_type type, i_fountain_repeat repeat, 
-                int combine, int super_sample, double ssample_param,
-                int count, i_fountain_seg *segs);
+int
+i_fountain(i_img *im, double xa, double ya, double xb, double yb, 
+           i_fountain_type type, i_fountain_repeat repeat, 
+           int combine, int super_sample, double ssample_param,
+           int count, i_fountain_seg *segs);
 extern i_fill_t *
 i_new_fill_fount(double xa, double ya, double xb, double yb, 
                  i_fountain_type type, i_fountain_repeat repeat, 
@@ -488,28 +492,7 @@ typedef struct {
 
 } symbol_table_t;
 
-/* error handling 
-   see error.c for documentation
-   the error information is currently global
-*/
-typedef struct {
-  char *msg;
-  int code;
-} i_errmsg;
-
-typedef void (*i_error_cb)(int code, char const *msg);
-typedef void (*i_failed_cb)(i_errmsg *msgs);
-extern i_error_cb i_set_error_cb(i_error_cb);
-extern i_failed_cb i_set_failed_cb(i_failed_cb);
-extern void i_set_argv0(char const *);
-extern int i_set_errors_fatal(int new_fatal);
-extern i_errmsg *i_errors(void);
-
-extern void i_push_error(int code, char const *msg);
-extern void i_push_errorf(int code, char const *fmt, ...);
-extern void i_push_errorvf(int code, char const *fmt, va_list);
-extern void i_clear_error(void);
-extern int i_failed(int code, char const *msg);
+#include "imerror.h"
 
 /* image tag processing */
 extern void i_tags_new(i_img_tags *tags);
@@ -549,5 +532,32 @@ extern int
 i_set_image_file_limits(int width, int height, int bytes);
 extern int
 i_get_image_file_limits(int *width, int *height, int *bytes);
+extern int
+i_int_check_image_file_limits(int width, int height, int channels, int sample_size);
+
+/* memory allocation */
+void* mymalloc(int size);
+void  myfree(void *p);
+void* myrealloc(void *p, size_t newsize);
+void* mymalloc_file_line (size_t size, char* file, int line);
+void  myfree_file_line   (void *p, char*file, int line);
+void* myrealloc_file_line(void *p, size_t newsize, char* file,int line);
+
+#ifdef IMAGER_DEBUG_MALLOC
+
+#define mymalloc(x) (mymalloc_file_line((x), __FILE__, __LINE__))
+#define myrealloc(x,y) (myrealloc_file_line((x),(y), __FILE__, __LINE__))
+#define myfree(x) (myfree_file_line((x), __FILE__, __LINE__))
+
+void  malloc_state       (void);
+void* mymalloc_comm      (int size, char *comm);
+void  bndcheck_all       (void);
+
+#else
+
+#define malloc_comm(a,b) (mymalloc(a))
+void  malloc_state(void);
+
+#endif /* IMAGER_MALLOC_DEBUG */
 
 #endif