|
Line 0
Link Here
|
|
|
1 |
--- src/zm_image.cpp.orig 2016-06-01 00:41:17 UTC |
| 2 |
+++ src/zm_image.cpp |
| 3 |
@@ -1619,12 +1619,9 @@ Image *Image::Highlight( unsigned int n_ |
| 4 |
for ( unsigned int j = 0; j < n_images; j++ ) |
| 5 |
{ |
| 6 |
uint8_t *psrc = images[j]->buffer+c; |
| 7 |
- |
| 8 |
-#ifndef SOLARIS |
| 9 |
- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) |
| 10 |
-#else |
| 11 |
- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) |
| 12 |
-#endif |
| 13 |
+ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); |
| 14 |
+ |
| 15 |
+ if (diff >= RGB_VAL(threshold,c)) |
| 16 |
{ |
| 17 |
count++; |
| 18 |
} |