summaryrefslogtreecommitdiff
path: root/src/process/im_analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/im_analyze.cpp')
-rw-r--r--src/process/im_analyze.cpp17
1 files changed, 14 insertions, 3 deletions
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);