+/*
+=item im_get_context()
+
+Retrieve the context object for the current thread.
+
+Inside Imager itself this is just a function pointer, which the
+F<Imager.xs> BOOT handler initializes for use within perl. If you're
+taking the Imager code and embedding it elsewhere you need to
+initialize the C<im_get_context> pointer at some point.
+
+=cut
+*/
+
+static im_context_t
+get_context(void) {
+ return im_get_context();
+}
+
+static i_img *
+mathom_i_img_8_new(i_img_dim xsize, i_img_dim ysize, int channels) {
+ return i_img_8_new(xsize, ysize, channels);
+}
+
+static i_img *
+mathom_i_img_16_new(i_img_dim xsize, i_img_dim ysize, int channels) {
+ return i_img_16_new(xsize, ysize, channels);
+}
+
+static i_img *
+mathom_i_img_double_new(i_img_dim xsize, i_img_dim ysize, int channels) {
+ return i_img_double_new(xsize, ysize, channels);
+}
+
+static i_img *
+mathom_i_img_pal_new(i_img_dim xsize, i_img_dim ysize, int channels,
+ int maxpal) {
+ return i_img_pal_new(xsize, ysize, channels, maxpal);
+}
+
+static void
+mathom_i_clear_error(void) {
+ i_clear_error();
+}
+
+static void
+mathom_i_push_error(int code, const char *msg) {
+ i_push_error(code, msg);
+}
+
+static void
+mathom_i_push_errorvf(int code, const char *fmt, va_list args) {
+ i_push_errorvf(code, fmt, args);
+}
+
+static int
+mathom_i_set_image_file_limits(i_img_dim max_width, i_img_dim max_height,
+ size_t max_bytes) {
+ return i_set_image_file_limits(max_width, max_height, max_bytes);
+}
+
+static int
+mathom_i_get_image_file_limits(i_img_dim *pmax_width, i_img_dim *pmax_height,
+ size_t *pmax_bytes) {
+ return i_get_image_file_limits(pmax_width, pmax_height, pmax_bytes);
+}
+
+static int
+mathom_i_int_check_image_file_limits(i_img_dim width, i_img_dim height,
+ int channels, size_t sample_size) {
+ return i_int_check_image_file_limits(width, height, channels, sample_size);
+}
+
+static i_img *
+mathom_i_img_alloc(void) {
+ return i_img_alloc();
+}
+
+static void
+mathom_i_img_init(i_img *im) {
+ i_img_init(im);
+}
+
+static i_io_glue_t *
+mathom_io_new_fd(int fd) {
+ return io_new_fd(fd);
+}
+static i_io_glue_t *
+mathom_io_new_bufchain(void) {
+ return io_new_bufchain();
+}
+
+static i_io_glue_t *
+mathom_io_new_buffer(const char *data, size_t size, i_io_closebufp_t closefp,
+ void *close_data) {
+ return io_new_buffer(data, size, closefp, close_data);
+}
+
+static i_io_glue_t *
+mathom_io_new_cb(void *p, i_io_readl_t readcb, i_io_writel_t writecb,
+ i_io_seekl_t seekcb, i_io_closel_t closecb,
+ i_io_destroyl_t destroycb) {
+ return io_new_cb(p, readcb, writecb, seekcb, closecb, destroycb);
+}