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 */
#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
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
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);
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,
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