]> git.imager.perl.org - imager.git/blobdiff - conv.c
- loading filter DLLs/DSOs had an off-by-one error allocating a buffer
[imager.git] / conv.c
diff --git a/conv.c b/conv.c
index dd79af119ec8c4bc296553c296b348ce98843cc4..7e8513d0b8d2555f02e2609429559cdf358b25e2 100644 (file)
--- a/conv.c
+++ b/conv.c
@@ -19,13 +19,14 @@ i_conv(i_img *im,float *coeff,int len) {
   float res[11];
   i_img timg;
 
-  mm_log((1,"i_conv(im* 0x%x,coeff 0x%x,len %d)\n",im,coeff,len));
+  mm_log((1,"i_conv(im %p, coeff %p, len %d)\n",im,coeff,len));
  
   i_img_empty_ch(&timg,im->xsize,im->ysize,im->channels);
 
   center=(len-1)/2;
 
-
+  /* don't move the calculation of pc up here, it depends on which pixels
+     are readable */
   for(l=0;l<im->ysize;l++) {
     for(i=0;i<im->xsize;i++) {
       pc=0.0;
@@ -66,6 +67,7 @@ i_conv(i_img *im,float *coeff,int len) {
          i_ppix(im,l,i,&rcolor);
        }
     }
+  i_img_exorcise(&timg);
 }