diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index 1759b6b8df..49c14cf92b 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -461,7 +461,7 @@ void BM2CMP_FRAME::Binarize( double aThreshold ) auto alpha = m_Greyscale_Image.HasAlpha() ? m_Greyscale_Image.GetAlpha( x, y ) : wxALPHA_OPAQUE; - if( pixin < threshold || alpha < alpha_thresh ) + if( pixin < threshold && alpha > alpha_thresh ) pixout = 0; else pixout = 255;