Fix Mask::byColor()

Bug introduced in commit e5ba8e0922
This commit is contained in:
David Capello 2013-11-10 18:42:34 -03:00
parent 5c74e59e0e
commit c681edbc38

View File

@ -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;