add new comparison method rgb_difference that resembles arithmetical difference per...
[imager.git] / rubthru.im
index 8a2465f1f077cc65d3de70bab5e7be7c0b23b5e5..514ec09c3ec4f9985ed9b6c148d557889e6c02ef 100644 (file)
@@ -110,7 +110,7 @@ rubthru_targ_alpha(i_img *im, i_img *src, i_img_dim tx, i_img_dim ty,
       ++min_x;
       ++srcp;
     }
-    while (max_x > min_x && src_line[max_x-1].channel[alphachan] == 0) {
+    while (max_x > min_x && src_line[max_x-1 - src_minx].channel[alphachan] == 0) {
       --max_x;
     }