#define MAXCHANNELS 4
+typedef struct im_context_tag *im_context_t;
+
+typedef ptrdiff_t im_slot_t;
+typedef void (*im_slot_destroy_t)(void *);
+
/* used for palette indices in some internal code (which might be
exposed at some point
*/
*/
typedef ptrdiff_t i_img_dim;
+typedef size_t i_img_dim_u;
/*
=item i_color
const int *chans, int chan_count, int bits);
typedef i_img_dim (*i_f_psamp_bits_t)(i_img *im, i_img_dim x, i_img_dim r, i_img_dim y, unsigned const *samp,
const int *chans, int chan_count, int bits);
+typedef i_img_dim
+(*i_f_psamp_t)(i_img *im, i_img_dim x, i_img_dim r, i_img_dim y,
+ const i_sample_t *samp, const int *chan, int chan_count);
+typedef i_img_dim
+(*i_f_psampf_t)(i_img *im, i_img_dim x, i_img_dim r, i_img_dim y,
+ const i_fsample_t *samp, const int *chan, int chan_count);
/*
=item i_img
i_f_psamp_bits - implements i_psamp_bits() for this image.
+=item *
+
+i_f_psamp - implements psamp() for this image.
+
+=item *
+
+i_f_psampf - implements psamp() for this image.
+
+=item *
+
+C<im_data> - image specific data internal to Imager.
+
+=item *
+
+C<context> - the Imager API context this image belongs to.
+
=back
=cut
i_f_gsamp_bits_t i_f_gsamp_bits;
i_f_psamp_bits_t i_f_psamp_bits;
+ /* as of 0.88 */
+ i_f_psamp_t i_f_psamp;
+ i_f_psampf_t i_f_psampf;
+
void *im_data;
+
+ /* 0.91 */
+ im_context_t context;
};
/* ext_data for paletted images
ic_color
} i_combine_t;
+/*
+=item i_mutex_t
+X<i_mutex>
+=category mutex
+=synopsis i_mutex_t mutex;
+
+Opaque type for Imager's mutex API.
+
+=cut
+ */
+typedef struct i_mutex_tag *i_mutex_t;
+
/*
describes an axis of a MM font.
Modelled on FT2's FT_MM_Axis.
mc_addi, /* Addi's algorithm */
mc_median_cut, /* median cut - similar to giflib, hopefully */
mc_mono, /* fixed mono color map */
+ mc_gray, /* 256 gray map */
+ mc_gray4, /* four step gray map */
+ mc_gray16, /* sixteen step gray map */
mc_mask = 0xFF /* (mask for generator) */
} i_make_colors;
od_custom /* custom 8x8 map */
} i_ord_dith;
-typedef struct i_gif_pos_tag {
- int x, y;
-} i_gif_pos;
-
/* passed into i_writegif_gen() to control quantization */
typedef struct i_quantize_tag {
int version;
/* version 2 members after here */
} i_quantize;
-typedef struct i_gif_opts {
- /* each image has a local color map */
- int each_palette;
-
- /* images are interlaced */
- int interlace;
-
- /* time for which image is displayed
- (in 1/100 seconds)
- default: 0
- */
- int delay_count;
- int *delays;
-
- /* user input flags
- default: 0
- */
- int user_input_count;
- char *user_input_flags;
-
- /* disposal
- default: 0 */
- int disposal_count;
- char *disposal;
-
- /* this is added to the color table when we make an image transparent */
- i_color tran_color;
-
- /* image positions */
- int position_count;
- i_gif_pos *positions;
-
- /* Netscape loop extension - number of loops */
- int loop_count;
-
- /* should be eliminate unused colors? */
- int eliminate_unused;
-} i_gif_opts;
-
/* distance measures used by some filters */
enum {
i_dmeasure_euclidean = 0,
#include "iolayert.h"
+/* error message information returned by im_errors() */
+
+typedef struct {
+ char *msg;
+ int code;
+} i_errmsg;
+
typedef struct i_render_tag i_render;
#ifdef IMAGER_FORMAT_ATTR
#define I_FORMAT_ATTR(format_index, va_index)
#endif
+#ifdef _MSC_VER
+# ifndef vsnprintf
+# define vsnprintf _vsnprintf
+# endif
+# ifndef snprintf
+# define snprintf _snprintf
+# endif
+#endif
+
/*
=item i_DF
=category Data Types