]> git.imager.perl.org - imager.git/blobdiff - conv.im
document polygon() change
[imager.git] / conv.im
diff --git a/conv.im b/conv.im
index b766d7eb7cc2495aae4bdb9dd9936737240c19e6..ced813ea75ffe500ebfcddbd4193f046cd2e36c4 100644 (file)
--- a/conv.im
+++ b/conv.im
@@ -1,3 +1,4 @@
+#define IMAGER_NO_CONTEXT
 #include "imager.h"
 #include "imageri.h"
 
@@ -19,9 +20,15 @@ i_conv(i_img *im, const double *coeff,int len) {
   double pc;
   double res[MAXCHANNELS];
   i_img *timg;
+  dIMCTXim(im);
 
-  mm_log((1,"i_conv(im %p, coeff %p, len %d)\n",im,coeff,len));
-  i_clear_error();
+  im_log((aIMCTX,1,"i_conv(im %p, coeff %p, len %d)\n",im,coeff,len));
+  im_clear_error(aIMCTX);
+
+  if (len < 1) {
+    im_push_error(aIMCTX, 0, "there must be at least one coefficient");
+    return 0;
+  }
  
   center=(len-1)/2;