]> git.imager.perl.org - imager.git/blobdiff - imager.h
separate no png support tests into a separate test file to avoid the
[imager.git] / imager.h
index 1c02754866933784401fcdf586bf7486d684e5a8..de45b7867e03e2215693ec383eeeab570a89627a 100644 (file)
--- a/imager.h
+++ b/imager.h
@@ -56,6 +56,8 @@ i_img *i_img_empty(i_img *im,int x,int y);
 i_img *i_img_empty_ch(i_img *im,int x,int y,int ch);
 void   i_img_exorcise(i_img *im);
 void   i_img_destroy(i_img *im);
+i_img *i_img_alloc(void);
+void i_img_init(i_img *im);
 
 void   i_img_info(i_img *im,int *info);
 
@@ -112,6 +114,11 @@ extern int i_setcolors(i_img *im, int index, const i_color *colors,
 #define i_gsampf(im, l, r, y, samps, chans, count) \
   (((im)->i_f_gsampf)((im), (l), (r), (y), (samps), (chans), (count)))
 
+#define i_gsamp_bits(im, l, r, y, samps, chans, count, bits) \
+  (((im)->i_f_gsamp_bits) ? ((im)->i_f_gsamp_bits)((im), (l), (r), (y), (samps), (chans), (count), (bits)) : -1)
+#define i_psamp_bits(im, l, r, y, samps, chans, count, bits) \
+  (((im)->i_f_psamp_bits) ? ((im)->i_f_psamp_bits)((im), (l), (r), (y), (samps), (chans), (count), (bits)) : -1)
+
 #define i_findcolor(im, color, entry) \
   (((im)->i_f_findcolor) ? ((im)->i_f_findcolor)((im), (color), (entry)) : 0)
 
@@ -168,7 +175,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);
@@ -345,18 +360,17 @@ extern i_palidx *i_quant_translate(i_quantize *quant, i_img *img);
 extern void i_quant_transparent(i_quantize *quant, i_palidx *indices, i_img *img, i_palidx trans_index);
 
 extern i_img *i_img_pal_new(int x, int y, int channels, int maxpal);
-extern i_img *i_img_pal_new_low(i_img *im, int x, int y, int channels, int maxpal);
 extern i_img *i_img_to_pal(i_img *src, i_quantize *quant);
 extern i_img *i_img_to_rgb(i_img *src);
 extern i_img *i_img_masked_new(i_img *targ, i_img *mask, int x, int y, 
                                int w, int h);
 extern i_img *i_img_16_new(int x, int y, int ch);
-extern i_img *i_img_16_new_low(i_img *im, int x, int y, int ch);
 extern i_img *i_img_to_rgb16(i_img *im);
 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);
 
 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);
 
@@ -374,6 +388,8 @@ undef_int i_writetiff_wiol(i_img *im, io_glue *ig);
 undef_int i_writetiff_multi_wiol(io_glue *ig, i_img **imgs, int count);
 undef_int i_writetiff_wiol_faxable(i_img *im, io_glue *ig, int fine);
 undef_int i_writetiff_multi_wiol_faxable(io_glue *ig, i_img **imgs, int count, int fine);
+char const * i_tiff_libversion(void);
+int i_tiff_has_compression(char const *name);
 
 #endif /* HAVE_LIBTIFF */
 
@@ -567,5 +583,28 @@ void  malloc_state(void);
 #endif /* IMAGER_MALLOC_DEBUG */
 
 #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