]> git.imager.perl.org - imager.git/blobdiff - imdatatypes.h
fixed incorrect filename for t/t93podcover.t in MANIFEST
[imager.git] / imdatatypes.h
index 774e9d9f30e8450a19e97912879fde82b2f59fca..af264b007d5c955b9baea2337b2caa1a283fe109 100644 (file)
@@ -76,10 +76,10 @@ typedef struct {
 } i_img_tags;
 
 typedef struct i_img_ i_img;
-typedef int (*i_f_ppix_t)(i_img *im, int x, int y, i_color *pix);
-typedef int (*i_f_ppixf_t)(i_img *im, int x, int y, i_fcolor *pix);
-typedef int (*i_f_plin_t)(i_img *im, int x, int r, int y, i_color *vals);
-typedef int (*i_f_plinf_t)(i_img *im, int x, int r, int y, i_fcolor *vals);
+typedef int (*i_f_ppix_t)(i_img *im, int x, int y, const i_color *pix);
+typedef int (*i_f_ppixf_t)(i_img *im, int x, int y, const i_fcolor *pix);
+typedef int (*i_f_plin_t)(i_img *im, int x, int r, int y, const i_color *vals);
+typedef int (*i_f_plinf_t)(i_img *im, int x, int r, int y, const i_fcolor *vals);
 typedef int (*i_f_gpix_t)(i_img *im, int x, int y, i_color *pix);
 typedef int (*i_f_gpixf_t)(i_img *im, int x, int y, i_fcolor *pix);
 typedef int (*i_f_glin_t)(i_img *im, int x, int r, int y, i_color *vals);
@@ -91,13 +91,13 @@ typedef int (*i_f_gsampf_t)(i_img *im, int x, int r, int y, i_fsample_t *samp,
                             const int *chan, int chan_count);
 
 typedef int (*i_f_gpal_t)(i_img *im, int x, int r, int y, i_palidx *vals);
-typedef int (*i_f_ppal_t)(i_img *im, int x, int r, int y, i_palidx *vals);
-typedef int (*i_f_addcolors_t)(i_img *im, i_color *colors, int count);
+typedef int (*i_f_ppal_t)(i_img *im, int x, int r, int y, const i_palidx *vals);
+typedef int (*i_f_addcolors_t)(i_img *im, const i_color *colors, int count);
 typedef int (*i_f_getcolors_t)(i_img *im, int i, i_color *, int count);
 typedef int (*i_f_colorcount_t)(i_img *im);
 typedef int (*i_f_maxcolors_t)(i_img *im);
-typedef int (*i_f_findcolor_t)(i_img *im, i_color *color, i_palidx *entry);
-typedef int (*i_f_setcolors_t)(i_img *im, int index, i_color *colors, 
+typedef int (*i_f_findcolor_t)(i_img *im, const i_color *color, i_palidx *entry);
+typedef int (*i_f_setcolors_t)(i_img *im, int index, const i_color *colors, 
                               int count);
 
 typedef void (*i_f_destroy_t)(i_img *im);
@@ -508,6 +508,13 @@ typedef struct i_gif_opts {
   int eliminate_unused;
 } i_gif_opts;
 
+/* distance measures used by some filters */
+enum {
+  i_dmeasure_euclidean = 0,
+  i_dmeasure_euclidean_squared = 1,
+  i_dmeasure_manhatten = 2,
+  i_dmeasure_limit = 2,
+};
 
 
 #endif