]> git.imager.perl.org - imager.git/blobdiff - imager.h
make sure flipping paletted images is covered
[imager.git] / imager.h
index 0adbf5ed36e390c06a3da2175b77140d4a435392..e44311cc2c53be977e7a107ad028f18508acc5e5 100644 (file)
--- a/imager.h
+++ b/imager.h
@@ -155,6 +155,7 @@ i_new_fill_hatchf(const i_fcolor *fg, const i_fcolor *bg, int combine, int hatch
                   const unsigned char *cust_hatch, int dx, int dy);
 extern i_fill_t *
 i_new_fill_image(i_img *im, const double *matrix, int xoff, int yoff, int combine);
+extern i_fill_t *i_new_fill_opacity(i_fill_t *, double alpha_mult);
 extern void i_fill_destroy(i_fill_t *fill);
 
 float i_gpix_pch(i_img *im,int x,int y,int ch);
@@ -175,7 +176,15 @@ void i_copyto      (i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int
 void i_copyto_trans(i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int ty,const i_color *trans);
 i_img* i_copy        (i_img *src);
 int  i_rubthru     (i_img *im, i_img *src, int tx, int ty, int src_minx, int src_miny, int src_maxx, int src_maxy);
-
+extern int 
+i_compose_mask(i_img *out, i_img *src, i_img *mask,
+              int out_left, int out_top, int src_left, int src_top,
+              int mask_left, int mask_top, int width, int height,
+              int combine, double opacity);
+extern int 
+i_compose(i_img *out, i_img *src,
+              int out_left, int out_top, int src_left, int src_top,
+              int width, int height, int combine, double opacity);
 
 undef_int i_flipxy (i_img *im, int direction);
 extern i_img *i_rotate90(i_img *im, int degrees);
@@ -197,7 +206,7 @@ undef_int i_flood_cfill_border(i_img *im, int seedx, int seedy, i_fill_t *fill,
 /* image processing functions */
 
 int i_gaussian    (i_img *im, double stdev);
-void i_conv        (i_img *im,const float *coeff,int len);
+int i_conv        (i_img *im,const double *coeff,int len);
 void i_unsharp_mask(i_img *im, double stddev, double scale);
 
 /* colour manipulation */
@@ -205,6 +214,7 @@ extern i_img *i_convert(i_img *src, const float *coeff, int outchan, int inchan)
 extern void i_map(i_img *im, unsigned char (*maps)[256], unsigned int mask);
 
 float i_img_diff   (i_img *im1,i_img *im2);
+double i_img_diffd(i_img *im1,i_img *im2);
 
 /* font routines */
 
@@ -361,6 +371,8 @@ extern i_img *i_img_to_rgb16(i_img *im);
 extern i_img *i_img_double_new(int x, int y, int ch);
 
 extern int i_img_is_monochrome(i_img *im, int *zero_is_white);
+extern void i_get_file_background(i_img *im, i_color *bg);
+extern void i_get_file_backgroundf(i_img *im, i_fcolor *bg);
 
 const char * i_test_format_probe(io_glue *data, int length);
 
@@ -575,4 +587,26 @@ void  malloc_state(void);
 #include "imrender.h"
 #include "immacros.h"
 
+extern void
+i_adapt_colors(int dest_channels, int src_channels, i_color *colors, 
+              size_t count);
+extern void
+i_adapt_fcolors(int dest_channels, int src_channels, i_fcolor *colors, 
+              size_t count);
+
+extern void
+i_adapt_colors_bg(int dest_channels, int src_channels, i_color *colors, 
+                 size_t count, i_color const *bg);
+extern void
+i_adapt_fcolors_bg(int dest_channels, int src_channels, i_fcolor *colors, 
+                  size_t count, i_fcolor const *bg);
+
+extern int
+i_gsamp_bg(i_img *im, int l, int r, int y, i_sample_t *samples, 
+          int out_channels, i_color const *bg);
+
+extern int
+i_gsampf_bg(i_img *im, int l, int r, int y, i_fsample_t *samples, 
+          int out_channels, i_fcolor const *bg);
+
 #endif