=cut
*/
+#define IMAGER_NO_CONTEXT
#include "imager.h"
struct chan_copy {
int i, j;
int ilimit;
i_img *im = NULL;
+ dIMCTXim(src);
- mm_log((1,"i_convert(im %p, src %p, coeff %p,outchan %d, inchan %d)\n",
+ im_log((aIMCTX,1,"i_convert(im %p, src %p, coeff %p,outchan %d, inchan %d)\n",
im, src, coeff, outchan, inchan));
- i_clear_error();
+ im_clear_error(aIMCTX);
ilimit = inchan;
if (ilimit > src->channels)
ilimit = src->channels;
if (outchan > MAXCHANNELS) {
- i_push_error(0, "cannot have outchan > MAXCHANNELS");
+ im_push_error(aIMCTX, 0, "cannot have outchan > MAXCHANNELS");
return 0;
}
i_color *colors;
i_palidx *vals;
- im = i_img_pal_new(src->xsize, src->ysize, outchan,
- i_maxcolors(src));
+ im = im_img_pal_new(aIMCTX, src->xsize, src->ysize, outchan,
+ i_maxcolors(src));
/* just translate the color table */
count = i_colorcount(src);