From 62783aee16f96fe5e513fb230b8efddaa02981df Mon Sep 17 00:00:00 2001 From: scuri Date: Thu, 1 Oct 2009 02:56:38 +0000 Subject: New: functions imProcessUnsharp and imProcessSharp. Changed: now imProcessUnArithmeticOp, imProcessArithmeticConstOp and imProcessArithmeticOp willl crop the result to 0-255 if destiny has data type byte. Changed: removed IM_UN_INC operation from imProcessUnArithmeticOp. It was not an unary operation. Can simply be done in place by imProcessArithmeticOp and IM_BIN_ADD. --- include/im_complex.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/im_complex.h') diff --git a/include/im_complex.h b/include/im_complex.h index 2ac4d92..1328dd5 100644 --- a/include/im_complex.h +++ b/include/im_complex.h @@ -54,6 +54,26 @@ inline int operator <= (const imcfloat& C, const float& F) return ((F <= C.real) && (0 <= C.imag)); } +inline int operator < (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real < C2.real) && (C1.imag < C2.imag)); +} + +inline int operator < (const imcfloat& C, const float& F) +{ + return ((F < C.real) && (0 < C.imag)); +} + +inline int operator > (const imcfloat& C1, const imcfloat& C2) +{ + return ((C1.real > C2.real) && (C1.imag > C2.imag)); +} + +inline int operator > (const imcfloat& C, const float& F) +{ + return ((F > C.real) && (0 > C.imag)); +} + inline imcfloat operator + (const imcfloat& C1, const imcfloat& C2) { return imcfloat(C1.real + C2.real, C1.imag + C2.imag); -- cgit v1.2.3