From c681edbc381a56960f36581f22e2dafdd8f0789f Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 10 Nov 2013 18:42:34 -0300 Subject: [PATCH] Fix Mask::byColor() Bug introduced in commit e5ba8e0922e066e7b521b149007a74aa00a9a25b --- src/raster/mask.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/raster/mask.cpp b/src/raster/mask.cpp index 05e625501..b58d9463f 100644 --- a/src/raster/mask.cpp +++ b/src/raster/mask.cpp @@ -256,7 +256,7 @@ void Mask::byColor(const Image *src, int color, int fuzziness) (src_g >= dst_g-fuzziness) && (src_g <= dst_g+fuzziness) && (src_b >= dst_b-fuzziness) && (src_b <= dst_b+fuzziness) && (src_a >= dst_a-fuzziness) && (src_a <= dst_a+fuzziness))) - (*dst_it) = 1; + *dst_it = 0; } ASSERT(dst_it == dst_end); break; @@ -283,7 +283,7 @@ void Mask::byColor(const Image *src, int color, int fuzziness) if (!((src_k >= dst_k-fuzziness) && (src_k <= dst_k+fuzziness) && (src_a >= dst_a-fuzziness) && (src_a <= dst_a+fuzziness))) - *dst_it = 1; + *dst_it = 0; } ASSERT(dst_it == dst_end); break; @@ -307,7 +307,7 @@ void Mask::byColor(const Image *src, int color, int fuzziness) max = color + fuzziness; if (!((c >= min) && (c <= max))) - (*dst_it) = 1; + *dst_it = 0; } ASSERT(dst_it == dst_end); break;