diff options
-rw-r--r-- | html/en/history.html | 3 | ||||
-rw-r--r-- | src/process/im_analyze.cpp | 17 |
2 files changed, 17 insertions, 3 deletions
diff --git a/html/en/history.html b/html/en/history.html index 4f100f5..c5eb4fa 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -40,6 +40,9 @@ <li dir="ltr"><span style="color: #008000"><span style="color: #ff0000">Fixed:</span><span style="color: #000000"> incomplete initialization of the array in <strong>imAnalyzeMeasureArea</strong>.</span></span></li> + <li dir="ltr"><span style="color: #008000"><span style="color: #ff0000">Fixed:</span><span + style="color: #000000"> <strong>imProcessRemoveByArea</strong> + inside/outside logic.</span></span></li> </ul> <h3 dir="ltr"> <a href="http://sourceforge.net/projects/imtoolkit/files/3.5/">Version 3.5</a> (02/Oct/2009)</h3> diff --git a/src/process/im_analyze.cpp b/src/process/im_analyze.cpp index 551f043..5a775a0 100644 --- a/src/process/im_analyze.cpp +++ b/src/process/im_analyze.cpp @@ -2,7 +2,7 @@ * \brief Image Analysis * * See Copyright Notice in im_lib.h - * $Id: im_analyze.cpp,v 1.4 2010/01/21 18:24:23 scuri Exp $ + * $Id: im_analyze.cpp,v 1.5 2010/01/22 19:47:56 scuri Exp $ */ @@ -1203,8 +1203,19 @@ void imProcessRemoveByArea(const imImage* image, imImage* NewImage, int connect, if (end_size == 0) end_size = image->width*image->height; - int outside=0; - if (!inside) outside = 1; + int outside; + if (inside) + { + /* remove from inside */ + inside = 0; + outside = 1; + } + else + { + /* remove from outside */ + inside = 1; + outside = 0; + } int* area_data = (int*)malloc(region_count*sizeof(int)); imAnalyzeMeasureArea(region_image, area_data, region_count); |